Ejemplo n.º 1
0
        /// <summary>
        /// 7.处理不合格品记录
        /// </summary>
        private void ManagerBHGPJL()
        {
            bool bolState = false;

            try
            {
                KPS.Model.BuHeGePinJiLuInfo _Modelinfo = (KPS.Model.BuHeGePinJiLuInfo)_control.GetSaveData();
                _Modelinfo.DataType = thisdeviceinfo.DeviceID;

                KPS.BLL.BuHeGePinJiLuManager bhgpmanager = new BuHeGePinJiLuManager();
                if (ModelData != null)
                {
                    _Modelinfo.ID = ((BuHeGePinJiLuInfo)ModelData).ID;
                    bolState      = bhgpmanager.Update(_Modelinfo);
                }
                else
                {
                    bolState = bhgpmanager.Add(_Modelinfo);
                }
            }
            catch (Exception ex)
            {
                bolState = false;
            }

            ShowMsgStateInfo(bolState, ModelData);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// 保存表单数据
 /// </summary>
 public override object GetSaveData()
 {
     KPS.Model.BuHeGePinJiLuInfo jlinfo = new BuHeGePinJiLuInfo();
     jlinfo.y_cpdm ="有";
     if (!radioButton4.Checked)
     {
         jlinfo.y_cpdm = "无";
     }
     jlinfo.y_cpzczh = string.Format("食药监械({0})字 第({1})号", textBox7.Text.Trim(), textBox3.Text.Trim());
     jlinfo.y_date = dateTimePicker1.Value;
     jlinfo.y_dw = textBox6.Text.Trim();
     jlinfo.y_fhrqz = textBox12.Text.Trim();
     jlinfo.y_ggxh = textBox5.Text.Trim();
     jlinfo.y_ghdw = textBox2.Text.Trim();
     jlinfo.y_isHGZ = radioButton1.Checked;
     jlinfo.y_mjph = textBox9.Text.Trim();
     jlinfo.y_pm = textBox1.Text.Trim();
     jlinfo.y_sccj = textBox13.Text.Trim();
     jlinfo.y_scph = textBox8.Text.Trim();
     jlinfo.y_sl =(int)numericUpDown1.Value;
     jlinfo.y_yxq = textBox4.Text.Trim();
     jlinfo.y_zgy = textBox11.Text.Trim();
     jlinfo.y_zlqk = textBox10.Text.Trim();//处理情况
     return jlinfo;
 }
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public bool Update(KPS.Model.BuHeGePinJiLuInfo model)
 {
     return(dal.Update(model));
 }
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public bool Add(KPS.Model.BuHeGePinJiLuInfo model)
 {
     return(dal.Add(model));
 }
Ejemplo n.º 5
0
 /// <summary>
 /// 不合格品记录编辑
 /// </summary>
 /// <param name="_model"></param>
 public BHGPJL(BuHeGePinJiLuInfo _model)
 {
     ModelData = _model;
     InitializeComponent();
 }