예제 #1
0
        /// <summary>
        /// 增加一条记录
        /// </summary>
        /// <param name="_isd"></param>
        /// <returns></returns>
        public bool Add(Maticsoft.Model.InspectStandard _isd)
        {
            //3D赋值
            _Tem3d.Add(new Model.TestStandard_3D()
            {
                RCO_Max = _isd.RCO_Max,
                RCO_Min = _isd.RCO_Min,
                AE_Max  = _isd.AE_Max,
                AE_Min  = _isd.AE_Min,
                AO_Max  = _isd.AO_Max,
                AO_Min  = _isd.AO_Min,
                FH_Max  = _isd.FH_Max,
                FH_Min  = _isd.FH_Min,
                OrderID = _isd.OrderID,
                Type    = _isd.Type
            });
            //Exfo赋值
            _TemExfo.Add(new Model.TestStandard_Exfo()
            {
                IL_Max  = _isd.IL_Max,
                IL_Min  = _isd.IL_Min,
                RL_Max  = _isd.RL_Max,
                RL_Min  = _isd.RL_Min,
                OrderID = _isd.OrderID,
                Type    = _isd.Type,
                Wave    = _isd.Wave
            });
            bool TemExfoAddResult = false;

            Delete(_isd.OrderID, _isd.Type);
            if (_temExfo.Add(_TemExfo[0]) != 0)
            {
                TemExfoAddResult = true;
            }
            if (_tem3d.Add(_Tem3d[0]) && TemExfoAddResult)
            {
                _Tem3d.Clear();
                _TemExfo.Clear();

                return(true);
            }
            else
            {
                return(false);
            }
        }
예제 #2
0
 //
 //选择列显示所选择的值
 //
 private void dgv_Inspect_Standard_Info_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
 {
     try
     {              
         Maticsoft.Model.InspectStandard _Tem = (Maticsoft.Model.InspectStandard)dgv_Inspect_Standard_Info.SelectedItem;
         txb_InspectStandard_OrderID.Text = _Tem.OrderID;
         cmb_InspectStandardType.Text = _Tem.Type;
         txb_IL_Max.Text = _Tem.IL_Max;             
         txb_IL_Min.Text = _Tem.IL_Min;
         txb_RL_Max.Text = _Tem.RL_Max;
         txb_RL_Min.Text = _Tem.RL_Min;
         txb_RCO_Max.Text = _Tem.RCO_Max;
         txb_RCO_Min.Text = _Tem.RCO_Min;
         txb_AE_Max.Text = _Tem.AE_Max;
         txb_AE_Min.Text = _Tem.AE_Min;
         txb_FH_Max.Text = _Tem.FH_Max;
         txb_FH_Min.Text = _Tem.FH_Min;
         txb_AO_Max.Text = _Tem.AO_Max;
         txb_AO_Min.Text = _Tem.AO_Min;
     }
     catch (Exception ex) { My_MessageBox.My_MessageBox_Erry(ex.Message + "\r\n弹出此错题的原因是您选择的列为空列!"); }
 }
예제 #3
0
 /// <summary>
 /// 增加一条记录
 /// </summary>
 /// <param name="_isd"></param>
 /// <returns></returns>
 public bool Add(Maticsoft.Model.InspectStandard isd)
 {
     return(dal.Add(isd));
 }
예제 #4
0
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public Maticsoft.Model.InspectStandard DataRowToModel(DataRow row)
        {
            Maticsoft.Model.InspectStandard model = new Maticsoft.Model.InspectStandard();
            if (row != null)
            {
                if (row["Type"] != null)
                {
                    model.Type = row["Type"].ToString();
                }
                if (row["RCO_Min"] != null)
                {
                    model.RCO_Min = row["RCO_Min"].ToString();
                }
                if (row["RCO_Max"] != null)
                {
                    model.RCO_Max = row["RCO_Max"].ToString();
                }
                if (row["AO_Min"] != null)
                {
                    model.AO_Min = row["AO_Min"].ToString();
                }
                if (row["AO_Max"] != null)
                {
                    model.AO_Max = row["AO_Max"].ToString();
                }
                if (row["FH_Min"] != null)
                {
                    model.FH_Min = row["FH_Min"].ToString();
                }
                if (row["FH_Max"] != null)
                {
                    model.FH_Max = row["FH_Max"].ToString();
                }
                if (row["AE_Min"] != null)
                {
                    model.AE_Min = row["AE_Min"].ToString();
                }
                if (row["AE_Max"] != null)
                {
                    model.AE_Max = row["AE_Max"].ToString();
                }
                if (row["OrderID"] != null)
                {
                    model.OrderID = row["OrderID"].ToString();
                }

                if (row["Type"] != null)
                {
                    model.Type = row["Type"].ToString();
                }
                if (row["Wave"] != null)
                {
                    model.Wave = row["Wave"].ToString();
                }
                if (row["IL_Min"] != null)
                {
                    model.IL_Min = row["IL_Min"].ToString();
                }
                if (row["IL_Max"] != null)
                {
                    model.IL_Max = row["IL_Max"].ToString();
                }
                if (row["RL_Min"] != null)
                {
                    model.RL_Min = row["RL_Min"].ToString();
                }
                if (row["RL_Max"] != null)
                {
                    model.RL_Max = row["RL_Max"].ToString();
                }
            }
            return(model);
        }