private void ShowInfo(int id) { Maticsoft.BLL.OrderTab bll = new Maticsoft.BLL.OrderTab(); Maticsoft.Model.OrderTab model = bll.GetModel(id); this.lblid.Text = model.id.ToString(); this.lblMemberID.Text = model.MemberID.ToString(); this.lblMemberName.Text = model.MemberName; this.lblMemberPhone.Text = model.MemberPhone; this.lblMemberPhone1.Text = model.MemberPhone1; this.lblMemberAdd.Text = model.MemberAdd; this.lblOrderdate.Text = model.Orderdate.ToString(); this.lblOrderNumber.Text = model.OrderNumber; this.lblStaffmemberID.Text = model.StaffmemberID.ToString(); this.lblStaffmembername.Text = model.Staffmembername; this.lblUserTabID.Text = model.UserTabID.ToString(); this.lblPhotoID.Text = model.PhotoID.ToString(); this.lblvalidity.Text = model.validity.ToString(); this.lblprogress.Text = model.progress.ToString(); this.lblDeposit.Text = model.Deposit.ToString(); this.lblAllMoney.Text = model.AllMoney.ToString(); this.lblalllength.Text = model.alllength.ToString(); this.lblImperial.Text = model.Imperial.ToString(); this.lblQhWidth.Text = model.QhWidth.ToString(); this.lblBeizhuwg.Text = model.Beizhuwg; this.lblBeizhuzz.Text = model.Beizhuzz; this.lblZengsong.Text = model.Zengsong; this.lblZhuangtai1.Text = model.Zhuangtai1.ToString(); this.lblZhuangtai2.Text = model.Zhuangtai2.ToString(); this.lblBy1.Text = model.By1.ToString(); this.lblBy2.Text = model.By2.ToString(); this.lblBy3.Text = model.By3.ToString(); this.lblBy4.Text = model.By4; this.lblBy5.Text = model.By5; this.lblBy6.Text = model.By6; this.lblBy7.Text = model.By7; }
/// <summary> /// 得到一个对象实体 /// </summary> public Maticsoft.Model.OrderTab GetModel(int id) { StringBuilder strSql = new StringBuilder(); strSql.Append("select top 1 id,MemberID,MemberName,MemberPhone,MemberPhone1,MemberAdd,Orderdate,OrderNumber,StaffmemberID,Staffmembername,UserTabID,PhotoID1,PhotoID2,PhotoID3,PhotoID4,qrcode,validity,progress,Deposit,AllMoney,alllength,Imperial,QhWidth,Beizhuwg,Beizhuzz,Zengsong,Zhuangtai1,Zhuangtai2,By1,By2,By3,By4,By5,By6,By7,HomemadeID from OrderTab "); strSql.Append(" where id=@id"); SqlParameter[] parameters = { new SqlParameter("@id", SqlDbType.Int, 4) }; parameters[0].Value = id; Maticsoft.Model.OrderTab model = new Maticsoft.Model.OrderTab(); DataSet ds = DbHelperSQL.Query(strSql.ToString(), parameters); if (ds.Tables[0].Rows.Count > 0) { return(DataRowToModel(ds.Tables[0].Rows[0])); } else { return(null); } }
protected void btnSave_Click(object sender, EventArgs e) { string strErr = ""; if (!PageValidate.IsNumber(txtMemberID.Text)) { strErr += "MemberID格式错误!\\n"; } if (this.txtMemberName.Text.Trim().Length == 0) { strErr += "MemberName不能为空!\\n"; } if (this.txtMemberPhone.Text.Trim().Length == 0) { strErr += "MemberPhone不能为空!\\n"; } if (this.txtMemberPhone1.Text.Trim().Length == 0) { strErr += "MemberPhone1不能为空!\\n"; } if (this.txtMemberAdd.Text.Trim().Length == 0) { strErr += "MemberAdd不能为空!\\n"; } if (!PageValidate.IsDateTime(txtOrderdate.Text)) { strErr += "Orderdate格式错误!\\n"; } if (this.txtOrderNumber.Text.Trim().Length == 0) { strErr += "OrderNumber不能为空!\\n"; } if (!PageValidate.IsNumber(txtStaffmemberID.Text)) { strErr += "StaffmemberID格式错误!\\n"; } if (this.txtStaffmembername.Text.Trim().Length == 0) { strErr += "Staffmembername不能为空!\\n"; } if (!PageValidate.IsNumber(txtUserTabID.Text)) { strErr += "UserTabID格式错误!\\n"; } if (!PageValidate.IsNumber(txtPhotoID.Text)) { strErr += "PhotoID格式错误!\\n"; } if (!PageValidate.IsDateTime(txtvalidity.Text)) { strErr += "validity格式错误!\\n"; } if (!PageValidate.IsNumber(txtprogress.Text)) { strErr += "progress格式错误!\\n"; } if (!PageValidate.IsDecimal(txtDeposit.Text)) { strErr += "Deposit格式错误!\\n"; } if (!PageValidate.IsDecimal(txtAllMoney.Text)) { strErr += "AllMoney格式错误!\\n"; } if (!PageValidate.IsDecimal(txtalllength.Text)) { strErr += "alllength格式错误!\\n"; } if (!PageValidate.IsDecimal(txtImperial.Text)) { strErr += "Imperial格式错误!\\n"; } if (!PageValidate.IsDecimal(txtQhWidth.Text)) { strErr += "QhWidth格式错误!\\n"; } if (this.txtBeizhuwg.Text.Trim().Length == 0) { strErr += "Beizhuwg不能为空!\\n"; } if (this.txtBeizhuzz.Text.Trim().Length == 0) { strErr += "Beizhuzz不能为空!\\n"; } if (this.txtZengsong.Text.Trim().Length == 0) { strErr += "Zengsong不能为空!\\n"; } if (!PageValidate.IsNumber(txtZhuangtai1.Text)) { strErr += "Zhuangtai1格式错误!\\n"; } if (!PageValidate.IsNumber(txtZhuangtai2.Text)) { strErr += "Zhuangtai2格式错误!\\n"; } if (!PageValidate.IsDecimal(txtBy1.Text)) { strErr += "By1格式错误!\\n"; } if (!PageValidate.IsDecimal(txtBy2.Text)) { strErr += "By2格式错误!\\n"; } if (!PageValidate.IsDecimal(txtBy3.Text)) { strErr += "By3格式错误!\\n"; } if (this.txtBy4.Text.Trim().Length == 0) { strErr += "By4不能为空!\\n"; } if (this.txtBy5.Text.Trim().Length == 0) { strErr += "By5不能为空!\\n"; } if (this.txtBy6.Text.Trim().Length == 0) { strErr += "By6不能为空!\\n"; } if (this.txtBy7.Text.Trim().Length == 0) { strErr += "By7不能为空!\\n"; } if (strErr != "") { MessageBox.Show(this, strErr); return; } int MemberID = int.Parse(this.txtMemberID.Text); string MemberName = this.txtMemberName.Text; string MemberPhone = this.txtMemberPhone.Text; string MemberPhone1 = this.txtMemberPhone1.Text; string MemberAdd = this.txtMemberAdd.Text; DateTime Orderdate = DateTime.Parse(this.txtOrderdate.Text); string OrderNumber = this.txtOrderNumber.Text; int StaffmemberID = int.Parse(this.txtStaffmemberID.Text); string Staffmembername = this.txtStaffmembername.Text; int UserTabID = int.Parse(this.txtUserTabID.Text); int PhotoID = int.Parse(this.txtPhotoID.Text); DateTime validity = DateTime.Parse(this.txtvalidity.Text); int progress = int.Parse(this.txtprogress.Text); decimal Deposit = decimal.Parse(this.txtDeposit.Text); decimal AllMoney = decimal.Parse(this.txtAllMoney.Text); decimal alllength = decimal.Parse(this.txtalllength.Text); decimal Imperial = decimal.Parse(this.txtImperial.Text); decimal QhWidth = decimal.Parse(this.txtQhWidth.Text); string Beizhuwg = this.txtBeizhuwg.Text; string Beizhuzz = this.txtBeizhuzz.Text; string Zengsong = this.txtZengsong.Text; int Zhuangtai1 = int.Parse(this.txtZhuangtai1.Text); int Zhuangtai2 = int.Parse(this.txtZhuangtai2.Text); decimal By1 = decimal.Parse(this.txtBy1.Text); decimal By2 = decimal.Parse(this.txtBy2.Text); decimal By3 = decimal.Parse(this.txtBy3.Text); string By4 = this.txtBy4.Text; string By5 = this.txtBy5.Text; string By6 = this.txtBy6.Text; string By7 = this.txtBy7.Text; Maticsoft.Model.OrderTab model = new Maticsoft.Model.OrderTab(); model.MemberID = MemberID; model.MemberName = MemberName; model.MemberPhone = MemberPhone; model.MemberPhone1 = MemberPhone1; model.MemberAdd = MemberAdd; model.Orderdate = Orderdate; model.OrderNumber = OrderNumber; model.StaffmemberID = StaffmemberID; model.Staffmembername = Staffmembername; model.UserTabID = UserTabID; model.PhotoID = PhotoID; model.validity = validity; model.progress = progress; model.Deposit = Deposit; model.AllMoney = AllMoney; model.alllength = alllength; model.Imperial = Imperial; model.QhWidth = QhWidth; model.Beizhuwg = Beizhuwg; model.Beizhuzz = Beizhuzz; model.Zengsong = Zengsong; model.Zhuangtai1 = Zhuangtai1; model.Zhuangtai2 = Zhuangtai2; model.By1 = By1; model.By2 = By2; model.By3 = By3; model.By4 = By4; model.By5 = By5; model.By6 = By6; model.By7 = By7; Maticsoft.BLL.OrderTab bll = new Maticsoft.BLL.OrderTab(); bll.Add(model); Maticsoft.Common.MessageBox.ShowAndRedirect(this, "保存成功!", "add.aspx"); }
/// <summary> /// 增加一条数据 /// </summary> public int Add(Maticsoft.Model.OrderTab model) { StringBuilder strSql = new StringBuilder(); strSql.Append("insert into OrderTab("); strSql.Append("MemberID,MemberName,MemberPhone,MemberPhone1,MemberAdd,Orderdate,OrderNumber,StaffmemberID,Staffmembername,UserTabID,PhotoID1,PhotoID2,PhotoID3,PhotoID4,qrcode,validity,progress,Deposit,AllMoney,alllength,Imperial,QhWidth,Beizhuwg,Beizhuzz,Zengsong,Zhuangtai1,Zhuangtai2,By1,By2,By3,By4,By5,By6,By7,HomemadeID)"); strSql.Append(" values ("); strSql.Append("@MemberID,@MemberName,@MemberPhone,@MemberPhone1,@MemberAdd,@Orderdate,@OrderNumber,@StaffmemberID,@Staffmembername,@UserTabID,@PhotoID1,@PhotoID2,@PhotoID3,@PhotoID4,@qrcode,@validity,@progress,@Deposit,@AllMoney,@alllength,@Imperial,@QhWidth,@Beizhuwg,@Beizhuzz,@Zengsong,@Zhuangtai1,@Zhuangtai2,@By1,@By2,@By3,@By4,@By5,@By6,@By7,@HomemadeID)"); strSql.Append(";select @@IDENTITY"); SqlParameter[] parameters = { new SqlParameter("@MemberID", SqlDbType.Int, 4), new SqlParameter("@MemberName", SqlDbType.VarChar, 100), new SqlParameter("@MemberPhone", SqlDbType.VarChar, 100), new SqlParameter("@MemberPhone1", SqlDbType.VarChar, 100), new SqlParameter("@MemberAdd", SqlDbType.VarChar, 4000), new SqlParameter("@Orderdate", SqlDbType.DateTime), new SqlParameter("@OrderNumber", SqlDbType.VarChar, 100), new SqlParameter("@StaffmemberID", SqlDbType.Int, 4), new SqlParameter("@Staffmembername", SqlDbType.VarChar, 100), new SqlParameter("@UserTabID", SqlDbType.Int, 4), new SqlParameter("@PhotoID1", SqlDbType.Int, 4), new SqlParameter("@PhotoID2", SqlDbType.Int, 4), new SqlParameter("@PhotoID3", SqlDbType.Int, 4), new SqlParameter("@PhotoID4", SqlDbType.Int, 4), new SqlParameter("@qrcode", SqlDbType.VarChar, 4000), new SqlParameter("@validity", SqlDbType.DateTime), new SqlParameter("@progress", SqlDbType.Int, 4), new SqlParameter("@Deposit", SqlDbType.Decimal, 9), new SqlParameter("@AllMoney", SqlDbType.Decimal, 9), new SqlParameter("@alllength", SqlDbType.Decimal, 9), new SqlParameter("@Imperial", SqlDbType.Decimal, 9), new SqlParameter("@QhWidth", SqlDbType.Decimal, 9), new SqlParameter("@Beizhuwg", SqlDbType.VarChar, 4000), new SqlParameter("@Beizhuzz", SqlDbType.VarChar, 4000), new SqlParameter("@Zengsong", SqlDbType.VarChar, 4000), new SqlParameter("@Zhuangtai1", SqlDbType.Int, 4), new SqlParameter("@Zhuangtai2", SqlDbType.Int, 4), new SqlParameter("@By1", SqlDbType.Decimal, 9), new SqlParameter("@By2", SqlDbType.Decimal, 9), new SqlParameter("@By3", SqlDbType.Decimal, 9), new SqlParameter("@By4", SqlDbType.VarChar, 4000), new SqlParameter("@By5", SqlDbType.VarChar, 4000), new SqlParameter("@By6", SqlDbType.VarChar, 4000), new SqlParameter("@By7", SqlDbType.VarChar, 4000), new SqlParameter("@HomemadeID", SqlDbType.Int, 4) }; parameters[0].Value = model.MemberID; parameters[1].Value = model.MemberName; parameters[2].Value = model.MemberPhone; parameters[3].Value = model.MemberPhone1; parameters[4].Value = model.MemberAdd; parameters[5].Value = model.Orderdate; parameters[6].Value = model.OrderNumber; parameters[7].Value = model.StaffmemberID; parameters[8].Value = model.Staffmembername; parameters[9].Value = model.UserTabID; parameters[10].Value = model.PhotoID1; parameters[11].Value = model.PhotoID2; parameters[12].Value = model.PhotoID3; parameters[13].Value = model.PhotoID4; parameters[14].Value = model.qrcode; parameters[15].Value = model.validity; parameters[16].Value = model.progress; parameters[17].Value = model.Deposit; parameters[18].Value = model.AllMoney; parameters[19].Value = model.alllength; parameters[20].Value = model.Imperial; parameters[21].Value = model.QhWidth; parameters[22].Value = model.Beizhuwg; parameters[23].Value = model.Beizhuzz; parameters[24].Value = model.Zengsong; parameters[25].Value = model.Zhuangtai1; parameters[26].Value = model.Zhuangtai2; parameters[27].Value = model.By1; parameters[28].Value = model.By2; parameters[29].Value = model.By3; parameters[30].Value = model.By4; parameters[31].Value = model.By5; parameters[32].Value = model.By6; parameters[33].Value = model.By7; parameters[34].Value = model.HomemadeID; object obj = DbHelperSQL.GetSingle(strSql.ToString(), parameters); if (obj == null) { return(0); } else { return(Convert.ToInt32(obj)); } }
/// <summary> /// 得到一个对象实体 /// </summary> public Maticsoft.Model.OrderTab DataRowToModel(DataRow row) { Maticsoft.Model.OrderTab model = new Maticsoft.Model.OrderTab(); if (row != null) { if (row["id"] != null && row["id"].ToString() != "") { model.id = int.Parse(row["id"].ToString()); } if (row["MemberID"] != null && row["MemberID"].ToString() != "") { model.MemberID = int.Parse(row["MemberID"].ToString()); } if (row["MemberName"] != null) { model.MemberName = row["MemberName"].ToString(); } if (row["MemberPhone"] != null) { model.MemberPhone = row["MemberPhone"].ToString(); } if (row["MemberPhone1"] != null) { model.MemberPhone1 = row["MemberPhone1"].ToString(); } if (row["MemberAdd"] != null) { model.MemberAdd = row["MemberAdd"].ToString(); } if (row["Orderdate"] != null && row["Orderdate"].ToString() != "") { model.Orderdate = DateTime.Parse(row["Orderdate"].ToString()); } if (row["OrderNumber"] != null) { model.OrderNumber = row["OrderNumber"].ToString(); } if (row["StaffmemberID"] != null && row["StaffmemberID"].ToString() != "") { model.StaffmemberID = int.Parse(row["StaffmemberID"].ToString()); } if (row["Staffmembername"] != null) { model.Staffmembername = row["Staffmembername"].ToString(); } if (row["UserTabID"] != null && row["UserTabID"].ToString() != "") { model.UserTabID = int.Parse(row["UserTabID"].ToString()); } if (row["PhotoID1"] != null && row["PhotoID1"].ToString() != "") { model.PhotoID1 = int.Parse(row["PhotoID1"].ToString()); } if (row["PhotoID2"] != null && row["PhotoID2"].ToString() != "") { model.PhotoID2 = int.Parse(row["PhotoID2"].ToString()); } if (row["PhotoID3"] != null && row["PhotoID3"].ToString() != "") { model.PhotoID3 = int.Parse(row["PhotoID3"].ToString()); } if (row["PhotoID4"] != null && row["PhotoID4"].ToString() != "") { model.PhotoID4 = int.Parse(row["PhotoID4"].ToString()); } if (row["qrcode"] != null) { model.qrcode = row["qrcode"].ToString(); } if (row["validity"] != null && row["validity"].ToString() != "") { model.validity = DateTime.Parse(row["validity"].ToString()); } if (row["progress"] != null && row["progress"].ToString() != "") { model.progress = int.Parse(row["progress"].ToString()); } if (row["Deposit"] != null && row["Deposit"].ToString() != "") { model.Deposit = decimal.Parse(row["Deposit"].ToString()); } if (row["AllMoney"] != null && row["AllMoney"].ToString() != "") { model.AllMoney = decimal.Parse(row["AllMoney"].ToString()); } if (row["alllength"] != null && row["alllength"].ToString() != "") { model.alllength = decimal.Parse(row["alllength"].ToString()); } if (row["Imperial"] != null && row["Imperial"].ToString() != "") { model.Imperial = decimal.Parse(row["Imperial"].ToString()); } if (row["QhWidth"] != null && row["QhWidth"].ToString() != "") { model.QhWidth = decimal.Parse(row["QhWidth"].ToString()); } if (row["Beizhuwg"] != null) { model.Beizhuwg = row["Beizhuwg"].ToString(); } if (row["Beizhuzz"] != null) { model.Beizhuzz = row["Beizhuzz"].ToString(); } if (row["Zengsong"] != null) { model.Zengsong = row["Zengsong"].ToString(); } if (row["Zhuangtai1"] != null && row["Zhuangtai1"].ToString() != "") { model.Zhuangtai1 = int.Parse(row["Zhuangtai1"].ToString()); } if (row["Zhuangtai2"] != null && row["Zhuangtai2"].ToString() != "") { model.Zhuangtai2 = int.Parse(row["Zhuangtai2"].ToString()); } if (row["By1"] != null && row["By1"].ToString() != "") { model.By1 = decimal.Parse(row["By1"].ToString()); } if (row["By2"] != null && row["By2"].ToString() != "") { model.By2 = decimal.Parse(row["By2"].ToString()); } if (row["By3"] != null && row["By3"].ToString() != "") { model.By3 = decimal.Parse(row["By3"].ToString()); } if (row["By4"] != null) { model.By4 = row["By4"].ToString(); } if (row["By5"] != null) { model.By5 = row["By5"].ToString(); } if (row["By6"] != null) { model.By6 = row["By6"].ToString(); } if (row["By7"] != null) { model.By7 = row["By7"].ToString(); } if (row["HomemadeID"] != null && row["HomemadeID"].ToString() != "") { model.HomemadeID = int.Parse(row["HomemadeID"].ToString()); } } return(model); }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(Maticsoft.Model.OrderTab model) { StringBuilder strSql = new StringBuilder(); strSql.Append("update OrderTab set "); strSql.Append("MemberID=@MemberID,"); strSql.Append("MemberName=@MemberName,"); strSql.Append("MemberPhone=@MemberPhone,"); strSql.Append("MemberPhone1=@MemberPhone1,"); strSql.Append("MemberAdd=@MemberAdd,"); strSql.Append("Orderdate=@Orderdate,"); strSql.Append("OrderNumber=@OrderNumber,"); strSql.Append("StaffmemberID=@StaffmemberID,"); strSql.Append("Staffmembername=@Staffmembername,"); strSql.Append("UserTabID=@UserTabID,"); strSql.Append("PhotoID1=@PhotoID1,"); strSql.Append("PhotoID2=@PhotoID2,"); strSql.Append("PhotoID3=@PhotoID3,"); strSql.Append("PhotoID4=@PhotoID4,"); strSql.Append("qrcode=@qrcode,"); strSql.Append("validity=@validity,"); strSql.Append("progress=@progress,"); strSql.Append("Deposit=@Deposit,"); strSql.Append("AllMoney=@AllMoney,"); strSql.Append("alllength=@alllength,"); strSql.Append("Imperial=@Imperial,"); strSql.Append("QhWidth=@QhWidth,"); strSql.Append("Beizhuwg=@Beizhuwg,"); strSql.Append("Beizhuzz=@Beizhuzz,"); strSql.Append("Zengsong=@Zengsong,"); strSql.Append("Zhuangtai1=@Zhuangtai1,"); strSql.Append("Zhuangtai2=@Zhuangtai2,"); strSql.Append("By1=@By1,"); strSql.Append("By2=@By2,"); strSql.Append("By3=@By3,"); strSql.Append("By4=@By4,"); strSql.Append("By5=@By5,"); strSql.Append("By6=@By6,"); strSql.Append("By7=@By7,"); strSql.Append("HomemadeID=@HomemadeID"); strSql.Append(" where id=@id"); SqlParameter[] parameters = { new SqlParameter("@MemberID", SqlDbType.Int, 4), new SqlParameter("@MemberName", SqlDbType.VarChar, 100), new SqlParameter("@MemberPhone", SqlDbType.VarChar, 100), new SqlParameter("@MemberPhone1", SqlDbType.VarChar, 100), new SqlParameter("@MemberAdd", SqlDbType.VarChar, 4000), new SqlParameter("@Orderdate", SqlDbType.DateTime), new SqlParameter("@OrderNumber", SqlDbType.VarChar, 100), new SqlParameter("@StaffmemberID", SqlDbType.Int, 4), new SqlParameter("@Staffmembername", SqlDbType.VarChar, 100), new SqlParameter("@UserTabID", SqlDbType.Int, 4), new SqlParameter("@PhotoID1", SqlDbType.Int, 4), new SqlParameter("@PhotoID2", SqlDbType.Int, 4), new SqlParameter("@PhotoID3", SqlDbType.Int, 4), new SqlParameter("@PhotoID4", SqlDbType.Int, 4), new SqlParameter("@qrcode", SqlDbType.VarChar, 4000), new SqlParameter("@validity", SqlDbType.DateTime), new SqlParameter("@progress", SqlDbType.Int, 4), new SqlParameter("@Deposit", SqlDbType.Decimal, 9), new SqlParameter("@AllMoney", SqlDbType.Decimal, 9), new SqlParameter("@alllength", SqlDbType.Decimal, 9), new SqlParameter("@Imperial", SqlDbType.Decimal, 9), new SqlParameter("@QhWidth", SqlDbType.Decimal, 9), new SqlParameter("@Beizhuwg", SqlDbType.VarChar, 4000), new SqlParameter("@Beizhuzz", SqlDbType.VarChar, 4000), new SqlParameter("@Zengsong", SqlDbType.VarChar, 4000), new SqlParameter("@Zhuangtai1", SqlDbType.Int, 4), new SqlParameter("@Zhuangtai2", SqlDbType.Int, 4), new SqlParameter("@By1", SqlDbType.Decimal, 9), new SqlParameter("@By2", SqlDbType.Decimal, 9), new SqlParameter("@By3", SqlDbType.Decimal, 9), new SqlParameter("@By4", SqlDbType.VarChar, 4000), new SqlParameter("@By5", SqlDbType.VarChar, 4000), new SqlParameter("@By6", SqlDbType.VarChar, 4000), new SqlParameter("@By7", SqlDbType.VarChar, 4000), new SqlParameter("@HomemadeID", SqlDbType.Int, 4), new SqlParameter("@id", SqlDbType.Int, 4) }; parameters[0].Value = model.MemberID; parameters[1].Value = model.MemberName; parameters[2].Value = model.MemberPhone; parameters[3].Value = model.MemberPhone1; parameters[4].Value = model.MemberAdd; parameters[5].Value = model.Orderdate; parameters[6].Value = model.OrderNumber; parameters[7].Value = model.StaffmemberID; parameters[8].Value = model.Staffmembername; parameters[9].Value = model.UserTabID; parameters[10].Value = model.PhotoID1; parameters[11].Value = model.PhotoID2; parameters[12].Value = model.PhotoID3; parameters[13].Value = model.PhotoID4; parameters[14].Value = model.qrcode; parameters[15].Value = model.validity; parameters[16].Value = model.progress; parameters[17].Value = model.Deposit; parameters[18].Value = model.AllMoney; parameters[19].Value = model.alllength; parameters[20].Value = model.Imperial; parameters[21].Value = model.QhWidth; parameters[22].Value = model.Beizhuwg; parameters[23].Value = model.Beizhuzz; parameters[24].Value = model.Zengsong; parameters[25].Value = model.Zhuangtai1; parameters[26].Value = model.Zhuangtai2; parameters[27].Value = model.By1; parameters[28].Value = model.By2; parameters[29].Value = model.By3; parameters[30].Value = model.By4; parameters[31].Value = model.By5; parameters[32].Value = model.By6; parameters[33].Value = model.By7; parameters[34].Value = model.HomemadeID; parameters[35].Value = model.id; int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }