/// <summary> /// 6.售后 /// </summary> private void ManagerSH() { bool bolState = false; try { KPS.Model.ShouHouInfo _Modelinfo = (KPS.Model.ShouHouInfo)_control.GetSaveData(); _Modelinfo.DataType = thisdeviceinfo.DeviceID; KPS.BLL.ShouHouManager shouhoumanager = new ShouHouManager(); if (ModelData != null) { _Modelinfo.ID = ((ShouHouInfo)ModelData).ID; bolState = shouhoumanager.Update(_Modelinfo); } else { bolState = shouhoumanager.Add(_Modelinfo); } } catch (Exception ex) { bolState = false; } ShowMsgStateInfo(bolState, ModelData); }
/// <summary> /// 保存表单数据 /// </summary> public override object GetSaveData() { ShouHouInfo shinfo = new ShouHouInfo(); shinfo.y_cpdm = textBox14.Text.Trim(); shinfo.y_cpzczh = string.Format("食药监械({0})字 第({1})号", textBox7.Text.Trim(), textBox3.Text.Trim()); shinfo.y_date = dateTimePicker1.Value; shinfo.y_dw = textBox15.Text.Trim(); shinfo.y_fhrqz = textBox12.Text.Trim(); shinfo.y_ggxh = textBox5.Text.Trim(); shinfo.y_ghdw = textBox2.Text.Trim(); shinfo.y_isHGZ = radioButton1.Checked; shinfo.y_mjph = textBox9.Text.Trim(); shinfo.y_pm = textBox1.Text.Trim(); shinfo.y_sccj = textBox13.Text.Trim(); shinfo.y_scph = textBox8.Text.Trim(); shinfo.y_sl =(int)numericUpDown1.Value; shinfo.y_yxq = textBox4.Text.Trim(); shinfo.y_zgy = textBox11.Text.Trim(); shinfo.y_zlqk = textBox10.Text.Trim(); shinfo.y_managertype = radioButton4.Checked; return shinfo; }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(KPS.Model.ShouHouInfo model) { return(dal.Update(model)); }
public SH(ShouHouInfo _model) { ModelData = _model; InitializeComponent(); }
/// <summary> /// 增加一条数据 /// </summary> public bool Add(KPS.Model.ShouHouInfo model) { return(dal.Add(model)); }