public FrmKWF555(Drawing drawing, ModuleTree tree) : this() { objKwf555 = (KWF555)objKwf555Service.GetModelByModuleTreeId(tree.ModuleTreeId.ToString()); if (objKwf555 == null) { return; } this.Text = drawing.ODPNo + " / Item: " + drawing.Item + " / Module: " + tree.Module + " - " + tree.CategoryName; Category objCategory = objCategoryService.GetCategoryByCategoryId(tree.CategoryId.ToString()); pbModelImage.Image = objCategory.ModelImage.Length == 0 ? Image.FromFile("NoPic.png") : (Image) new SerializeObjectToString().DeserializeObject(objCategory.ModelImage); FillData(); }
/// <summary> /// 根据条件查找KWF555 /// </summary> /// <param name="whereSql"></param> /// <returns></returns> public IModel GetModelByWhereSql(string whereSql) { string sql = "select KWF555Id,ModuleTreeId,Length,Deepth,ExRightDis,ExNo,EXDis,ExLength,ExWidth,ExHeight,SuNo,SuDis,SidePanel," + "Outlet,Inlet,LEDlogo,BackToBack,WaterCollection,LEDSpotNo,LEDSpotDis,LightType," + "ANSUL,ANSide,ANDetectorEnd,ANYDis,ANDropNo,ANDropDis1,ANDropDis2,ANDropDis3,ANDropDis4,ANDropDis5," + "ANDetectorNo,ANDetectorDis1,ANDetectorDis2,ANDetectorDis3,ANDetectorDis4,ANDetectorDis5," + "MARVEL,IRNo,IRDis1,IRDis2,IRDis3 from KWF555"; sql += whereSql; SqlDataReader objReader = SQLHelper.GetReader(sql); KWF555 objModel = null; if (objReader.Read()) { objModel = new KWF555() { KWF555Id = Convert.ToInt32(objReader["KWF555Id"]), ModuleTreeId = Convert.ToInt32(objReader["ModuleTreeId"]), //最好不要用=null去判断,提示类型转换错误 Length = objReader["Length"].ToString().Length == 0 ? 0 : Convert.ToDecimal(objReader["Length"]), Deepth = objReader["Deepth"].ToString().Length == 0 ? 0 : Convert.ToDecimal(objReader["Deepth"]), ExRightDis = objReader["ExRightDis"].ToString().Length == 0 ? 0 : Convert.ToDecimal(objReader["ExRightDis"]), ExNo = objReader["ExNo"].ToString().Length == 0 ? 0 : Convert.ToInt32(objReader["ExNo"]), ExDis = objReader["ExDis"].ToString().Length == 0 ? 0 : Convert.ToDecimal(objReader["ExDis"]), ExLength = objReader["ExLength"].ToString().Length == 0 ? 0 : Convert.ToDecimal(objReader["ExLength"]), ExWidth = objReader["ExWidth"].ToString().Length == 0 ? 0 : Convert.ToDecimal(objReader["ExWidth"]), ExHeight = objReader["ExHeight"].ToString().Length == 0 ? 0 : Convert.ToDecimal(objReader["ExHeight"]), SuNo = objReader["SuNo"].ToString().Length == 0 ? 0 : Convert.ToInt32(objReader["SuNo"]), SuDis = objReader["SuDis"].ToString().Length == 0 ? 0 : Convert.ToDecimal(objReader["SuDis"]), SidePanel = objReader["SidePanel"].ToString().Length == 0 ? "" : objReader["SidePanel"].ToString(), Outlet = objReader["Outlet"].ToString().Length == 0 ? "" : objReader["Outlet"].ToString(), Inlet = objReader["Inlet"].ToString().Length == 0 ? "" : objReader["Inlet"].ToString(), LEDlogo = objReader["LEDlogo"].ToString().Length == 0 ? "" : objReader["LEDlogo"].ToString(), BackToBack = objReader["BackToBack"].ToString().Length == 0 ? "" : objReader["BackToBack"].ToString(), WaterCollection = objReader["WaterCollection"].ToString().Length == 0 ? "" : objReader["WaterCollection"].ToString(), LEDSpotNo = objReader["LEDSpotNo"].ToString().Length == 0 ? 0 : Convert.ToInt32(objReader["LEDSpotNo"]), LEDSpotDis = objReader["LEDSpotDis"].ToString().Length == 0 ? 0 : Convert.ToDecimal(objReader["LEDSpotDis"]), LightType = objReader["LightType"].ToString().Length == 0 ? "" : objReader["LightType"].ToString(), ANSUL = objReader["ANSUL"].ToString().Length == 0 ? "" : objReader["ANSUL"].ToString(), ANSide = objReader["ANSide"].ToString().Length == 0 ? "" : objReader["ANSide"].ToString(), ANDetectorEnd = objReader["ANDetectorEnd"].ToString().Length == 0 ? "" : objReader["ANDetectorEnd"].ToString(), ANYDis = objReader["ANYDis"].ToString().Length == 0 ? 0 : Convert.ToDecimal(objReader["ANYDis"]), ANDropNo = objReader["ANDropNo"].ToString().Length == 0 ? 0 : Convert.ToInt32(objReader["ANDropNo"]), ANDropDis1 = objReader["ANDropDis1"].ToString().Length == 0 ? 0 : Convert.ToDecimal(objReader["ANDropDis1"]), ANDropDis2 = objReader["ANDropDis2"].ToString().Length == 0 ? 0 : Convert.ToDecimal(objReader["ANDropDis2"]), ANDropDis3 = objReader["ANDropDis3"].ToString().Length == 0 ? 0 : Convert.ToDecimal(objReader["ANDropDis3"]), ANDropDis4 = objReader["ANDropDis4"].ToString().Length == 0 ? 0 : Convert.ToDecimal(objReader["ANDropDis4"]), ANDropDis5 = objReader["ANDropDis5"].ToString().Length == 0 ? 0 : Convert.ToDecimal(objReader["ANDropDis5"]), ANDetectorNo = objReader["ANDetectorNo"].ToString().Length == 0 ? 0 : Convert.ToInt32(objReader["ANDetectorNo"]), ANDetectorDis1 = objReader["ANDetectorDis1"].ToString().Length == 0 ? 0 : Convert.ToDecimal(objReader["ANDetectorDis1"]), ANDetectorDis2 = objReader["ANDetectorDis2"].ToString().Length == 0 ? 0 : Convert.ToDecimal(objReader["ANDetectorDis2"]), ANDetectorDis3 = objReader["ANDetectorDis3"].ToString().Length == 0 ? 0 : Convert.ToDecimal(objReader["ANDetectorDis3"]), ANDetectorDis4 = objReader["ANDetectorDis4"].ToString().Length == 0 ? 0 : Convert.ToDecimal(objReader["ANDetectorDis4"]), ANDetectorDis5 = objReader["ANDetectorDis5"].ToString().Length == 0 ? 0 : Convert.ToDecimal(objReader["ANDetectorDis5"]), MARVEL = objReader["MARVEL"].ToString().Length == 0 ? "" : objReader["MARVEL"].ToString(), IRNo = objReader["IRNo"].ToString().Length == 0 ? 0 : Convert.ToInt32(objReader["IRNo"]), IRDis1 = objReader["IRDis1"].ToString().Length == 0 ? 0 : Convert.ToDecimal(objReader["IRDis1"]), IRDis2 = objReader["IRDis2"].ToString().Length == 0 ? 0 : Convert.ToDecimal(objReader["IRDis2"]), IRDis3 = objReader["IRDis3"].ToString().Length == 0 ? 0 : Convert.ToDecimal(objReader["IRDis3"]) }; } objReader.Close(); return(objModel); }
/// <summary> /// 修改KWF555的制图参数 /// </summary> /// <param name="model"></param> /// <returns></returns> public int EditModel(IModel model) { KWF555 objModel = (KWF555)model; //编写带参数的SQL语句 StringBuilder sqlBuilder = new StringBuilder(); sqlBuilder.Append("Update KWF555 set Length=@Length,Deepth=@Deepth,ExRightDis=@ExRightDis,ExNo=@ExNo,ExDis=@ExDis,ExLength=@ExLength,ExWidth=@ExWidth,ExHeight=@ExHeight,SuNo=@SuNo,SuDis=@SuDis,SidePanel=@SidePanel,"); sqlBuilder.Append("Outlet=@Outlet,Inlet=@Inlet,LEDlogo=@LEDlogo,BackToBack=@BackToBack,WaterCollection=@WaterCollection,LEDSpotNo=@LEDSpotNo,LEDSpotDis=@LEDSpotDis,LightType=@LightType,"); sqlBuilder.Append("ANSUL=@ANSUL,ANSide=@ANSide,ANDetectorEnd=@ANDetectorEnd,ANYDis=@ANYDis,ANDropNo=@ANDropNo,ANDropDis1=@ANDropDis1,ANDropDis2=@ANDropDis2,ANDropDis3=@ANDropDis3,ANDropDis4=@ANDropDis4,ANDropDis5=@ANDropDis5,"); sqlBuilder.Append("ANDetectorNo=@ANDetectorNo,ANDetectorDis1=@ANDetectorDis1,ANDetectorDis2=@ANDetectorDis2,ANDetectorDis3=@ANDetectorDis3,ANDetectorDis4=@ANDetectorDis4,ANDetectorDis5=@ANDetectorDis5,"); sqlBuilder.Append("MARVEL=@MARVEL,IRNo=@IRNo,IRDis1=@IRDis1,IRDis2=@IRDis2,IRDis3=@IRDis3 where KWF555Id=@KWF555Id"); //定义参数数组 SqlParameter[] param = new SqlParameter[] { new SqlParameter("@Length", objModel.Length), new SqlParameter("@Deepth", objModel.Deepth), new SqlParameter("@ExRightDis", objModel.ExRightDis), new SqlParameter("@ExNo", objModel.ExNo), new SqlParameter("@ExDis", objModel.ExDis), new SqlParameter("@ExLength", objModel.ExLength), new SqlParameter("@ExWidth", objModel.ExWidth), new SqlParameter("@ExHeight", objModel.ExHeight), new SqlParameter("@SuNo", objModel.SuNo), new SqlParameter("@SuDis", objModel.SuDis), new SqlParameter("@SidePanel", objModel.SidePanel), new SqlParameter("@Outlet", objModel.Outlet), new SqlParameter("@Inlet", objModel.Inlet), new SqlParameter("@LEDlogo", objModel.LEDlogo), new SqlParameter("@BackToBack", objModel.BackToBack), new SqlParameter("@WaterCollection", objModel.WaterCollection), new SqlParameter("@LEDSpotNo", objModel.LEDSpotNo), new SqlParameter("@LEDSpotDis", objModel.LEDSpotDis), new SqlParameter("@LightType", objModel.LightType), new SqlParameter("@ANSUL", objModel.ANSUL), new SqlParameter("@ANSide", objModel.ANSide), new SqlParameter("@ANDetectorEnd", objModel.ANDetectorEnd), new SqlParameter("@ANYDis", objModel.ANYDis), new SqlParameter("@ANDropNo", objModel.ANDropNo), new SqlParameter("@ANDropDis1", objModel.ANDropDis1), new SqlParameter("@ANDropDis2", objModel.ANDropDis2), new SqlParameter("@ANDropDis3", objModel.ANDropDis3), new SqlParameter("@ANDropDis4", objModel.ANDropDis4), new SqlParameter("@ANDropDis5", objModel.ANDropDis5), new SqlParameter("@ANDetectorNo", objModel.ANDetectorNo), new SqlParameter("@ANDetectorDis1", objModel.ANDetectorDis1), new SqlParameter("@ANDetectorDis2", objModel.ANDetectorDis2), new SqlParameter("@ANDetectorDis3", objModel.ANDetectorDis3), new SqlParameter("@ANDetectorDis4", objModel.ANDetectorDis4), new SqlParameter("@ANDetectorDis5", objModel.ANDetectorDis5), new SqlParameter("@MARVEL", objModel.MARVEL), new SqlParameter("@IRNo", objModel.IRNo), new SqlParameter("@IRDis1", objModel.IRDis1), new SqlParameter("@IRDis2", objModel.IRDis2), new SqlParameter("@IRDis3", objModel.IRDis3), new SqlParameter("@KWF555Id", objModel.KWF555Id) }; try { return(SQLHelper.Update(sqlBuilder.ToString(), param)); } catch (SqlException ex) { throw new Exception("数据库操作出现异常:" + ex.Message); } catch (Exception ex) { throw ex; } }
/// <summary> /// 修改参数 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnEditData_Click(object sender, EventArgs e) { #region 数据验证 //必填项目 if (pbModelImage.Tag.ToString().Length == 0) { return; } if (!DataValidate.IsDecimal(txtLength.Text.Trim()) || Convert.ToDecimal(txtLength.Text.Trim()) < 500m) { MessageBox.Show("请认真检查烟罩长度", "提示信息"); txtLength.Focus(); txtLength.SelectAll(); return; } if (!DataValidate.IsDecimal(txtDeepth.Text.Trim()) || Convert.ToDecimal(txtDeepth.Text.Trim()) < 500m) { MessageBox.Show("请认真检查烟罩深度", "提示信息"); txtDeepth.Focus(); txtDeepth.SelectAll(); return; } if (cobSidePanel.SelectedIndex == -1) { MessageBox.Show("请选择烟罩大侧板", "提示信息"); cobSidePanel.Focus(); return; } if (cobExNo.SelectedIndex == -1) { MessageBox.Show("请选择排风脖颈数量", "提示信息"); cobExNo.Focus(); return; } else if (cobExNo.SelectedIndex > 0 && (!DataValidate.IsDecimal(txtExDis.Text.Trim()) || Convert.ToDecimal(txtExDis.Text.Trim()) < 40m)) { MessageBox.Show("请认真检查排风脖颈间距", "提示信息");//当脖颈大于2时需要填写脖颈间距 txtExDis.Focus(); txtExDis.SelectAll(); return; } if (cobSuNo.SelectedIndex == -1) { MessageBox.Show("请选择新风脖颈数量", "提示信息"); cobSuNo.Focus(); return; } else if (cobSuNo.SelectedIndex > 0 && (!DataValidate.IsDecimal(txtSuDis.Text.Trim()) || Convert.ToDecimal(txtSuDis.Text.Trim()) < 250m)) { MessageBox.Show("请认真检查新风脖颈间距", "提示信息");//当脖颈大于2时需要填写脖颈间距 txtSuDis.Focus(); txtSuDis.SelectAll(); return; } if (!DataValidate.IsDecimal(txtExLength.Text.Trim()) || Convert.ToDecimal(txtExLength.Text.Trim()) < 50m) { MessageBox.Show("请填写脖颈长度", "提示信息"); txtExLength.Focus(); txtExLength.SelectAll(); return; } if (!DataValidate.IsDecimal(txtExWidth.Text.Trim()) || Convert.ToDecimal(txtExWidth.Text.Trim()) < 50m) { MessageBox.Show("请填写脖颈宽度", "提示信息"); txtExWidth.Focus(); txtExWidth.SelectAll(); return; } if (!DataValidate.IsDecimal(txtExHeight.Text.Trim()) || Convert.ToDecimal(txtExHeight.Text.Trim()) < 20m) { MessageBox.Show("请填写脖颈高度", "提示信息"); txtExHeight.Focus(); txtExHeight.SelectAll(); return; } if (cobLightType.SelectedIndex == -1) { MessageBox.Show("请选择灯具类型", "提示信息"); cobLightType.Focus(); return; } if (cobANSUL.SelectedIndex == -1) { MessageBox.Show("是否带ANSUL", "提示信息"); cobANSUL.Focus(); return; } if (cobMARVEL.SelectedIndex == -1) { MessageBox.Show("是否带MARVEL", "提示信息"); cobMARVEL.Focus(); return; } if (cobLightType.SelectedIndex == 2 || cobLightType.SelectedIndex == 3) { if (cobLEDSpotNo.SelectedIndex == -1) { MessageBox.Show("请检查筒灯数量", "提示信息"); cobLEDSpotNo.Focus(); return; } if (!DataValidate.IsDecimal(txtLEDSpotDis.Text.Trim()) || Convert.ToDecimal(txtLEDSpotDis.Text.Trim()) < 60m) { MessageBox.Show("请填写筒灯间距", "提示信息"); txtLEDSpotDis.Focus(); txtLEDSpotDis.SelectAll(); return; } } if (cobANSUL.SelectedIndex == 0) { if (cobANSide.SelectedIndex == -1) { MessageBox.Show("请选择ANSUL侧喷位置", "提示信息"); cobANSide.Focus(); return; } if (cobANDetectorEnd.SelectedIndex == -1) { MessageBox.Show("请选择ANSUL末端探测器位置", "提示信息"); cobANDetectorEnd.Focus(); return; } if (cobANDropNo.SelectedIndex == -1) { MessageBox.Show("请检查下喷数量", "提示信息"); cobANDropNo.Focus(); return; } if (cobANDropNo.SelectedIndex > 0) { if (!DataValidate.IsDecimal(txtANYDis.Text.Trim()) || Convert.ToDecimal(txtANYDis.Text.Trim()) < 200m) { MessageBox.Show("请检查ANSUL下喷距离烟罩前端距离", "提示信息"); txtANYDis.Focus(); txtANYDis.SelectAll(); return; } if (!DataValidate.IsDecimal(txtANDropDis1.Text.Trim()) || Convert.ToDecimal(txtANDropDis1.Text.Trim()) < 30m) { MessageBox.Show("请检查下喷间距1", "提示信息"); txtANDropDis1.Focus(); txtANDropDis1.SelectAll(); return; } } if (cobANDropNo.SelectedIndex > 1) { if (!DataValidate.IsDecimal(txtANDropDis2.Text.Trim()) || Convert.ToDecimal(txtANDropDis2.Text.Trim()) < 30m) { MessageBox.Show("请检查下喷间距2", "提示信息"); txtANDropDis2.Focus(); txtANDropDis2.SelectAll(); return; } } if (cobANDropNo.SelectedIndex > 2) { if (!DataValidate.IsDecimal(txtANDropDis3.Text.Trim()) || Convert.ToDecimal(txtANDropDis3.Text.Trim()) < 30m) { MessageBox.Show("请检查下喷间距3", "提示信息"); txtANDropDis3.Focus(); txtANDropDis3.SelectAll(); return; } } if (cobANDropNo.SelectedIndex > 3) { if (!DataValidate.IsDecimal(txtANDropDis4.Text.Trim()) || Convert.ToDecimal(txtANDropDis4.Text.Trim()) < 30m) { MessageBox.Show("请检查下喷间距4", "提示信息"); txtANDropDis4.Focus(); txtANDropDis4.SelectAll(); return; } } if (cobANDropNo.SelectedIndex > 4) { if (!DataValidate.IsDecimal(txtANDropDis5.Text.Trim()) || Convert.ToDecimal(txtANDropDis5.Text.Trim()) < 30m) { MessageBox.Show("请检查下喷间距5", "提示信息"); txtANDropDis5.Focus(); txtANDropDis5.SelectAll(); return; } } } if (cobANDetectorNo.SelectedIndex == -1) { MessageBox.Show("请检查探测器数量", "提示信息"); cobANDetectorNo.Focus(); return; } if (cobANDetectorNo.SelectedIndex > 0) { if (!DataValidate.IsDecimal(txtANDetectorDis1.Text.Trim()) || Convert.ToDecimal(txtANDetectorDis1.Text.Trim()) < 30m) { MessageBox.Show("请检查探测器间距1", "提示信息"); txtANDetectorDis1.Focus(); txtANDetectorDis1.SelectAll(); return; } } if (cobANDetectorNo.SelectedIndex > 1) { if (!DataValidate.IsDecimal(txtANDetectorDis2.Text.Trim()) || Convert.ToDecimal(txtANDetectorDis2.Text.Trim()) < 30m) { MessageBox.Show("请检查探测器间距2", "提示信息"); txtANDetectorDis2.Focus(); txtANDetectorDis2.SelectAll(); return; } } if (cobANDetectorNo.SelectedIndex > 2) { if (!DataValidate.IsDecimal(txtANDetectorDis3.Text.Trim()) || Convert.ToDecimal(txtANDetectorDis3.Text.Trim()) < 30m) { MessageBox.Show("请检查探测器间距3", "提示信息"); txtANDetectorDis3.Focus(); txtANDetectorDis3.SelectAll(); return; } } if (cobANDetectorNo.SelectedIndex > 3) { if (!DataValidate.IsDecimal(txtANDetectorDis4.Text.Trim()) || Convert.ToDecimal(txtANDetectorDis4.Text.Trim()) < 30m) { MessageBox.Show("请检查探测器间距4", "提示信息"); txtANDetectorDis4.Focus(); txtANDetectorDis4.SelectAll(); return; } } if (cobANDetectorNo.SelectedIndex > 4) { if (!DataValidate.IsDecimal(txtANDetectorDis5.Text.Trim()) || Convert.ToDecimal(txtANDetectorDis5.Text.Trim()) < 30m) { MessageBox.Show("请检查探测器间距5", "提示信息"); txtANDetectorDis5.Focus(); txtANDetectorDis5.SelectAll(); return; } } if (cobMARVEL.SelectedIndex == 0) { if (cobIRNo.SelectedIndex == -1) { MessageBox.Show("请检查IR数量", "提示信息"); cobIRNo.Focus(); return; } if (cobIRNo.SelectedIndex > 0) { if (!DataValidate.IsDecimal(txtIRDis1.Text.Trim()) || Convert.ToDecimal(txtIRDis1.Text.Trim()) < 30m) { MessageBox.Show("请检查IR间距1", "提示信息"); txtIRDis1.Focus(); txtIRDis1.SelectAll(); return; } } if (cobIRNo.SelectedIndex > 1) { if (!DataValidate.IsDecimal(txtIRDis2.Text.Trim()) || Convert.ToDecimal(txtIRDis2.Text.Trim()) < 30m) { MessageBox.Show("请检查IR间距2", "提示信息"); txtIRDis2.Focus(); txtIRDis2.SelectAll(); return; } } if (cobIRNo.SelectedIndex > 2) { if (!DataValidate.IsDecimal(txtIRDis3.Text.Trim()) || Convert.ToDecimal(txtIRDis3.Text.Trim()) < 30m) { MessageBox.Show("请检查IR间距3", "提示信息"); txtIRDis3.Focus(); txtIRDis3.SelectAll(); return; } } } if (cobLEDLogo.SelectedIndex == -1) { MessageBox.Show("请检查是否带LOGO", "提示信息"); cobLEDLogo.Focus(); return; } if (cobOutlet.SelectedIndex == -1) { MessageBox.Show("请检查排水口位置", "提示信息"); cobOutlet.Focus(); return; } if (cobInlet.SelectedIndex == -1) { MessageBox.Show("请检查入水口位置", "提示信息"); cobInlet.Focus(); return; } if (cobWaterCollection.SelectedIndex == -1) { MessageBox.Show("请检查是否带集水翻遍", "提示信息"); cobWaterCollection.Focus(); return; } if (cobBackToBack.SelectedIndex == -1) { MessageBox.Show("请检查是否背靠背", "提示信息"); cobBackToBack.Focus(); return; } #endregion //封装对象 KWF555 objKwf555 = new KWF555() { KWF555Id = Convert.ToInt32(pbModelImage.Tag), SidePanel = cobSidePanel.Text, ExNo = Convert.ToInt32(cobExNo.Text), SuNo = Convert.ToInt32(cobSuNo.Text), LightType = cobLightType.Text, LEDSpotNo = cobLEDSpotNo.Text.Trim().Length == 0 ? 0 : Convert.ToInt32(cobLEDSpotNo.Text), ANSUL = cobANSUL.Text, ANSide = cobANSide.Text.Trim().Length == 0 ? "NO" : cobANSide.Text, ANDetectorEnd = cobANDetectorEnd.Text.Trim().Length == 0 ? "NO" : cobANDetectorEnd.Text, ANDropNo = cobANDropNo.Text.Trim().Length == 0 ? 0 : Convert.ToInt32(cobANDropNo.Text), ANDetectorNo = cobANDetectorNo.Text.Trim().Length == 0 ? 0 : Convert.ToInt32(cobANDetectorNo.Text), MARVEL = cobMARVEL.Text, IRNo = cobIRNo.Text.Trim().Length == 0 ? 0 : Convert.ToInt32(cobIRNo.Text), LEDlogo = cobLEDLogo.Text, Outlet = cobOutlet.Text, Inlet = cobInlet.Text, WaterCollection = cobWaterCollection.Text, BackToBack = cobBackToBack.Text, Length = Convert.ToDecimal(txtLength.Text.Trim()), Deepth = Convert.ToDecimal(txtDeepth.Text.Trim()), ExRightDis = Convert.ToDecimal(txtExRightDis.Text.Trim()), ExDis = Convert.ToDecimal(txtExDis.Text.Trim()), SuDis = Convert.ToDecimal(txtSuDis.Text.Trim()), ExLength = Convert.ToDecimal(txtExLength.Text.Trim()), ExWidth = Convert.ToDecimal(txtExWidth.Text.Trim()), ExHeight = Convert.ToDecimal(txtExHeight.Text.Trim()), LEDSpotDis = Convert.ToDecimal(txtLEDSpotDis.Text.Trim()), ANYDis = Convert.ToDecimal(txtANYDis.Text.Trim()), ANDropDis1 = Convert.ToDecimal(txtANDropDis1.Text.Trim()), ANDropDis2 = Convert.ToDecimal(txtANDropDis2.Text.Trim()), ANDropDis3 = Convert.ToDecimal(txtANDropDis3.Text.Trim()), ANDropDis4 = Convert.ToDecimal(txtANDropDis4.Text.Trim()), ANDropDis5 = Convert.ToDecimal(txtANDropDis5.Text.Trim()), ANDetectorDis1 = Convert.ToDecimal(txtANDetectorDis1.Text.Trim()), ANDetectorDis2 = Convert.ToDecimal(txtANDetectorDis2.Text.Trim()), ANDetectorDis3 = Convert.ToDecimal(txtANDetectorDis3.Text.Trim()), ANDetectorDis4 = Convert.ToDecimal(txtANDetectorDis4.Text.Trim()), ANDetectorDis5 = Convert.ToDecimal(txtANDetectorDis5.Text.Trim()), IRDis1 = Convert.ToDecimal(txtIRDis1.Text.Trim()), IRDis2 = Convert.ToDecimal(txtIRDis2.Text.Trim()), IRDis3 = Convert.ToDecimal(txtIRDis3.Text.Trim()) }; //提交修改 try { if (objKwf555Service.EditModel(objKwf555) == 1) { MessageBox.Show("制图数据修改成功", "提示信息"); this.DialogResult = DialogResult.OK; this.Close(); } } catch (Exception ex) { MessageBox.Show(ex.Message); } }