コード例 #1
0
ファイル: Bll_Road_TestRef.cs プロジェクト: youthjoy/hferp
 /// <summary>
 /// 添加检测参数模板数据
 /// </summary>
 /// <param name="rt"></param>
 /// <returns></returns>
 public int AddRoadTestRef(Road_TestRef rt)
 {
     return Instance.Add(rt);
 }
コード例 #2
0
ファイル: Bll_Road_TestRef.cs プロジェクト: youthjoy/hferp
 /// <summary>
 /// 逻辑删除检测参数模板数据
 /// </summary>
 /// <param name="rt"></param>
 /// <returns></returns>
 public int DeleteRoadTestRef(Road_TestRef rt)
 {
     rt.Stat = 1;
     return Instance.Update(rt);
 }
コード例 #3
0
ファイル: Bll_Road_TestRef.cs プロジェクト: youthjoy/hferp
 /// <summary>
 /// 更新检测参数模板数据
 /// </summary>
 /// <param name="rt"></param>
 /// <returns></returns>
 public int UpdateRoadTestRef(Road_TestRef rt)
 {
     return Instance.Update(rt);
 }
コード例 #4
0
ファイル: CommRoadTest.cs プロジェクト: youthjoy/hferp
        private void ImportRoadNodes()
        {
            Dictionary<string, Road_TestRef> nodesDict = new Dictionary<string, Road_TestRef>();

            foreach (DataGridViewRow row in this.gvRoadTest.Rows)
            {
                string testRefCode = row.Cells["Dict_Code"].Value.ToString();

                DataGridViewCheckBoxCell checkCell = (DataGridViewCheckBoxCell)row.Cells["checkbox"];
                bool cbValue = Convert.ToBoolean(checkCell.Value);
                //遍历获取选中的工艺节点
                if (cbValue)
                {

                    if (!nodesDict.ContainsKey(testRefCode))
                    {

                        Road_TestRef roadTestRef = new Road_TestRef();
                        // 检测参数名称
                        roadTestRef.TestRef_Name = row.Cells["Dict_Name"].Value.ToString();
                        //零件图号
                        roadTestRef.TestRef_PartNo = ComptCode;
                        //工艺节点编码
                        roadTestRef.TestRef_RNodeCode = RNodeCode;
                        //检测参数编码
                        roadTestRef.TestRef_Code = testRefCode;

                        if (row.Cells["TestRef_High"].Value != null)
                        {
                            roadTestRef.TestRef_High = row.Cells["TestRef_High"].Value.ToString();
                        }
                        if (row.Cells["TestRef_Low"].Value != null)
                        {
                            roadTestRef.TestRef_Low = row.Cells["TestRef_Low"].Value.ToString();
                        }

                        if (row.Cells["TestRef_Value"].Value != null)
                        {
                            roadTestRef.TestRef_Value = row.Cells["TestRef_Value"].Value.ToString();
                        }

                        if (row.Cells["TestRef_IsLast"].Value != null && row.Cells["TestRef_IsLast"].Value.ToString().ToLower() == "true")
                        {

                            roadTestRef.TestRef_IsLast = 1;
                        }
                        else
                        {
                            roadTestRef.TestRef_IsLast = 0;
                        }
                        nodesDict.Add(testRefCode, roadTestRef);
                    }
                }

            }
            //更新当前工艺节点列表
            RoadTestList = nodesDict;

            IsChanged = true;
        }