protected void btnDelete_Click(object sender, EventArgs e) { Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID, cnKey); Js.BLL.Sys.SysComDal sdal = new Js.BLL.Sys.SysComDal(cnKey); // Js.BLL.Sys.SysComDal sdal = new Js.BLL.Sys.SysComDal(); int iReturn = 0; for (int i = 0; i < this.GridView1.Rows.Count; i++) { CheckBox cb = (CheckBox)(this.GridView1.Rows[i].FindControl("cbSelect")); if (cb.Checked) { HyperLink hk = (HyperLink)(this.GridView1.Rows[i].FindControl("HyperLink1")); iReturn = sdal.GetBillCanBeEdit(FormID, hk.Text); if (iReturn == 1) JScript.Instance.ShowMessage(this.updatePanel, hk.Text + Resources.Resource.NotDelete_Checked); else if (iReturn == 2) JScript.Instance.ShowMessage(this.updatePanel, hk.Text + Resources.Resource.NotDelete_IsUsed); else { dal.Delete(hk.Text); Js.BLL.Label.StyleDal ddal = new Js.BLL.Label.StyleDal(cnKey); ddal.DeleteWarehousePagesByStyleID(hk.Text); } } } SetBtnEnabled(""); }
protected void btnDelete_Click(object sender, EventArgs e) { Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID, cnKey); //Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID); string strID = this.txtStyleID.Text; dal.Delete(strID); Js.BLL.Label.StyleDal sdal = new Js.BLL.Label.StyleDal(cnKey); sdal.DeleteWarehousePagesByStyleID(strID); btnNext_Click(sender, e); if (this.txtStyleID.Text == strID) btnPre_Click(sender, e); }