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 Page_Load(object sender, EventArgs e) { ID = Request.QueryString["ID"] + ""; FormID = Request.QueryString["FormID"] + ""; if (!IsPostBack) { BindDropDownList(); ViewState["StrWhere"] = string.Format(" MemberID='{0}'", ID); Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID, cnKey); DataTable dt = dal.GetRecord(ViewState["StrWhere"].ToString()); ViewState["dt"] = dt; Js.BLL.Sys.SysComDal sdal = new Js.BLL.Sys.SysComDal(cnKey); BindData(dt); if (sdal.GetBillCanBeEdit(FormID, ID) > 0) this.btnEdit.Enabled = false; } }
protected void Page_Load(object sender, EventArgs e) { ID = Request.QueryString["ID"] + ""; FormID = Request.QueryString["FormID"] + ""; if (!IsPostBack) { BindDropDownList(); ViewState["StrWhere"] = string.Format(" StyleID='{0}'", ID); Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID, cnKey); DataTable dt = dal.GetRecord(ViewState["StrWhere"].ToString()); ViewState["dt"] = dt; Js.BLL.Sys.SysComDal sdal = new Js.BLL.Sys.SysComDal(cnKey); BindData(dt); if (sdal.GetBillCanBeEdit(FormID, ID) > 0) this.btnEdit.Enabled = false; //this.ddlAntiCounterfeitType.Enabled = false; this.ddlImageLocation.Enabled = false; this.ddlQRContent.Enabled = false; //this.ddlBaseMaterial.Enabled = false; //this.ddlBeAffixedMaterial.Enabled = false; //this.ddlBeAffixedShape.Enabled = false; //this.ddlTextureMaterial.Enabled = false; //this.ddlGlue.Enabled = false; //this.txtLowQuantity.Attributes.Add("style", "text-align:right"); //this.txtSparesPercent.Attributes.Add("style", "text-align:right"); this.txtLength.Attributes.Add("style", "text-align:right"); this.txtWidth.Attributes.Add("style", "text-align:right"); this.txtHeight.Attributes.Add("style", "text-align:right"); writeJsvar(FormID, cnKey, ""); } }
protected void Page_Load(object sender, EventArgs e) { ID = Request.QueryString["ID"] + ""; FormID = Request.QueryString["FormID"] + ""; if (!IsPostBack) { ViewState["StrWhere"] = string.Format(" BillID='{0}'", ID); Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID, cnKey); DataTable dt = dal.GetRecord(ViewState["StrWhere"].ToString()); ViewState["dt"] = dt; Js.BLL.Sys.SysComDal sdal = new Js.BLL.Sys.SysComDal(cnKey); BindData(dt); if (sdal.GetBillCanBeEdit(FormID, ID) > 0) this.btnEdit.Enabled = false; if (Session["UserType"] == "BU") { this.btnEPCheck.Visible = false; //this.txtEP_CheckUserName.Width = "90%"; } else { this.btnInvalid.Visible = false; this.btnBUCheck.Visible = false; } } }
protected void Page_Load(object sender, EventArgs e) { ID = Request.QueryString["ID"] + ""; FormID = Request.QueryString["FormID"] + ""; if (!IsPostBack) { BindDropDownList(); //ViewState["StrWhere"] = string.Format(" BillID='{0}'", ID); Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID, cnKey); DataTable dt = dal.GetViewRecord(string.Format(_strWhere, ID)); Js.BLL.Sys.SysComDal sdal = new Js.BLL.Sys.SysComDal(cnKey); BindData(dt); if (sdal.GetBillCanBeEdit(FormID, ID) > 0) this.btnEdit.Enabled = false; if ("" + Session["UserType"] == "EP") { this.btnBUCheck.Visible = false; // this.GridView1.Columns[7].Visible = false; // this.GridView1.Columns[15].Visible = false; // this.GridView1.Columns[19].Visible = false; // this.GridView1.Columns[24].Visible = false; // this.GridView1.Columns[25].Visible = false; } //else //{ // this.btnEPCheck.Visible = false; //} this.txtTotalPages.Attributes.Add("style", "text-align:right"); writeJsvar(FormID, cnKey, ""); } }
protected void Page_Load(object sender, EventArgs e) { ID = Request.QueryString["ID"] + ""; FormID = Request.QueryString["FormID"] + ""; if (!IsPostBack) { BindDropDownList(); ViewState["StrWhere"] = string.Format(" BillID='{0}'", ID); Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID, cnKey); DataTable dt = dal.GetRecord(ViewState["StrWhere"].ToString()); ViewState["dt"] = dt; Js.BLL.Sys.SysComDal sdal = new Js.BLL.Sys.SysComDal(cnKey); BindData(dt); if (sdal.GetBillCanBeEdit(FormID, ID) > 0) this.btnEdit.Enabled = false; //this.ddlAntiCounterfeitType.Enabled = false; //this.ddlImageLocation.Enabled = false; //this.ddlQRContent.Enabled = false; //this.ddlBaseMaterial.Enabled = false; //this.ddlBeAffixedMaterial.Enabled = false; //this.ddlTextureMaterial.Enabled = false; //this.ddlGlue.Enabled = false; } }
protected void Page_Load(object sender, EventArgs e) { if (Session["cnKey"] != null) cnKey = Session["cnKey"].ToString(); ID = Request.QueryString["ID"] + ""; FormID = Request.QueryString["FormID"] + ""; if (!IsPostBack) { ViewState["StrWhere"] = string.Format(" DepartmentID='{0}' and EnterpriseID='{1}'", ID, Session["EnterpriseID"].ToString()); Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID, cnKey); DataTable dt = dal.GetRecord(ViewState["StrWhere"].ToString()); ViewState["dt"] = dt; Js.BLL.Sys.SysComDal sdal = new Js.BLL.Sys.SysComDal(cnKey); BindData(dt); if (sdal.GetBillCanBeEdit(FormID, ID, "EnterpriseID='" + Session["EnterpriseID"].ToString() + "'") > 0) this.btnEdit.Enabled = false; } }