移交修改
This commit is contained in:
		
							parent
							
								
									d52f245e59
								
							
						
					
					
						commit
						47e63fb706
					
				| 
						 | 
					@ -0,0 +1,26 @@
 | 
				
			||||||
 | 
					ALTER TABLE Transfer_Firefighting ADD Installation nvarchar(50)  NULL
 | 
				
			||||||
 | 
					GO	
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					ALTER TABLE Transfer_Firefighting ADD Debugging nvarchar(50)  NULL
 | 
				
			||||||
 | 
					GO	
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					ALTER TABLE Transfer_Firefighting ADD Acceptancecheck nvarchar(50)  NULL
 | 
				
			||||||
 | 
					GO	
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					ALTER TABLE Transfer_Telecom ADD Installation nvarchar(50)  NULL
 | 
				
			||||||
 | 
					GO	
 | 
				
			||||||
 | 
					ALTER TABLE Transfer_Telecom ADD Communication nvarchar(50)  NULL
 | 
				
			||||||
 | 
					GO	
 | 
				
			||||||
 | 
					ALTER TABLE Transfer_Telecom ADD CableLaying nvarchar(50)  NULL
 | 
				
			||||||
 | 
					GO	
 | 
				
			||||||
 | 
					ALTER TABLE Transfer_Telecom ADD FunctionTest nvarchar(50)  NULL
 | 
				
			||||||
 | 
					GO	
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					ALTER TABLE Transfer_Plumbing ADD Ndt nvarchar(50)  NULL
 | 
				
			||||||
 | 
					GO	
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					ALTER TABLE Transfer_Plumbing ADD Flushing nvarchar(50)  NULL
 | 
				
			||||||
 | 
					GO	
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					ALTER TABLE Transfer_Plumbing ADD RunningTest nvarchar(50)  NULL
 | 
				
			||||||
 | 
					GO	
 | 
				
			||||||
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							| 
						 | 
					@ -26,13 +26,20 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                                <f:TextBox runat="server" ID="txtSystem" Label="SYSTEM" LabelWidth="100px"  LabelAlign="Right"></f:TextBox>
 | 
					                                <f:TextBox runat="server" ID="txtSystem" Label="SYSTEM" LabelWidth="100px"  LabelAlign="Right"></f:TextBox>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                                <f:DatePicker runat="server" Label="Test_Package_START" ID="txtStarTime" LabelAlign="Right" LabelWidth="150px"
 | 
					                                <f:DropDownList runat="server" ID="ddStatus" Label="Status">
 | 
				
			||||||
 | 
					                                    <f:ListItem Value="" Text="All" Selected="true"/>
 | 
				
			||||||
 | 
					                                    <f:ListItem Value="Not Start" Text="Not Start"/>
 | 
				
			||||||
 | 
					                                    <f:ListItem Value="In progress" Text="In progress"/>
 | 
				
			||||||
 | 
					                                    <f:ListItem Value="Completed" Text="Completed"/>
 | 
				
			||||||
 | 
					                                </f:DropDownList>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                               <%-- <f:DatePicker runat="server" Label="Test_Package_START" ID="txtStarTime" LabelAlign="Right" LabelWidth="150px"
 | 
				
			||||||
                                     Width="280px">
 | 
					                                     Width="280px">
 | 
				
			||||||
                                </f:DatePicker>
 | 
					                                </f:DatePicker>
 | 
				
			||||||
                                <f:Label ID="Label1" runat="server" Text="至">
 | 
					                                <f:Label ID="Label1" runat="server" Text="至">
 | 
				
			||||||
                                </f:Label>
 | 
					                                </f:Label>
 | 
				
			||||||
                                <f:DatePicker runat="server" ID="txtEndTime" LabelAlign="Right" Width="150px">
 | 
					                                <f:DatePicker runat="server" ID="txtEndTime" LabelAlign="Right" Width="150px">
 | 
				
			||||||
                                </f:DatePicker>
 | 
					                                </f:DatePicker>--%>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                                <f:Button ID="btnSearch" Icon="SystemSearch" EnablePostBack="true" runat="server" OnClick="btnSearch_Click" ToolTip="查询">
 | 
					                                <f:Button ID="btnSearch" Icon="SystemSearch" EnablePostBack="true" runat="server" OnClick="btnSearch_Click" ToolTip="查询">
 | 
				
			||||||
                                </f:Button>
 | 
					                                </f:Button>
 | 
				
			||||||
