protected void btnDeletet_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);// "EnterpriseID='" + Session["EnterpriseID"].ToString() + "'"); 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);//, "EnterpriseID='" + Session["EnterpriseID"].ToString() + "'"); dal.DeleteDetail(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.txtBillID.Text; dal.Delete(strID);//, "EnterpriseID='" + this.txtEnterpriseID.Text + "'"); dal.DeleteDetail(strID); btnNext_Click(sender, e); if (this.txtBillID.Text == strID) btnPre_Click(sender, e); if (this.txtBillID.Text == strID) Response.Redirect("Orders.aspx?FormID=" + Server.UrlEncode(FormID)); }
protected void btnDeletet_Click(object sender, EventArgs e) { Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID); 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")); dal.Delete(hk.Text); dal.DeleteDetail(hk.Text); } } SetBtnEnabled(""); }