コード例 #1
0
 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;
 }
コード例 #2
0
        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("删除成功.");
        }
コード例 #3
0
 public static void insert(InspectorChargeCompanyEntity iccEnt)
 {
     DbHelper.ExecuteNonQuery("[p_InspecterChargeCompany_insert]", iccEnt.adminId, iccEnt.companyId);
 }
コード例 #4
0
        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("添加成功.");

            }
        }
コード例 #5
0
 public static void insert(InspectorChargeCompanyEntity iccEnt)
 {
     InspectorChargeCompany.insert(iccEnt);
 }
コード例 #6
0
 public static void delete(InspectorChargeCompanyEntity iccEnt)
 {
     InspectorChargeCompany.delete(iccEnt);
 }