| 
						 | 
					@ -64,10 +71,17 @@
 | 
				
			||||||
                       
 | 
					                       
 | 
				
			||||||
                         <f:GroupField HeaderText="Test Package Schedule" TextAlign="Center" MinWidth="400px">
 | 
					                         <f:GroupField HeaderText="Test Package Schedule" TextAlign="Center" MinWidth="400px">
 | 
				
			||||||
                            <Columns>
 | 
					                            <Columns>
 | 
				
			||||||
                                <f:RenderField Width="200px" ColumnID="Test_Package_START" DataField="Test_Package_START" HeaderText="Test Package START"  TextAlign="Center"
 | 
					                                 <f:RenderField ColumnID="Installation" DataField="Installation" FieldType="String" HeaderText="Installation" TextAlign="Center"
 | 
				
			||||||
                                    FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd"/>
 | 
					                                    HeaderTextAlign="Center" Width="200px">
 | 
				
			||||||
                                <f:RenderField Width="200px" ColumnID="Test_Package_FINISH" DataField="Test_Package_FINISH" HeaderText="Test Package FINISH"  TextAlign="Center"
 | 
					                                </f:RenderField>
 | 
				
			||||||
                                    FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd"/>
 | 
					
 | 
				
			||||||
 | 
					                                <f:RenderField ColumnID="Debugging" DataField="Debugging" FieldType="String" HeaderText="Debugging" TextAlign="Center"
 | 
				
			||||||
 | 
					                                    HeaderTextAlign="Center" Width="200px">
 | 
				
			||||||
 | 
					                                </f:RenderField>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                                <f:RenderField ColumnID="Acceptancecheck" DataField="Acceptancecheck" FieldType="String" HeaderText="Acceptance check" TextAlign="Center"
 | 
				
			||||||
 | 
					                                    HeaderTextAlign="Center" Width="200px">
 | 
				
			||||||
 | 
					                                </f:RenderField>
 | 
				
			||||||
                            </Columns>
 | 
					                            </Columns>
 | 
				
			||||||
                        </f:GroupField>
 | 
					                        </f:GroupField>
 | 
				
			||||||
                       
 | 
					                       
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -40,22 +40,27 @@ namespace FineUIPro.Web.Transfer
 | 
				
			||||||
                strSql += " AND Firefighting like @Firefighting";
 | 
					                strSql += " AND Firefighting like @Firefighting";
 | 
				
			||||||
                listStr.Add(new SqlParameter("@Firefighting", "%" + this.txtFirefighting.Text.Trim() + "%"));
 | 
					                listStr.Add(new SqlParameter("@Firefighting", "%" + this.txtFirefighting.Text.Trim() + "%"));
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            if (!string.IsNullOrEmpty(txtStarTime.Text.Trim()))
 | 
					            //if (!string.IsNullOrEmpty(txtStarTime.Text.Trim()))
 | 
				
			||||||
            {
 | 
					            //{
 | 
				
			||||||
                strSql += " AND Test_Package_START >= @InspectionDateA";
 | 
					            //    strSql += " AND Test_Package_START >= @InspectionDateA";
 | 
				
			||||||
                listStr.Add(new SqlParameter("@InspectionDateA", Funs.GetNewDateTime(txtStarTime.Text.Trim())));
 | 
					            //    listStr.Add(new SqlParameter("@InspectionDateA", Funs.GetNewDateTime(txtStarTime.Text.Trim())));
 | 
				
			||||||
            }
 | 
					            //}
 | 
				
			||||||
            if (!string.IsNullOrEmpty(txtEndTime.Text.Trim()))
 | 
					            //if (!string.IsNullOrEmpty(txtEndTime.Text.Trim()))
 | 
				
			||||||
            {
 | 
					            //{
 | 
				
			||||||
                strSql += " AND Test_Package_START <= @InspectionDateZ";
 | 
					            //    strSql += " AND Test_Package_START <= @InspectionDateZ";
 | 
				
			||||||
                listStr.Add(new SqlParameter("@InspectionDateZ", Funs.GetNewDateTime(txtEndTime.Text.Trim())));
 | 
					            //    listStr.Add(new SqlParameter("@InspectionDateZ", Funs.GetNewDateTime(txtEndTime.Text.Trim())));
 | 
				
			||||||
            }
 | 
					            //}
 | 
				
			||||||
            if (!string.IsNullOrEmpty(this.txtSystem.Text.Trim()))
 | 
					            if (!string.IsNullOrEmpty(this.txtSystem.Text.Trim()))
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                strSql += " AND SystemName like @SystemName";
 | 
					                strSql += " AND SystemName like @SystemName";
 | 
				
			||||||
                listStr.Add(new SqlParameter("@SystemName", "%" + this.txtSystem.Text.Trim() + "%"));
 | 
					                listStr.Add(new SqlParameter("@SystemName", "%" + this.txtSystem.Text.Trim() + "%"));
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            if (!string.IsNullOrEmpty(ddStatus.SelectedValue))
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                strSql += " And FINAL_Status='" + ddStatus.SelectedValue + "' ";
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            strSql += " order by Firefighting "; 
 | 
					            strSql += " order by Firefighting "; 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            SqlParameter[] parameter = listStr.ToArray();
 | 
					            SqlParameter[] parameter = listStr.ToArray();
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -78,31 +78,13 @@ namespace FineUIPro.Web.Transfer
 | 
				
			||||||
        protected global::FineUIPro.TextBox txtSystem;
 | 
					        protected global::FineUIPro.TextBox txtSystem;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        /// <summary>
 | 
					        /// <summary>
 | 
				
			||||||
        /// txtStarTime 控件。
 | 
					        /// ddStatus 控件。
 | 
				
			||||||
        /// </summary>
 | 
					        /// </summary>
 | 
				
			||||||
        /// <remarks>
 | 
					        /// <remarks>
 | 
				
			||||||
        /// 自动生成的字段。
 | 
					        /// 自动生成的字段。
 | 
				
			||||||
        /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
 | 
					        /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
 | 
				
			||||||
        /// </remarks>
 | 
					        /// </remarks>
 | 
				
			||||||
        protected global::FineUIPro.DatePicker txtStarTime;
 | 
					        protected global::FineUIPro.DropDownList ddStatus;
 | 
				
			||||||
 | 
					 | 
				
			||||||
        /// <summary>
 | 
					 | 
				
			||||||
        /// Label1 控件。
 | 
					 | 
				
			||||||
        /// </summary>
 | 
					 | 
				
			||||||
        /// <remarks>
 | 
					 | 
				
			||||||
        /// 自动生成的字段。
 | 
					 | 
				
			||||||
        /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
 | 
					 | 
				
			||||||
        /// </remarks>
 | 
					 | 
				
			||||||
        protected global::FineUIPro.Label Label1;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        /// <summary>
 | 
					 | 
				
			||||||
        /// txtEndTime 控件。
 | 
					 | 
				
			||||||
        /// </summary>
 | 
					 | 
				
			||||||
        /// <remarks>
 | 
					 | 
				
			||||||
        /// 自动生成的字段。
 | 
					 | 
				
			||||||
        /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
 | 
					 | 
				
			||||||
        /// </remarks>
 | 
					 | 
				
			||||||
        protected global::FineUIPro.DatePicker txtEndTime;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
        /// <summary>
 | 
					        /// <summary>
 | 
				
			||||||
        /// btnSearch 控件。
 | 
					        /// btnSearch 控件。
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -168,30 +168,12 @@ namespace FineUIPro.Web.Transfer
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                for (int i = 1; i < ir; i++)
 | 
					                for (int i = 1; i < ir; i++)
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
                    string row4 = pds.Rows[i][4].ToString();
 | 
					                    string row4 = pds.Rows[i][0].ToString();
 | 
				
			||||||
                    if (!string.IsNullOrEmpty(row4))
 | 
					                    if (string.IsNullOrEmpty(row4))
 | 
				
			||||||
                    {
 | 
					                    {
 | 
				
			||||||
                        try
 | 
					                        result += (i + 2).ToString() + "," + "Firefighting" + "," + "不能为空!" + "|";
 | 
				
			||||||
                        {
 | 
					 | 
				
			||||||
                            DateTime date = Convert.ToDateTime(row4.Trim());
 | 
					 | 
				
			||||||
                        }
 | 
					 | 
				
			||||||
                        catch (Exception)
 | 
					 | 
				
			||||||
                        {
 | 
					 | 
				
			||||||
                            result += (i + 2).ToString() + "," + "Test Package START" + "," + "[" + row4 + "]错误!不是日期格式!" + "|";
 | 
					 | 
				
			||||||
                        }
 | 
					 | 
				
			||||||
                    }
 | 
					 | 
				
			||||||
                    string row5 = pds.Rows[i][5].ToString();
 | 
					 | 
				
			||||||
                    if (!string.IsNullOrEmpty(row5))
 | 
					 | 
				
			||||||
                    {
 | 
					 | 
				
			||||||
                        try
 | 
					 | 
				
			||||||
                        {
 | 
					 | 
				
			||||||
                            DateTime date = Convert.ToDateTime(row5.Trim());
 | 
					 | 
				
			||||||
                        }
 | 
					 | 
				
			||||||
                        catch (Exception)
 | 
					 | 
				
			||||||
                        {
 | 
					 | 
				
			||||||
                            result += (i + 2).ToString() + "," + "Test Package FINISH" + "," + "[" + row5 + "]错误!不是日期格式!" + "|";
 | 
					 | 
				
			||||||
                        }
 | 
					 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
 | 
					                    
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
                if (!string.IsNullOrEmpty(result))
 | 
					                if (!string.IsNullOrEmpty(result))
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
| 
						 | 
					@ -331,10 +313,10 @@ namespace FineUIPro.Web.Transfer
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
                    if (!string.IsNullOrEmpty(pds.Rows[i][0].ToString().Trim()))
 | 
					                    if (!string.IsNullOrEmpty(pds.Rows[i][0].ToString().Trim()))
 | 
				
			||||||
                    {
 | 
					                    {
 | 
				
			||||||
                        //查询第一列,没查到的情况下作导入处理
 | 
					                        ////查询第一列,没查到的情况下作导入处理
 | 
				
			||||||
                        var modelOnly = Funs.DB.Transfer_Firefighting.FirstOrDefault(x => x.Firefighting == pds.Rows[i][0].ToString().Trim() && x.ProjectId == CurrUser.LoginProjectId);
 | 
					                        //var modelOnly = Funs.DB.Transfer_Firefighting.FirstOrDefault(x => x.Firefighting == pds.Rows[i][0].ToString().Trim() && x.ProjectId == CurrUser.LoginProjectId);
 | 
				
			||||||
                        if (modelOnly == null)
 | 
					                        //if (modelOnly == null)
 | 
				
			||||||
                        {
 | 
					                        //{
 | 
				
			||||||
                            Model.Transfer_Firefighting model = new Model.Transfer_Firefighting();
 | 
					                            Model.Transfer_Firefighting model = new Model.Transfer_Firefighting();
 | 
				
			||||||
                            model.Id = Guid.NewGuid().ToString();
 | 
					                            model.Id = Guid.NewGuid().ToString();
 | 
				
			||||||
                            model.ProjectId = CurrUser.LoginProjectId;
 | 
					                            model.ProjectId = CurrUser.LoginProjectId;
 | 
				
			||||||
| 
						 | 
					@ -342,44 +324,72 @@ namespace FineUIPro.Web.Transfer
 | 
				
			||||||
                            model.SystemName = pds.Rows[i][1].ToString().Trim();
 | 
					                            model.SystemName = pds.Rows[i][1].ToString().Trim();
 | 
				
			||||||
                            model.Subsystem = pds.Rows[i][2].ToString().Trim();
 | 
					                            model.Subsystem = pds.Rows[i][2].ToString().Trim();
 | 
				
			||||||
                            model.Test_Package = pds.Rows[i][3].ToString().Trim();
 | 
					                            model.Test_Package = pds.Rows[i][3].ToString().Trim();
 | 
				
			||||||
                            DateTime t1, t2;
 | 
					 | 
				
			||||||
                            if (DateTime.TryParse(pds.Rows[i][4].ToString(), out t1) && !string.IsNullOrEmpty(pds.Rows[i][4].ToString()))
 | 
					 | 
				
			||||||
                                model.Test_Package_START = t1;
 | 
					 | 
				
			||||||
                            if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString()))
 | 
					 | 
				
			||||||
                                model.Test_Package_FINISH = t2;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
                            model.FINAL_Status = pds.Rows[i][6].ToString().Trim();
 | 
					                        var obj1 = model.Installation = pds.Rows[i][4].ToString().Trim();
 | 
				
			||||||
                            if (model.FINAL_Status.ToLower() == "finished")
 | 
					                        var obj2 = model.Debugging = pds.Rows[i][5].ToString().Trim();
 | 
				
			||||||
 | 
					                        var obj3 = model.Acceptancecheck = pds.Rows[i][6].ToString().Trim();
 | 
				
			||||||
 | 
					                        #region 判断状态
 | 
				
			||||||
 | 
					                        var listObj = new List<string>();
 | 
				
			||||||
 | 
					                        listObj.Add(obj1);
 | 
				
			||||||
 | 
					                        listObj.Add(obj2);
 | 
				
			||||||
 | 
					                        listObj.Add(obj3);
 | 
				
			||||||
 | 
					                        //全是NA或Completed 状态是Completed
 | 
				
			||||||
 | 
					                        if (listObj.Where(x => x == "NA" || x == "Completed").ToList().Count == 3)
 | 
				
			||||||
                        {
 | 
					                        {
 | 
				
			||||||
                                model.CompleteTime = DateTime.Now;
 | 
					                            model.FINAL_Status = "Completed";
 | 
				
			||||||
                            }
 | 
					 | 
				
			||||||
                            list.Add(model);
 | 
					                            list.Add(model);
 | 
				
			||||||
 | 
					                            continue;
 | 
				
			||||||
                        }
 | 
					                        }
 | 
				
			||||||
                        else
 | 
					 | 
				
			||||||
                        {
 | 
					 | 
				
			||||||
                            //修改
 | 
					 | 
				
			||||||
                            modelOnly.Firefighting = pds.Rows[i][0].ToString().Trim();
 | 
					 | 
				
			||||||
                            modelOnly.SystemName = pds.Rows[i][1].ToString().Trim();
 | 
					 | 
				
			||||||
                            modelOnly.Subsystem = pds.Rows[i][2].ToString().Trim();
 | 
					 | 
				
			||||||
                            modelOnly.Test_Package = pds.Rows[i][3].ToString().Trim();
 | 
					 | 
				
			||||||
                            DateTime t1, t2;
 | 
					 | 
				
			||||||
                            if (DateTime.TryParse(pds.Rows[i][4].ToString(), out t1) && !string.IsNullOrEmpty(pds.Rows[i][4].ToString()))
 | 
					 | 
				
			||||||
                                modelOnly.Test_Package_START = t1;
 | 
					 | 
				
			||||||
                            if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString()))
 | 
					 | 
				
			||||||
                                modelOnly.Test_Package_FINISH = t2;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
                            //更改前不是finished,更改后是finished的,才修改实际完成时间
 | 
					
 | 
				
			||||||
                            if (modelOnly.FINAL_Status.ToLower() != "finished" && pds.Rows[i][6].ToString().Trim() == "finished")
 | 
					                        //如果全是Not Start 就是 Not Start
 | 
				
			||||||
 | 
					                        if (listObj.Where(x => x == "Not Start").ToList().Count == 3)
 | 
				
			||||||
                        {
 | 
					                        {
 | 
				
			||||||
                                modelOnly.CompleteTime = DateTime.Now;
 | 
					                            model.FINAL_Status = "Not Start";
 | 
				
			||||||
 | 
					                            list.Add(model);
 | 
				
			||||||
 | 
					                            continue;
 | 
				
			||||||
                        }
 | 
					                        }
 | 
				
			||||||
                            modelOnly.FINAL_Status = pds.Rows[i][6].ToString().Trim();
 | 
					
 | 
				
			||||||
                            //if (modelOnly.FINAL_Status.ToLower() == "finished")
 | 
					                        //如果其中有一项是In progress 或Not Start 是 In progress
 | 
				
			||||||
                            //{
 | 
					                        if (listObj.Where(x => x == "In progress" || x == "Not Start").ToList().Count >= 1)
 | 
				
			||||||
                            //    modelOnly.CompleteTime = DateTime.Now;
 | 
					                        {
 | 
				
			||||||
 | 
					                            model.FINAL_Status = "In progress";
 | 
				
			||||||
 | 
					                            list.Add(model);
 | 
				
			||||||
 | 
					                            continue;
 | 
				
			||||||
 | 
					                        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                        model.FINAL_Status = "Not Start";
 | 
				
			||||||
 | 
					                        list.Add(model);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                        #endregion
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                        list.Add(model);
 | 
				
			||||||
 | 
					                        //}
 | 
				
			||||||
 | 
					                        //else
 | 
				
			||||||
 | 
					                        //{
 | 
				
			||||||
 | 
					                        //    //修改
 | 
				
			||||||
 | 
					                        //    modelOnly.Firefighting = pds.Rows[i][0].ToString().Trim();
 | 
				
			||||||
 | 
					                        //    modelOnly.SystemName = pds.Rows[i][1].ToString().Trim();
 | 
				
			||||||
 | 
					                        //    modelOnly.Subsystem = pds.Rows[i][2].ToString().Trim();
 | 
				
			||||||
 | 
					                        //    modelOnly.Test_Package = pds.Rows[i][3].ToString().Trim();
 | 
				
			||||||
 | 
					                        //    DateTime t1, t2;
 | 
				
			||||||
 | 
					                        //    if (DateTime.TryParse(pds.Rows[i][4].ToString(), out t1) && !string.IsNullOrEmpty(pds.Rows[i][4].ToString()))
 | 
				
			||||||
 | 
					                        //        modelOnly.Test_Package_START = t1;
 | 
				
			||||||
 | 
					                        //    if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString()))
 | 
				
			||||||
 | 
					                        //        modelOnly.Test_Package_FINISH = t2;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                        //    //更改前不是finished,更改后是finished的,才修改实际完成时间
 | 
				
			||||||
 | 
					                        //    if (modelOnly.FINAL_Status.ToLower() != "finished" && pds.Rows[i][6].ToString().Trim() == "finished")
 | 
				
			||||||
 | 
					                        //    {
 | 
				
			||||||
 | 
					                        //        modelOnly.CompleteTime = DateTime.Now;
 | 
				
			||||||
 | 
					                        //    }
 | 
				
			||||||
 | 
					                        //    modelOnly.FINAL_Status = pds.Rows[i][6].ToString().Trim();
 | 
				
			||||||
 | 
					                        //    //if (modelOnly.FINAL_Status.ToLower() == "finished")
 | 
				
			||||||
 | 
					                        //    //{
 | 
				
			||||||
 | 
					                        //    //    modelOnly.CompleteTime = DateTime.Now;
 | 
				
			||||||
 | 
					                        //    //}
 | 
				
			||||||
 | 
					                        //    Funs.DB.SubmitChanges();
 | 
				
			||||||
                        //}
 | 
					                        //}
 | 
				
			||||||
                            Funs.DB.SubmitChanges();
 | 
					 | 
				
			||||||
                        }
 | 
					 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
                if (list.Count > 0)
 | 
					                if (list.Count > 0)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -26,13 +26,12 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                                <f:TextBox runat="server" ID="txtSystem" Label="SYSTEM" LabelWidth="100px"  LabelAlign="Right"></f:TextBox>
 | 
					                                <f:TextBox runat="server" ID="txtSystem" Label="SYSTEM" LabelWidth="100px"  LabelAlign="Right"></f:TextBox>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                                <f:DatePicker runat="server" Label="Test_Package_START" ID="txtStarTime" LabelAlign="Right" LabelWidth="150px"
 | 
					                                  <f:DropDownList runat="server" ID="ddStatus" Label="Status">
 | 
				
			||||||
                                     Width="280px">
 | 
					                                    <f:ListItem Value="" Text="All" Selected="true"/>
 | 
				
			||||||
                                </f:DatePicker>
 | 
					                                    <f:ListItem Value="Not Start" Text="Not Start"/>
 | 
				
			||||||
                                <f:Label ID="Label1" runat="server" Text="至">
 | 
					                                    <f:ListItem Value="In progress" Text="In progress"/>
 | 
				
			||||||
                                </f:Label>
 | 
					                                    <f:ListItem Value="Completed" Text="Completed"/>
 | 
				
			||||||
                                <f:DatePicker runat="server" ID="txtEndTime" LabelAlign="Right" Width="150px">
 | 
					                                </f:DropDownList>
 | 
				
			||||||
                                </f:DatePicker>
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
                                <f:Button ID="btnSearch" Icon="SystemSearch" EnablePostBack="true" runat="server" OnClick="btnSearch_Click" ToolTip="查询">
 | 
					                                <f:Button ID="btnSearch" Icon="SystemSearch" EnablePostBack="true" runat="server" OnClick="btnSearch_Click" ToolTip="查询">
 | 
				
			||||||
                                </f:Button>
 | 
					                                </f:Button>
 | 
				
			||||||
| 
						 | 
					@ -64,10 +63,17 @@
 | 
				
			||||||
                       
 | 
					                       
 | 
				
			||||||
                         <f:GroupField HeaderText="Test Package Schedule" TextAlign="Center" MinWidth="400px">
 | 
					                         <f:GroupField HeaderText="Test Package Schedule" TextAlign="Center" MinWidth="400px">
 | 
				
			||||||
                            <Columns>
 | 
					                            <Columns>
 | 
				
			||||||
                                <f:RenderField Width="200px" ColumnID="Test_Package_START" DataField="Test_Package_START" HeaderText="Test Package START"  TextAlign="Center"
 | 
					                               <f:RenderField ColumnID="Ndt" DataField="Ndt" FieldType="String" HeaderText="NDT" TextAlign="Center"
 | 
				
			||||||
                                    FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd"/>
 | 
					                                    HeaderTextAlign="Center" Width="200px">
 | 
				
			||||||
                                <f:RenderField Width="200px" ColumnID="Test_Package_FINISH" DataField="Test_Package_FINISH" HeaderText="Test Package FINISH"  TextAlign="Center"
 | 
					                                </f:RenderField>
 | 
				
			||||||
                                    FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd"/>
 | 
					
 | 
				
			||||||
 | 
					                                <f:RenderField ColumnID="Flushing" DataField="Flushing" FieldType="String" HeaderText="Flushing" TextAlign="Center"
 | 
				
			||||||
 | 
					                                    HeaderTextAlign="Center" Width="200px">
 | 
				
			||||||
 | 
					                                </f:RenderField>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                                <f:RenderField ColumnID="RunningTest" DataField="RunningTest" FieldType="String" HeaderText="Running Test" TextAlign="Center"
 | 
				
			||||||
 | 
					                                    HeaderTextAlign="Center" Width="200px">
 | 
				
			||||||
 | 
					                                </f:RenderField>
 | 
				
			||||||
                            </Columns>
 | 
					                            </Columns>
 | 
				
			||||||
                        </f:GroupField>
 | 
					                        </f:GroupField>
 | 
				
			||||||
                       
 | 
					                       
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -41,22 +41,19 @@ namespace FineUIPro.Web.Transfer
 | 
				
			||||||
                strSql += " AND Plumbing like @Plumbing";
 | 
					                strSql += " AND Plumbing like @Plumbing";
 | 
				
			||||||
                listStr.Add(new SqlParameter("@Plumbing", "%" + this.txtPlumbing.Text.Trim() + "%"));
 | 
					                listStr.Add(new SqlParameter("@Plumbing", "%" + this.txtPlumbing.Text.Trim() + "%"));
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            if (!string.IsNullOrEmpty(txtStarTime.Text.Trim()))
 | 
					           
 | 
				
			||||||
            {
 | 
					 | 
				
			||||||
                strSql += " AND Test_Package_START >= @InspectionDateA";
 | 
					 | 
				
			||||||
                listStr.Add(new SqlParameter("@InspectionDateA", Funs.GetNewDateTime(txtStarTime.Text.Trim())));
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
            if (!string.IsNullOrEmpty(txtEndTime.Text.Trim()))
 | 
					 | 
				
			||||||
            {
 | 
					 | 
				
			||||||
                strSql += " AND Test_Package_START <= @InspectionDateZ";
 | 
					 | 
				
			||||||
                listStr.Add(new SqlParameter("@InspectionDateZ", Funs.GetNewDateTime(txtEndTime.Text.Trim())));
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
            if (!string.IsNullOrEmpty(this.txtSystem.Text.Trim()))
 | 
					            if (!string.IsNullOrEmpty(this.txtSystem.Text.Trim()))
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                strSql += " AND SystemName like @SystemName";
 | 
					                strSql += " AND SystemName like @SystemName";
 | 
				
			||||||
                listStr.Add(new SqlParameter("@SystemName", "%" + this.txtSystem.Text.Trim() + "%"));
 | 
					                listStr.Add(new SqlParameter("@SystemName", "%" + this.txtSystem.Text.Trim() + "%"));
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            if (!string.IsNullOrEmpty(ddStatus.SelectedValue))
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                strSql += " And FINAL_Status='" + ddStatus.SelectedValue + "' ";
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            strSql += " order by Plumbing ";
 | 
					            strSql += " order by Plumbing ";
 | 
				
			||||||
            SqlParameter[] parameter = listStr.ToArray();
 | 
					            SqlParameter[] parameter = listStr.ToArray();
 | 
				
			||||||
            DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
 | 
					            DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -78,31 +78,13 @@ namespace FineUIPro.Web.Transfer
 | 
				
			||||||
        protected global::FineUIPro.TextBox txtSystem;
 | 
					        protected global::FineUIPro.TextBox txtSystem;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        /// <summary>
 | 
					        /// <summary>
 | 
				
			||||||
        /// txtStarTime 控件。
 | 
					        /// ddStatus 控件。
 | 
				
			||||||
        /// </summary>
 | 
					        /// </summary>
 | 
				
			||||||
        /// <remarks>
 | 
					        /// <remarks>
 | 
				
			||||||
        /// 自动生成的字段。
 | 
					        /// 自动生成的字段。
 | 
				
			||||||
        /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
 | 
					        /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
 | 
				
			||||||
        /// </remarks>
 | 
					        /// </remarks>
 | 
				
			||||||
        protected global::FineUIPro.DatePicker txtStarTime;
 | 
					        protected global::FineUIPro.DropDownList ddStatus;
 | 
				
			||||||
 | 
					 | 
				
			||||||
        /// <summary>
 | 
					 | 
				
			||||||
        /// Label1 控件。
 | 
					 | 
				
			||||||
        /// </summary>
 | 
					 | 
				
			||||||
        /// <remarks>
 | 
					 | 
				
			||||||
        /// 自动生成的字段。
 | 
					 | 
				
			||||||
        /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
 | 
					 | 
				
			||||||
        /// </remarks>
 | 
					 | 
				
			||||||
        protected global::FineUIPro.Label Label1;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        /// <summary>
 | 
					 | 
				
			||||||
        /// txtEndTime 控件。
 | 
					 | 
				
			||||||
        /// </summary>
 | 
					 | 
				
			||||||
        /// <remarks>
 | 
					 | 
				
			||||||
        /// 自动生成的字段。
 | 
					 | 
				
			||||||
        /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
 | 
					 | 
				
			||||||
        /// </remarks>
 | 
					 | 
				
			||||||
        protected global::FineUIPro.DatePicker txtEndTime;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
        /// <summary>
 | 
					        /// <summary>
 | 
				
			||||||
        /// btnSearch 控件。
 | 
					        /// btnSearch 控件。
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -168,30 +168,12 @@ namespace FineUIPro.Web.Transfer
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                for (int i = 1; i < ir; i++)
 | 
					                for (int i = 1; i < ir; i++)
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
                    string row4 = pds.Rows[i][4].ToString();
 | 
					                    string row4 = pds.Rows[i][0].ToString();
 | 
				
			||||||
                    if (!string.IsNullOrEmpty(row4))
 | 
					                    if (string.IsNullOrEmpty(row4))
 | 
				
			||||||
                    {
 | 
					                    {
 | 
				
			||||||
                        try
 | 
					                        result += (i + 2).ToString() + "," + "Plumbing" + "," + "不能为空!" + "|";
 | 
				
			||||||
                        {
 | 
					 | 
				
			||||||
                            DateTime date = Convert.ToDateTime(row4.Trim());
 | 
					 | 
				
			||||||
                        }
 | 
					 | 
				
			||||||
                        catch (Exception)
 | 
					 | 
				
			||||||
                        {
 | 
					 | 
				
			||||||
                            result += (i + 2).ToString() + "," + "Test Package START" + "," + "[" + row4 + "]错误!不是日期格式!" + "|";
 | 
					 | 
				
			||||||
                        }
 | 
					 | 
				
			||||||
                    }
 | 
					 | 
				
			||||||
                    string row5 = pds.Rows[i][5].ToString();
 | 
					 | 
				
			||||||
                    if (!string.IsNullOrEmpty(row5))
 | 
					 | 
				
			||||||
                    {
 | 
					 | 
				
			||||||
                        try
 | 
					 | 
				
			||||||
                        {
 | 
					 | 
				
			||||||
                            DateTime date = Convert.ToDateTime(row5.Trim());
 | 
					 | 
				
			||||||
                        }
 | 
					 | 
				
			||||||
                        catch (Exception)
 | 
					 | 
				
			||||||
                        {
 | 
					 | 
				
			||||||
                            result += (i + 2).ToString() + "," + "Test Package FINISH" + "," + "[" + row5 + "]错误!不是日期格式!" + "|";
 | 
					 | 
				
			||||||
                        }
 | 
					 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
                if (!string.IsNullOrEmpty(result))
 | 
					                if (!string.IsNullOrEmpty(result))
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
| 
						 | 
					@ -332,10 +314,10 @@ namespace FineUIPro.Web.Transfer
 | 
				
			||||||
                    if (!string.IsNullOrEmpty(pds.Rows[i][0].ToString().Trim()))
 | 
					                    if (!string.IsNullOrEmpty(pds.Rows[i][0].ToString().Trim()))
 | 
				
			||||||
                    {
 | 
					                    {
 | 
				
			||||||
                        //查询第一列,没查到的情况下作导入处理
 | 
					                        //查询第一列,没查到的情况下作导入处理
 | 
				
			||||||
                        var modelOnly = Funs.DB.Transfer_Plumbing.FirstOrDefault(x => x.Plumbing == pds.Rows[i][0].ToString().Trim()
 | 
					                        //    var modelOnly = Funs.DB.Transfer_Plumbing.FirstOrDefault(x => x.Plumbing == pds.Rows[i][0].ToString().Trim()
 | 
				
			||||||
                    && x.ProjectId == CurrUser.LoginProjectId);
 | 
					                        //&& x.ProjectId == CurrUser.LoginProjectId);
 | 
				
			||||||
                        if (modelOnly == null)
 | 
					                        //    if (modelOnly == null)
 | 
				
			||||||
                        {
 | 
					                        //    {
 | 
				
			||||||
                        Model.Transfer_Plumbing model = new Model.Transfer_Plumbing();
 | 
					                        Model.Transfer_Plumbing model = new Model.Transfer_Plumbing();
 | 
				
			||||||
                        model.Id = Guid.NewGuid().ToString();
 | 
					                        model.Id = Guid.NewGuid().ToString();
 | 
				
			||||||
                        model.ProjectId = CurrUser.LoginProjectId;
 | 
					                        model.ProjectId = CurrUser.LoginProjectId;
 | 
				
			||||||
| 
						 | 
					@ -343,44 +325,72 @@ namespace FineUIPro.Web.Transfer
 | 
				
			||||||
                        model.SystemName = pds.Rows[i][1].ToString().Trim();
 | 
					                        model.SystemName = pds.Rows[i][1].ToString().Trim();
 | 
				
			||||||
                        model.Subsystem = pds.Rows[i][2].ToString().Trim();
 | 
					                        model.Subsystem = pds.Rows[i][2].ToString().Trim();
 | 
				
			||||||
                        model.Test_Package = pds.Rows[i][3].ToString().Trim();
 | 
					                        model.Test_Package = pds.Rows[i][3].ToString().Trim();
 | 
				
			||||||
                            DateTime t1, t2;
 | 
					                        var obj1 = model.Ndt = pds.Rows[i][4].ToString().Trim();
 | 
				
			||||||
                            if (DateTime.TryParse(pds.Rows[i][4].ToString(), out t1) && !string.IsNullOrEmpty(pds.Rows[i][4].ToString()))
 | 
					                        var obj2 = model.Flushing = pds.Rows[i][5].ToString().Trim();
 | 
				
			||||||
                                model.Test_Package_START = t1;
 | 
					                        var obj3 = model.RunningTest = pds.Rows[i][6].ToString().Trim();
 | 
				
			||||||
                            if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString()))
 | 
					                        #region 判断状态
 | 
				
			||||||
                                model.Test_Package_FINISH = t2;
 | 
					                        var listObj = new List<string>();
 | 
				
			||||||
 | 
					                        listObj.Add(obj1);
 | 
				
			||||||
                            model.FINAL_Status = pds.Rows[i][6].ToString().Trim();
 | 
					                        listObj.Add(obj2);
 | 
				
			||||||
                            if (model.FINAL_Status.ToLower() == "finished")
 | 
					                        listObj.Add(obj3);
 | 
				
			||||||
 | 
					                        //全是NA或Completed 状态是Completed
 | 
				
			||||||
 | 
					                        if (listObj.Where(x => x == "NA" || x == "Completed").ToList().Count == 3)
 | 
				
			||||||
                        {
 | 
					                        {
 | 
				
			||||||
                                model.CompleteTime = DateTime.Now;
 | 
					                            model.FINAL_Status = "Completed";
 | 
				
			||||||
                            }
 | 
					 | 
				
			||||||
                            list.Add(model);
 | 
					                            list.Add(model);
 | 
				
			||||||
 | 
					                            continue;
 | 
				
			||||||
                        }
 | 
					                        }
 | 
				
			||||||
                        else
 | 
					 | 
				
			||||||
                        {
 | 
					 | 
				
			||||||
                            //修改
 | 
					 | 
				
			||||||
                            modelOnly.Plumbing = pds.Rows[i][0].ToString().Trim();
 | 
					 | 
				
			||||||
                            modelOnly.SystemName = pds.Rows[i][1].ToString().Trim();
 | 
					 | 
				
			||||||
                            modelOnly.Subsystem = pds.Rows[i][2].ToString().Trim();
 | 
					 | 
				
			||||||
                            modelOnly.Test_Package = pds.Rows[i][3].ToString().Trim();
 | 
					 | 
				
			||||||
                            DateTime t1, t2;
 | 
					 | 
				
			||||||
                            if (DateTime.TryParse(pds.Rows[i][4].ToString(), out t1) && !string.IsNullOrEmpty(pds.Rows[i][4].ToString()))
 | 
					 | 
				
			||||||
                                modelOnly.Test_Package_START = t1;
 | 
					 | 
				
			||||||
                            if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString()))
 | 
					 | 
				
			||||||
                                modelOnly.Test_Package_FINISH = t2;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
                            //更改前不是finished,更改后是finished的,才修改实际完成时间
 | 
					
 | 
				
			||||||
                            if (modelOnly.FINAL_Status.ToLower() != "finished" && pds.Rows[i][6].ToString().Trim() == "finished")
 | 
					                        //如果全是Not Start 就是 Not Start
 | 
				
			||||||
 | 
					                        if (listObj.Where(x => x == "Not Start").ToList().Count == 3)
 | 
				
			||||||
                        {
 | 
					                        {
 | 
				
			||||||
                                modelOnly.CompleteTime = DateTime.Now;
 | 
					                            model.FINAL_Status = "Not Start";
 | 
				
			||||||
 | 
					                            list.Add(model);
 | 
				
			||||||
 | 
					                            continue;
 | 
				
			||||||
                        }
 | 
					                        }
 | 
				
			||||||
                            modelOnly.FINAL_Status = pds.Rows[i][6].ToString().Trim();
 | 
					
 | 
				
			||||||
                            //if (modelOnly.FINAL_Status.ToLower() == "finished")
 | 
					                        //如果其中有一项是In progress 或Not Start 是 In progress
 | 
				
			||||||
                            //{
 | 
					                        if (listObj.Where(x => x == "In progress" || x == "Not Start").ToList().Count >= 1)
 | 
				
			||||||
                            //    modelOnly.CompleteTime = DateTime.Now;
 | 
					                        {
 | 
				
			||||||
 | 
					                            model.FINAL_Status = "In progress";
 | 
				
			||||||
 | 
					                            list.Add(model);
 | 
				
			||||||
 | 
					                            continue;
 | 
				
			||||||
 | 
					                        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                        model.FINAL_Status = "Not Start";
 | 
				
			||||||
 | 
					                        list.Add(model);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                        #endregion
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                        list.Add(model);
 | 
				
			||||||
 | 
					                        //}
 | 
				
			||||||
 | 
					                        //else
 | 
				
			||||||
 | 
					                        //{
 | 
				
			||||||
 | 
					                        //    //修改
 | 
				
			||||||
 | 
					                        //    modelOnly.Plumbing = pds.Rows[i][0].ToString().Trim();
 | 
				
			||||||
 | 
					                        //    modelOnly.SystemName = pds.Rows[i][1].ToString().Trim();
 | 
				
			||||||
 | 
					                        //    modelOnly.Subsystem = pds.Rows[i][2].ToString().Trim();
 | 
				
			||||||
 | 
					                        //    modelOnly.Test_Package = pds.Rows[i][3].ToString().Trim();
 | 
				
			||||||
 | 
					                        //    DateTime t1, t2;
 | 
				
			||||||
 | 
					                        //    if (DateTime.TryParse(pds.Rows[i][4].ToString(), out t1) && !string.IsNullOrEmpty(pds.Rows[i][4].ToString()))
 | 
				
			||||||
 | 
					                        //        modelOnly.Test_Package_START = t1;
 | 
				
			||||||
 | 
					                        //    if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString()))
 | 
				
			||||||
 | 
					                        //        modelOnly.Test_Package_FINISH = t2;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                        //    //更改前不是finished,更改后是finished的,才修改实际完成时间
 | 
				
			||||||
 | 
					                        //    if (modelOnly.FINAL_Status.ToLower() != "finished" && pds.Rows[i][6].ToString().Trim() == "finished")
 | 
				
			||||||
 | 
					                        //    {
 | 
				
			||||||
 | 
					                        //        modelOnly.CompleteTime = DateTime.Now;
 | 
				
			||||||
 | 
					                        //    }
 | 
				
			||||||
 | 
					                        //    modelOnly.FINAL_Status = pds.Rows[i][6].ToString().Trim();
 | 
				
			||||||
 | 
					                        //    //if (modelOnly.FINAL_Status.ToLower() == "finished")
 | 
				
			||||||
 | 
					                        //    //{
 | 
				
			||||||
 | 
					                        //    //    modelOnly.CompleteTime = DateTime.Now;
 | 
				
			||||||
 | 
					                        //    //}
 | 
				
			||||||
 | 
					                        //    Funs.DB.SubmitChanges();
 | 
				
			||||||
                        //}
 | 
					                        //}
 | 
				
			||||||
                            Funs.DB.SubmitChanges();
 | 
					 | 
				
			||||||
                        }
 | 
					 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
                if (list.Count > 0)
 | 
					                if (list.Count > 0)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -26,13 +26,19 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                                <f:TextBox runat="server" ID="txtSystem" Label="SYSTEM" LabelWidth="100px"  LabelAlign="Right"></f:TextBox>
 | 
					                                <f:TextBox runat="server" ID="txtSystem" Label="SYSTEM" LabelWidth="100px"  LabelAlign="Right"></f:TextBox>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                                <f:DatePicker runat="server" Label="Test_Package_START" ID="txtStarTime" LabelAlign="Right" LabelWidth="150px"
 | 
					                                <f:DropDownList runat="server" ID="ddStatus" Label="Status">
 | 
				
			||||||
 | 
					                                    <f:ListItem Value="" Text="All" Selected="true"/>
 | 
				
			||||||
 | 
					                                    <f:ListItem Value="Not Start" Text="Not Start"/>
 | 
				
			||||||
 | 
					                                    <f:ListItem Value="In progress" Text="In progress"/>
 | 
				
			||||||
 | 
					                                    <f:ListItem Value="Completed" Text="Completed"/>
 | 
				
			||||||
 | 
					                                </f:DropDownList>
 | 
				
			||||||
 | 
					                               <%-- <f:DatePicker runat="server" Label="Test_Package_START" ID="txtStarTime" LabelAlign="Right" LabelWidth="150px"
 | 
				
			||||||
                                     Width="280px">
 | 
					                                     Width="280px">
 | 
				
			||||||
                                </f:DatePicker>
 | 
					                                </f:DatePicker>
 | 
				
			||||||
                                <f:Label ID="Label1" runat="server" Text="至">
 | 
					                                <f:Label ID="Label1" runat="server" Text="至">
 | 
				
			||||||
                                </f:Label>
 | 
					                                </f:Label>
 | 
				
			||||||
                                <f:DatePicker runat="server" ID="txtEndTime" LabelAlign="Right" Width="150px">
 | 
					                                <f:DatePicker runat="server" ID="txtEndTime" LabelAlign="Right" Width="150px">
 | 
				
			||||||
                                </f:DatePicker>
 | 
					                                </f:DatePicker>--%>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                                <f:Button ID="btnSearch" Icon="SystemSearch" EnablePostBack="true" runat="server" OnClick="btnSearch_Click" ToolTip="查询">
 | 
					                                <f:Button ID="btnSearch" Icon="SystemSearch" EnablePostBack="true" runat="server" OnClick="btnSearch_Click" ToolTip="查询">
 | 
				
			||||||
                                </f:Button>
 | 
					                                </f:Button>
 | 
				
			||||||
| 
						 | 
					@ -64,10 +70,21 @@
 | 
				
			||||||
                       
 | 
					                       
 | 
				
			||||||
                         <f:GroupField HeaderText="Test Package Schedule" TextAlign="Center" MinWidth="400px">
 | 
					                         <f:GroupField HeaderText="Test Package Schedule" TextAlign="Center" MinWidth="400px">
 | 
				
			||||||
                            <Columns>
 | 
					                            <Columns>
 | 
				
			||||||
                                <f:RenderField Width="200px" ColumnID="Test_Package_START" DataField="Test_Package_START" HeaderText="Test Package START"  TextAlign="Center"
 | 
					                                  <f:RenderField ColumnID="Installation" DataField="Installation" FieldType="String" HeaderText="Installation<br/> &Inspection Reocrd" TextAlign="Center"
 | 
				
			||||||
                                    FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd"/>
 | 
					                                    HeaderTextAlign="Center" Width="200px">
 | 
				
			||||||
                                <f:RenderField Width="200px" ColumnID="Test_Package_FINISH" DataField="Test_Package_FINISH" HeaderText="Test Package FINISH"  TextAlign="Center"
 | 
					                                </f:RenderField>
 | 
				
			||||||
                                    FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd"/>
 | 
					
 | 
				
			||||||
 | 
					                                  <f:RenderField ColumnID="Communication" DataField="Communication" FieldType="String" HeaderText="Communication<br/> test" TextAlign="Center"
 | 
				
			||||||
 | 
					                                    HeaderTextAlign="Center" Width="200px">
 | 
				
			||||||
 | 
					                                </f:RenderField>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                                  <f:RenderField ColumnID="CableLaying" DataField="CableLaying" FieldType="String" HeaderText="Cable Laying and<br/> Insulation Test<br/> Record" TextAlign="Center"
 | 
				
			||||||
 | 
					                                    HeaderTextAlign="Center" Width="200px">
 | 
				
			||||||
 | 
					                                </f:RenderField>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                                  <f:RenderField ColumnID="FunctionTest" DataField="FunctionTest" FieldType="String" HeaderText="Function Test" TextAlign="Center"
 | 
				
			||||||
 | 
					                                    HeaderTextAlign="Center" Width="200px">
 | 
				
			||||||
 | 
					                                </f:RenderField>
 | 
				
			||||||
                            </Columns>
 | 
					                            </Columns>
 | 
				
			||||||
                        </f:GroupField>
 | 
					                        </f:GroupField>
 | 
				
			||||||
                       
 | 
					                       
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -41,21 +41,25 @@ namespace FineUIPro.Web.Transfer
 | 
				
			||||||
                strSql += " AND Telecom like @Telecom";
 | 
					                strSql += " AND Telecom like @Telecom";
 | 
				
			||||||
                listStr.Add(new SqlParameter("@Telecom", "%" + this.txtTelecom.Text.Trim() + "%"));
 | 
					                listStr.Add(new SqlParameter("@Telecom", "%" + this.txtTelecom.Text.Trim() + "%"));
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            if (!string.IsNullOrEmpty(txtStarTime.Text.Trim()))
 | 
					            //if (!string.IsNullOrEmpty(txtStarTime.Text.Trim()))
 | 
				
			||||||
            {
 | 
					            //{
 | 
				
			||||||
                strSql += " AND Test_Package_START >= @InspectionDateA";
 | 
					            //    strSql += " AND Test_Package_START >= @InspectionDateA";
 | 
				
			||||||
                listStr.Add(new SqlParameter("@InspectionDateA", Funs.GetNewDateTime(txtStarTime.Text.Trim())));
 | 
					            //    listStr.Add(new SqlParameter("@InspectionDateA", Funs.GetNewDateTime(txtStarTime.Text.Trim())));
 | 
				
			||||||
            }
 | 
					            //}
 | 
				
			||||||
            if (!string.IsNullOrEmpty(txtEndTime.Text.Trim()))
 | 
					            //if (!string.IsNullOrEmpty(txtEndTime.Text.Trim()))
 | 
				
			||||||
            {
 | 
					            //{
 | 
				
			||||||
                strSql += " AND Test_Package_START <= @InspectionDateZ";
 | 
					            //    strSql += " AND Test_Package_START <= @InspectionDateZ";
 | 
				
			||||||
                listStr.Add(new SqlParameter("@InspectionDateZ", Funs.GetNewDateTime(txtEndTime.Text.Trim())));
 | 
					            //    listStr.Add(new SqlParameter("@InspectionDateZ", Funs.GetNewDateTime(txtEndTime.Text.Trim())));
 | 
				
			||||||
            }
 | 
					            //}
 | 
				
			||||||
            if (!string.IsNullOrEmpty(this.txtSystem.Text.Trim()))
 | 
					            if (!string.IsNullOrEmpty(this.txtSystem.Text.Trim()))
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                strSql += " AND SystemName like @SystemName";
 | 
					                strSql += " AND SystemName like @SystemName";
 | 
				
			||||||
                listStr.Add(new SqlParameter("@SystemName", "%" + this.txtSystem.Text.Trim() + "%"));
 | 
					                listStr.Add(new SqlParameter("@SystemName", "%" + this.txtSystem.Text.Trim() + "%"));
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					            if (!string.IsNullOrEmpty(ddStatus.SelectedValue))
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                strSql += " And FINAL_Status='" + ddStatus.SelectedValue + "' ";
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            strSql += " order by Telecom ";
 | 
					            strSql += " order by Telecom ";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -78,31 +78,13 @@ namespace FineUIPro.Web.Transfer
 | 
				
			||||||
        protected global::FineUIPro.TextBox txtSystem;
 | 
					        protected global::FineUIPro.TextBox txtSystem;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        /// <summary>
 | 
					        /// <summary>
 | 
				
			||||||
        /// txtStarTime 控件。
 | 
					        /// ddStatus 控件。
 | 
				
			||||||
        /// </summary>
 | 
					        /// </summary>
 | 
				
			||||||
        /// <remarks>
 | 
					        /// <remarks>
 | 
				
			||||||
        /// 自动生成的字段。
 | 
					        /// 自动生成的字段。
 | 
				
			||||||
        /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
 | 
					        /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
 | 
				
			||||||
        /// </remarks>
 | 
					        /// </remarks>
 | 
				
			||||||
        protected global::FineUIPro.DatePicker txtStarTime;
 | 
					        protected global::FineUIPro.DropDownList ddStatus;
 | 
				
			||||||
 | 
					 | 
				
			||||||
        /// <summary>
 | 
					 | 
				
			||||||
        /// Label1 控件。
 | 
					 | 
				
			||||||
        /// </summary>
 | 
					 | 
				
			||||||
        /// <remarks>
 | 
					 | 
				
			||||||
        /// 自动生成的字段。
 | 
					 | 
				
			||||||
        /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
 | 
					 | 
				
			||||||
        /// </remarks>
 | 
					 | 
				
			||||||
        protected global::FineUIPro.Label Label1;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        /// <summary>
 | 
					 | 
				
			||||||
        /// txtEndTime 控件。
 | 
					 | 
				
			||||||
        /// </summary>
 | 
					 | 
				
			||||||
        /// <remarks>
 | 
					 | 
				
			||||||
        /// 自动生成的字段。
 | 
					 | 
				
			||||||
        /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
 | 
					 | 
				
			||||||
        /// </remarks>
 | 
					 | 
				
			||||||
        protected global::FineUIPro.DatePicker txtEndTime;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
        /// <summary>
 | 
					        /// <summary>
 | 
				
			||||||
        /// btnSearch 控件。
 | 
					        /// btnSearch 控件。
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -130,7 +130,7 @@ namespace FineUIPro.Web.Transfer
 | 
				
			||||||
                oleDBConn.Close();
 | 
					                oleDBConn.Close();
 | 
				
			||||||
                oleDBConn.Dispose();
 | 
					                oleDBConn.Dispose();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                AddDatasetToSQL(ds.Tables[0], 7);
 | 
					                AddDatasetToSQL(ds.Tables[0], 8);
 | 
				
			||||||
                hdCheckResult.Text = "1";
 | 
					                hdCheckResult.Text = "1";
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            catch (Exception exc)
 | 
					            catch (Exception exc)
 | 
				
			||||||
| 
						 | 
					@ -168,30 +168,12 @@ namespace FineUIPro.Web.Transfer
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                for (int i = 1; i < ir; i++)
 | 
					                for (int i = 1; i < ir; i++)
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
                    string row4 = pds.Rows[i][4].ToString();
 | 
					                    string row4 = pds.Rows[i][0].ToString();
 | 
				
			||||||
                    if (!string.IsNullOrEmpty(row4))
 | 
					                    if (string.IsNullOrEmpty(row4))
 | 
				
			||||||
                    {
 | 
					                    {
 | 
				
			||||||
                        try
 | 
					                        result += (i + 2).ToString() + "," + "Telecom" + "," + "不能为空!" + "|";
 | 
				
			||||||
                        {
 | 
					 | 
				
			||||||
                            DateTime date = Convert.ToDateTime(row4.Trim());
 | 
					 | 
				
			||||||
                        }
 | 
					 | 
				
			||||||
                        catch (Exception)
 | 
					 | 
				
			||||||
                        {
 | 
					 | 
				
			||||||
                            result += (i + 2).ToString() + "," + "Test Package START" + "," + "[" + row4 + "]错误!不是日期格式!" + "|";
 | 
					 | 
				
			||||||
                        }
 | 
					 | 
				
			||||||
                    }
 | 
					 | 
				
			||||||
                    string row5 = pds.Rows[i][5].ToString();
 | 
					 | 
				
			||||||
                    if (!string.IsNullOrEmpty(row5))
 | 
					 | 
				
			||||||
                    {
 | 
					 | 
				
			||||||
                        try
 | 
					 | 
				
			||||||
                        {
 | 
					 | 
				
			||||||
                            DateTime date = Convert.ToDateTime(row5.Trim());
 | 
					 | 
				
			||||||
                        }
 | 
					 | 
				
			||||||
                        catch (Exception)
 | 
					 | 
				
			||||||
                        {
 | 
					 | 
				
			||||||
                            result += (i + 2).ToString() + "," + "Test Package FINISH" + "," + "[" + row5 + "]错误!不是日期格式!" + "|";
 | 
					 | 
				
			||||||
                        }
 | 
					 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
                if (!string.IsNullOrEmpty(result))
 | 
					                if (!string.IsNullOrEmpty(result))
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
| 
						 | 
					@ -298,7 +280,7 @@ namespace FineUIPro.Web.Transfer
 | 
				
			||||||
                oleDBConn.Close();
 | 
					                oleDBConn.Close();
 | 
				
			||||||
                oleDBConn.Dispose();
 | 
					                oleDBConn.Dispose();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                AddDatasetToSQL2(ds.Tables[0], 7);
 | 
					                AddDatasetToSQL2(ds.Tables[0], 8);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            catch (Exception ex)
 | 
					            catch (Exception ex)
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
| 
						 | 
					@ -331,11 +313,11 @@ namespace FineUIPro.Web.Transfer
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
                    if (!string.IsNullOrEmpty(pds.Rows[i][0].ToString().Trim()))
 | 
					                    if (!string.IsNullOrEmpty(pds.Rows[i][0].ToString().Trim()))
 | 
				
			||||||
                    {
 | 
					                    {
 | 
				
			||||||
                        //查询第一列,没查到的情况下作导入处理
 | 
					                        //    //查询第一列,没查到的情况下作导入处理
 | 
				
			||||||
                        var modelOnly = Funs.DB.Transfer_Telecom.FirstOrDefault(x => x.Telecom == pds.Rows[i][0].ToString().Trim()
 | 
					                        //    var modelOnly = Funs.DB.Transfer_Telecom.FirstOrDefault(x => x.Telecom == pds.Rows[i][0].ToString().Trim()
 | 
				
			||||||
                    && x.ProjectId == CurrUser.LoginProjectId);
 | 
					                        //&& x.ProjectId == CurrUser.LoginProjectId);
 | 
				
			||||||
                        if (modelOnly == null)
 | 
					                        //    if (modelOnly == null)
 | 
				
			||||||
                        {
 | 
					                        //    {
 | 
				
			||||||
                        Model.Transfer_Telecom model = new Model.Transfer_Telecom();
 | 
					                        Model.Transfer_Telecom model = new Model.Transfer_Telecom();
 | 
				
			||||||
                        model.Id = Guid.NewGuid().ToString();
 | 
					                        model.Id = Guid.NewGuid().ToString();
 | 
				
			||||||
                        model.ProjectId = CurrUser.LoginProjectId;
 | 
					                        model.ProjectId = CurrUser.LoginProjectId;
 | 
				
			||||||
| 
						 | 
					@ -343,44 +325,75 @@ namespace FineUIPro.Web.Transfer
 | 
				
			||||||
                        model.SystemName = pds.Rows[i][1].ToString().Trim();
 | 
					                        model.SystemName = pds.Rows[i][1].ToString().Trim();
 | 
				
			||||||
                        model.Subsystem = pds.Rows[i][2].ToString().Trim();
 | 
					                        model.Subsystem = pds.Rows[i][2].ToString().Trim();
 | 
				
			||||||
                        model.Test_Package = pds.Rows[i][3].ToString().Trim();
 | 
					                        model.Test_Package = pds.Rows[i][3].ToString().Trim();
 | 
				
			||||||
                            DateTime t1, t2;
 | 
					                        var obj1 = model.Installation = pds.Rows[i][4].ToString().Trim();
 | 
				
			||||||
                            if (DateTime.TryParse(pds.Rows[i][4].ToString(), out t1) && !string.IsNullOrEmpty(pds.Rows[i][4].ToString()))
 | 
					                        var obj2 = model.Communication = pds.Rows[i][5].ToString().Trim();
 | 
				
			||||||
                                model.Test_Package_START = t1;
 | 
					                        var obj3 = model.CableLaying = pds.Rows[i][6].ToString().Trim();
 | 
				
			||||||
                            if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString()))
 | 
					                        var obj4 = model.FunctionTest = pds.Rows[i][7].ToString().Trim();
 | 
				
			||||||
                                model.Test_Package_FINISH = t2;
 | 
					                        #region 判断状态
 | 
				
			||||||
 | 
					                        var listObj = new List<string>();
 | 
				
			||||||
                            model.FINAL_Status = pds.Rows[i][6].ToString().Trim();
 | 
					                        listObj.Add(obj1);
 | 
				
			||||||
                            if (model.FINAL_Status.ToLower() == "finished")
 | 
					                        listObj.Add(obj2);
 | 
				
			||||||
 | 
					                        listObj.Add(obj3);
 | 
				
			||||||
 | 
					                        listObj.Add(obj4);
 | 
				
			||||||
 | 
					                        //全是NA或Completed 状态是Completed
 | 
				
			||||||
 | 
					                        if (listObj.Where(x => x == "NA" || x == "Completed").ToList().Count == 4)
 | 
				
			||||||
                        {
 | 
					                        {
 | 
				
			||||||
                                model.CompleteTime = DateTime.Now;
 | 
					                            model.FINAL_Status = "Completed";
 | 
				
			||||||
                            }
 | 
					 | 
				
			||||||
                            list.Add(model);
 | 
					                            list.Add(model);
 | 
				
			||||||
 | 
					                            continue;
 | 
				
			||||||
                        }
 | 
					                        }
 | 
				
			||||||
                        else
 | 
					 | 
				
			||||||
                        {
 | 
					 | 
				
			||||||
                            //修改
 | 
					 | 
				
			||||||
                            modelOnly.Telecom = pds.Rows[i][0].ToString().Trim();
 | 
					 | 
				
			||||||
                            modelOnly.SystemName = pds.Rows[i][1].ToString().Trim();
 | 
					 | 
				
			||||||
                            modelOnly.Subsystem = pds.Rows[i][2].ToString().Trim();
 | 
					 | 
				
			||||||
                            modelOnly.Test_Package = pds.Rows[i][3].ToString().Trim();
 | 
					 | 
				
			||||||
                            DateTime t1, t2;
 | 
					 | 
				
			||||||
                            if (DateTime.TryParse(pds.Rows[i][4].ToString(), out t1) && !string.IsNullOrEmpty(pds.Rows[i][4].ToString()))
 | 
					 | 
				
			||||||
                                modelOnly.Test_Package_START = t1;
 | 
					 | 
				
			||||||
                            if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString()))
 | 
					 | 
				
			||||||
                                modelOnly.Test_Package_FINISH = t2;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
                            //更改前不是finished,更改后是finished的,才修改实际完成时间
 | 
					
 | 
				
			||||||
                            if (modelOnly.FINAL_Status.ToLower() != "finished" && pds.Rows[i][6].ToString().Trim() == "finished")
 | 
					                        //如果全是Not Start 就是 Not Start
 | 
				
			||||||
 | 
					                        if (listObj.Where(x => x == "Not Start").ToList().Count == 4)
 | 
				
			||||||
                        {
 | 
					                        {
 | 
				
			||||||
                                modelOnly.CompleteTime = DateTime.Now;
 | 
					                            model.FINAL_Status = "Not Start";
 | 
				
			||||||
 | 
					                            list.Add(model);
 | 
				
			||||||
 | 
					                            continue;
 | 
				
			||||||
                        }
 | 
					                        }
 | 
				
			||||||
                            modelOnly.FINAL_Status = pds.Rows[i][6].ToString().Trim();
 | 
					
 | 
				
			||||||
                            //if (modelOnly.FINAL_Status.ToLower() == "finished")
 | 
					                        //如果其中有一项是In progress 或Not Start 是 In progress
 | 
				
			||||||
                            //{
 | 
					                        if (listObj.Where(x => x == "In progress" || x == "Not Start").ToList().Count >= 1)
 | 
				
			||||||
                            //    modelOnly.CompleteTime = DateTime.Now;
 | 
					                        {
 | 
				
			||||||
 | 
					                            model.FINAL_Status = "In progress";
 | 
				
			||||||
 | 
					                            list.Add(model);
 | 
				
			||||||
 | 
					                            continue;
 | 
				
			||||||
 | 
					                        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                        model.FINAL_Status = "Not Start";
 | 
				
			||||||
 | 
					                        list.Add(model);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                        #endregion
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                        list.Add(model);
 | 
				
			||||||
 | 
					                        //}
 | 
				
			||||||
 | 
					                        //else
 | 
				
			||||||
 | 
					                        //{
 | 
				
			||||||
 | 
					                        //    //修改
 | 
				
			||||||
 | 
					                        //    modelOnly.Telecom = pds.Rows[i][0].ToString().Trim();
 | 
				
			||||||
 | 
					                        //    modelOnly.SystemName = pds.Rows[i][1].ToString().Trim();
 | 
				
			||||||
 | 
					                        //    modelOnly.Subsystem = pds.Rows[i][2].ToString().Trim();
 | 
				
			||||||
 | 
					                        //    modelOnly.Test_Package = pds.Rows[i][3].ToString().Trim();
 | 
				
			||||||
 | 
					                        //    DateTime t1, t2;
 | 
				
			||||||
 | 
					                        //    if (DateTime.TryParse(pds.Rows[i][4].ToString(), out t1) && !string.IsNullOrEmpty(pds.Rows[i][4].ToString()))
 | 
				
			||||||
 | 
					                        //        modelOnly.Test_Package_START = t1;
 | 
				
			||||||
 | 
					                        //    if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString()))
 | 
				
			||||||
 | 
					                        //        modelOnly.Test_Package_FINISH = t2;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                        //    //更改前不是finished,更改后是finished的,才修改实际完成时间
 | 
				
			||||||
 | 
					                        //    if (modelOnly.FINAL_Status.ToLower() != "finished" && pds.Rows[i][6].ToString().Trim() == "finished")
 | 
				
			||||||
 | 
					                        //    {
 | 
				
			||||||
 | 
					                        //        modelOnly.CompleteTime = DateTime.Now;
 | 
				
			||||||
 | 
					                        //    }
 | 
				
			||||||
 | 
					                        //    modelOnly.FINAL_Status = pds.Rows[i][6].ToString().Trim();
 | 
				
			||||||
 | 
					                        //    //if (modelOnly.FINAL_Status.ToLower() == "finished")
 | 
				
			||||||
 | 
					                        //    //{
 | 
				
			||||||
 | 
					                        //    //    modelOnly.CompleteTime = DateTime.Now;
 | 
				
			||||||
 | 
					                        //    //}
 | 
				
			||||||
 | 
					                        //    Funs.DB.SubmitChanges();
 | 
				
			||||||
                        //}
 | 
					                        //}
 | 
				
			||||||
                            Funs.DB.SubmitChanges();
 | 
					 | 
				
			||||||
                        }
 | 
					 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
                if (list.Count > 0)
 | 
					                if (list.Count > 0)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -391581,6 +391581,12 @@ namespace Model
 | 
				
			||||||
		
 | 
							
 | 
				
			||||||
		private System.Nullable<System.DateTime> _CompleteTime;
 | 
							private System.Nullable<System.DateTime> _CompleteTime;
 | 
				
			||||||
		
 | 
							
 | 
				
			||||||
 | 
							private string _Installation;
 | 
				
			||||||
 | 
							
 | 
				
			||||||
 | 
							private string _Debugging;
 | 
				
			||||||
 | 
							
 | 
				
			||||||
 | 
							private string _Acceptancecheck;
 | 
				
			||||||
 | 
							
 | 
				
			||||||
    #region 可扩展性方法定义
 | 
					    #region 可扩展性方法定义
 | 
				
			||||||
    partial void OnLoaded();
 | 
					    partial void OnLoaded();
 | 
				
			||||||
    partial void OnValidate(System.Data.Linq.ChangeAction action);
 | 
					    partial void OnValidate(System.Data.Linq.ChangeAction action);
 | 
				
			||||||
| 
						 | 
					@ -391605,6 +391611,12 @@ namespace Model
 | 
				
			||||||
    partial void OnFINAL_StatusChanged();
 | 
					    partial void OnFINAL_StatusChanged();
 | 
				
			||||||
    partial void OnCompleteTimeChanging(System.Nullable<System.DateTime> value);
 | 
					    partial void OnCompleteTimeChanging(System.Nullable<System.DateTime> value);
 | 
				
			||||||
    partial void OnCompleteTimeChanged();
 | 
					    partial void OnCompleteTimeChanged();
 | 
				
			||||||
 | 
					    partial void OnInstallationChanging(string value);
 | 
				
			||||||
 | 
					    partial void OnInstallationChanged();
 | 
				
			||||||
 | 
					    partial void OnDebuggingChanging(string value);
 | 
				
			||||||
 | 
					    partial void OnDebuggingChanged();
 | 
				
			||||||
 | 
					    partial void OnAcceptancecheckChanging(string value);
 | 
				
			||||||
 | 
					    partial void OnAcceptancecheckChanged();
 | 
				
			||||||
    #endregion
 | 
					    #endregion
 | 
				
			||||||
		
 | 
							
 | 
				
			||||||
		public Transfer_Firefighting()
 | 
							public Transfer_Firefighting()
 | 
				
			||||||
| 
						 | 
					@ -391812,6 +391824,66 @@ namespace Model
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		
 | 
							
 | 
				
			||||||
 | 
							[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Installation", DbType="NVarChar(50)")]
 | 
				
			||||||
 | 
							public string Installation
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								get
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									return this._Installation;
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								set
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									if ((this._Installation != value))
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										this.OnInstallationChanging(value);
 | 
				
			||||||
 | 
										this.SendPropertyChanging();
 | 
				
			||||||
 | 
										this._Installation = value;
 | 
				
			||||||
 | 
										this.SendPropertyChanged("Installation");
 | 
				
			||||||
 | 
										this.OnInstallationChanged();
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							
 | 
				
			||||||
 | 
							[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Debugging", DbType="NVarChar(50)")]
 | 
				
			||||||
 | 
							public string Debugging
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								get
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									return this._Debugging;
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								set
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									if ((this._Debugging != value))
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										this.OnDebuggingChanging(value);
 | 
				
			||||||
 | 
										this.SendPropertyChanging();
 | 
				
			||||||
 | 
										this._Debugging = value;
 | 
				
			||||||
 | 
										this.SendPropertyChanged("Debugging");
 | 
				
			||||||
 | 
										this.OnDebuggingChanged();
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							
 | 
				
			||||||
 | 
							[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Acceptancecheck", DbType="NVarChar(50)")]
 | 
				
			||||||
 | 
							public string Acceptancecheck
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								get
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									return this._Acceptancecheck;
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								set
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									if ((this._Acceptancecheck != value))
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										this.OnAcceptancecheckChanging(value);
 | 
				
			||||||
 | 
										this.SendPropertyChanging();
 | 
				
			||||||
 | 
										this._Acceptancecheck = value;
 | 
				
			||||||
 | 
										this.SendPropertyChanged("Acceptancecheck");
 | 
				
			||||||
 | 
										this.OnAcceptancecheckChanged();
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							
 | 
				
			||||||
		public event PropertyChangingEventHandler PropertyChanging;
 | 
							public event PropertyChangingEventHandler PropertyChanging;
 | 
				
			||||||
		
 | 
							
 | 
				
			||||||
		public event PropertyChangedEventHandler PropertyChanged;
 | 
							public event PropertyChangedEventHandler PropertyChanged;
 | 
				
			||||||
| 
						 | 
					@ -393451,6 +393523,12 @@ namespace Model
 | 
				
			||||||
		
 | 
							
 | 
				
			||||||
		private System.Nullable<System.DateTime> _CompleteTime;
 | 
							private System.Nullable<System.DateTime> _CompleteTime;
 | 
				
			||||||
		
 | 
							
 | 
				
			||||||
 | 
							private string _Ndt;
 | 
				
			||||||
 | 
							
 | 
				
			||||||
 | 
							private string _Flushing;
 | 
				
			||||||
 | 
							
 | 
				
			||||||
 | 
							private string _RunningTest;
 | 
				
			||||||
 | 
							
 | 
				
			||||||
    #region 可扩展性方法定义
 | 
					    #region 可扩展性方法定义
 | 
				
			||||||
    partial void OnLoaded();
 | 
					    partial void OnLoaded();
 | 
				
			||||||
    partial void OnValidate(System.Data.Linq.ChangeAction action);
 | 
					    partial void OnValidate(System.Data.Linq.ChangeAction action);
 | 
				
			||||||
| 
						 | 
					@ -393475,6 +393553,12 @@ namespace Model
 | 
				
			||||||
    partial void OnFINAL_StatusChanged();
 | 
					    partial void OnFINAL_StatusChanged();
 | 
				
			||||||
    partial void OnCompleteTimeChanging(System.Nullable<System.DateTime> value);
 | 
					    partial void OnCompleteTimeChanging(System.Nullable<System.DateTime> value);
 | 
				
			||||||
    partial void OnCompleteTimeChanged();
 | 
					    partial void OnCompleteTimeChanged();
 | 
				
			||||||
 | 
					    partial void OnNdtChanging(string value);
 | 
				
			||||||
 | 
					    partial void OnNdtChanged();
 | 
				
			||||||
 | 
					    partial void OnFlushingChanging(string value);
 | 
				
			||||||
 | 
					    partial void OnFlushingChanged();
 | 
				
			||||||
 | 
					    partial void OnRunningTestChanging(string value);
 | 
				
			||||||
 | 
					    partial void OnRunningTestChanged();
 | 
				
			||||||
    #endregion
 | 
					    #endregion
 | 
				
			||||||
		
 | 
							
 | 
				
			||||||
		public Transfer_Plumbing()
 | 
							public Transfer_Plumbing()
 | 
				
			||||||
| 
						 | 
					@ -393682,6 +393766,66 @@ namespace Model
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		
 | 
							
 | 
				
			||||||
 | 
							[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Ndt", DbType="NVarChar(50)")]
 | 
				
			||||||
 | 
							public string Ndt
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								get
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									return this._Ndt;
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								set
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									if ((this._Ndt != value))
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										this.OnNdtChanging(value);
 | 
				
			||||||
 | 
										this.SendPropertyChanging();
 | 
				
			||||||
 | 
										this._Ndt = value;
 | 
				
			||||||
 | 
										this.SendPropertyChanged("Ndt");
 | 
				
			||||||
 | 
										this.OnNdtChanged();
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							
 | 
				
			||||||
 | 
							[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Flushing", DbType="NVarChar(50)")]
 | 
				
			||||||
 | 
							public string Flushing
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								get
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									return this._Flushing;
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								set
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									if ((this._Flushing != value))
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										this.OnFlushingChanging(value);
 | 
				
			||||||
 | 
										this.SendPropertyChanging();
 | 
				
			||||||
 | 
										this._Flushing = value;
 | 
				
			||||||
 | 
										this.SendPropertyChanged("Flushing");
 | 
				
			||||||
 | 
										this.OnFlushingChanged();
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							
 | 
				
			||||||
 | 
							[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RunningTest", DbType="NVarChar(50)")]
 | 
				
			||||||
 | 
							public string RunningTest
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								get
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									return this._RunningTest;
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								set
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									if ((this._RunningTest != value))
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										this.OnRunningTestChanging(value);
 | 
				
			||||||
 | 
										this.SendPropertyChanging();
 | 
				
			||||||
 | 
										this._RunningTest = value;
 | 
				
			||||||
 | 
										this.SendPropertyChanged("RunningTest");
 | 
				
			||||||
 | 
										this.OnRunningTestChanged();
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							
 | 
				
			||||||
		public event PropertyChangingEventHandler PropertyChanging;
 | 
							public event PropertyChangingEventHandler PropertyChanging;
 | 
				
			||||||
		
 | 
							
 | 
				
			||||||
		public event PropertyChangedEventHandler PropertyChanged;
 | 
							public event PropertyChangedEventHandler PropertyChanged;
 | 
				
			||||||
| 
						 | 
					@ -395801,6 +395945,14 @@ namespace Model
 | 
				
			||||||
		
 | 
							
 | 
				
			||||||
		private System.Nullable<System.DateTime> _CompleteTime;
 | 
							private System.Nullable<System.DateTime> _CompleteTime;
 | 
				
			||||||
		
 | 
							
 | 
				
			||||||
 | 
							private string _Installation;
 | 
				
			||||||
 | 
							
 | 
				
			||||||
 | 
							private string _Communication;
 | 
				
			||||||
 | 
							
 | 
				
			||||||
 | 
							private string _CableLaying;
 | 
				
			||||||
 | 
							
 | 
				
			||||||
 | 
							private string _FunctionTest;
 | 
				
			||||||
 | 
							
 | 
				
			||||||
    #region 可扩展性方法定义
 | 
					    #region 可扩展性方法定义
 | 
				
			||||||
    partial void OnLoaded();
 | 
					    partial void OnLoaded();
 | 
				
			||||||
    partial void OnValidate(System.Data.Linq.ChangeAction action);
 | 
					    partial void OnValidate(System.Data.Linq.ChangeAction action);
 | 
				
			||||||
| 
						 | 
					@ -395825,6 +395977,14 @@ namespace Model
 | 
				
			||||||
    partial void OnFINAL_StatusChanged();
 | 
					    partial void OnFINAL_StatusChanged();
 | 
				
			||||||
    partial void OnCompleteTimeChanging(System.Nullable<System.DateTime> value);
 | 
					    partial void OnCompleteTimeChanging(System.Nullable<System.DateTime> value);
 | 
				
			||||||
    partial void OnCompleteTimeChanged();
 | 
					    partial void OnCompleteTimeChanged();
 | 
				
			||||||
 | 
					    partial void OnInstallationChanging(string value);
 | 
				
			||||||
 | 
					    partial void OnInstallationChanged();
 | 
				
			||||||
 | 
					    partial void OnCommunicationChanging(string value);
 | 
				
			||||||
 | 
					    partial void OnCommunicationChanged();
 | 
				
			||||||
 | 
					    partial void OnCableLayingChanging(string value);
 | 
				
			||||||
 | 
					    partial void OnCableLayingChanged();
 | 
				
			||||||
 | 
					    partial void OnFunctionTestChanging(string value);
 | 
				
			||||||
 | 
					    partial void OnFunctionTestChanged();
 | 
				
			||||||
    #endregion
 | 
					    #endregion
 | 
				
			||||||
		
 | 
							
 | 
				
			||||||
		public Transfer_Telecom()
 | 
							public Transfer_Telecom()
 | 
				
			||||||
| 
						 | 
					@ -396032,6 +396192,86 @@ namespace Model
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		
 | 
							
 | 
				
			||||||
 | 
							[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Installation", DbType="NVarChar(50)")]
 | 
				
			||||||
 | 
							public string Installation
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								get
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									return this._Installation;
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								set
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									if ((this._Installation != value))
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										this.OnInstallationChanging(value);
 | 
				
			||||||
 | 
										this.SendPropertyChanging();
 | 
				
			||||||
 | 
										this._Installation = value;
 | 
				
			||||||
 | 
										this.SendPropertyChanged("Installation");
 | 
				
			||||||
 | 
										this.OnInstallationChanged();
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							
 | 
				
			||||||
 | 
							[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Communication", DbType="NVarChar(50)")]
 | 
				
			||||||
 | 
							public string Communication
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								get
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									return this._Communication;
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								set
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									if ((this._Communication != value))
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										this.OnCommunicationChanging(value);
 | 
				
			||||||
 | 
										this.SendPropertyChanging();
 | 
				
			||||||
 | 
										this._Communication = value;
 | 
				
			||||||
 | 
										this.SendPropertyChanged("Communication");
 | 
				
			||||||
 | 
										this.OnCommunicationChanged();
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							
 | 
				
			||||||
 | 
							[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CableLaying", DbType="NVarChar(50)")]
 | 
				
			||||||
 | 
							public string CableLaying
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								get
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									return this._CableLaying;
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								set
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									if ((this._CableLaying != value))
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										this.OnCableLayingChanging(value);
 | 
				
			||||||
 | 
										this.SendPropertyChanging();
 | 
				
			||||||
 | 
										this._CableLaying = value;
 | 
				
			||||||
 | 
										this.SendPropertyChanged("CableLaying");
 | 
				
			||||||
 | 
										this.OnCableLayingChanged();
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							
 | 
				
			||||||
 | 
							[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FunctionTest", DbType="NVarChar(50)")]
 | 
				
			||||||
 | 
							public string FunctionTest
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								get
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									return this._FunctionTest;
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								set
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									if ((this._FunctionTest != value))
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										this.OnFunctionTestChanging(value);
 | 
				
			||||||
 | 
										this.SendPropertyChanging();
 | 
				
			||||||
 | 
										this._FunctionTest = value;
 | 
				
			||||||
 | 
										this.SendPropertyChanged("FunctionTest");
 | 
				
			||||||
 | 
										this.OnFunctionTestChanged();
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							
 | 
				
			||||||
		public event PropertyChangingEventHandler PropertyChanging;
 | 
							public event PropertyChangingEventHandler PropertyChanging;
 | 
				
			||||||
		
 | 
							
 | 
				
			||||||
		public event PropertyChangedEventHandler PropertyChanged;
 | 
							public event PropertyChangedEventHandler PropertyChanged;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue