protected void btnsave_Click(object sender, EventArgs e) { bool result = true; result = ts_cust_sf.Exists(txt_twocust.Text); result = ts_cust_sf.Exists(txt_threecust.Text); if (result) { if (ts_cust_sf.Exists(txt_twocust.Text, txt_threecust.Text)) { Mod_TS_CUST_SF mod = new Mod_TS_CUST_SF(); mod.C_CUSTCODE = txt_threecust.Text; mod.C_CUSTCODE_PARENT = txt_twocust.Text; mod.C_EMPNAME = ltlemp.Text; if (ts_cust_sf.InsertList(mod)) { GetList(); } } else { WebMsg.MessageBox("已重复添加"); } } else { WebMsg.MessageBox("客户编码不存在,请联系销售客服"); } }
public bool InsertList(Mod_TS_CUST_SF mod) { string strSql = $@"INSERT INTO TS_CUST_SF(C_CUSTCODE,C_CUSTCODE_PARENT,C_EMPNAME)VALUES("; strSql += $@"'{mod.C_CUSTCODE}',"; strSql += $@"'{mod.C_CUSTCODE_PARENT}',"; strSql += $@"'{mod.C_EMPNAME}'"; strSql += ")"; return(DbHelperOra.ExecuteSql(strSql) > 0 ? true : false); }
public bool InsertList(Mod_TS_CUST_SF mod) { return(dal.InsertList(mod)); }