public static InspectorChargeCompanyEntity getByCompanyId(int companyId) { InspectorChargeCompanyEntity iccEnt = new InspectorChargeCompanyEntity(); DataRow dr = DbHelper.ExecuteDataRow("[dbo].[p_InspectorChargeCompany_getByCompanyId]", companyId); if (dr != null) { iccEnt.companyId = companyId; iccEnt.iccId = Convert.ToInt32(dr["iccId"]); iccEnt.adminId = Convert.ToInt32(dr["adminId"]); } return iccEnt; }
protected void btnDel_Click(object sender, EventArgs e) { for (int i = 0; i < rpt_icclist.Items.Count; i++) { RepeaterItem row = rpt_icclist.Items[i]; HiddenField hdcid = row.FindControl("hidiccid") as HiddenField; CheckBox chk = row.FindControl("chkChosed") as CheckBox; if (chk.Checked) { int companyid = Convert.ToInt32(hdcid.Value.ToString()); InspectorChargeCompanyEntity iccEnt = new InspectorChargeCompanyEntity(); iccEnt.adminId = sysAdminId; iccEnt.companyId = companyid; logic.inspectorChargeCompany.delete(iccEnt); } } rpt_icclistBind(); Library.Script.ClientMsg("删除成功."); }
public static void insert(InspectorChargeCompanyEntity iccEnt) { DbHelper.ExecuteNonQuery("[p_InspecterChargeCompany_insert]", iccEnt.adminId, iccEnt.companyId); }
protected void rpt_list_ItemCommand(object source, RepeaterCommandEventArgs e) { if (e.CommandName == "Add") { int companyid = Convert.ToInt32(e.CommandArgument.ToString()); InspectorChargeCompanyEntity iccEnt = new InspectorChargeCompanyEntity(); iccEnt.adminId = sysAdminId; iccEnt.companyId = companyid; logic.inspectorChargeCompany.insert(iccEnt); rptBind(); rpt_icclistBind(); add_buyer.Show(); Library.Script.ClientMsg("添加成功."); } }
public static void insert(InspectorChargeCompanyEntity iccEnt) { InspectorChargeCompany.insert(iccEnt); }
public static void delete(InspectorChargeCompanyEntity iccEnt) { InspectorChargeCompany.delete(iccEnt); }