protected void Page_Load(object sender, EventArgs e) { if (Session["m_UserID"] != null && _VR.Check(Path.GetFileNameWithoutExtension(Page.AppRelativeVirtualPath), Session["m_UserID"].ToString())) { ShowGroupData_Code(); if (Request.QueryString["g_name"] != null) { pnlUpdate.Visible = true; string G_Name = Request.QueryString["g_name"].ToString(); if (!IsPostBack) { ShowGroupUpdate(G_Name); } } else { if (!IsPostBack) { pnlUpdate.Visible = false; } } } else { Response.Redirect("~/AuthorizationFailed"); } }
protected void Page_Load(object sender, EventArgs e) { if (Session["m_UserID"] != null && _VR.Check(Path.GetFileNameWithoutExtension(Page.AppRelativeVirtualPath), Session["m_UserID"].ToString())) { btnUpdate.Visible = false; if (!IsPostBack) { Brand(); } if (Request.QueryString["ed_id"] != null) { string ID = Request.QueryString["ed_id"].ToString(); btnSave.Visible = false; btnUpdate.Visible = true; if (_chk.int32CheckSecurity("select count(*) from ProductAdd where p_id=" + ID, 1)) { string st = " from ProductAdd where p_id=" + ID; if (!IsPostBack) { txtBuingPrice.Text = _chk.stringCheck("select BuingPrice " + st); txtDescription.Text = _chk.stringCheck("select Description " + st); txtProductName.Text = _chk.stringCheck("select Name " + st); txtSellingPrice.Text = _chk.stringCheck("select SellingPrice " + st); ddlBrand.SelectedValue = _chk.stringCheck("select b_id" + st); ddlUnit.SelectedValue = _chk.stringCheck("select Unit" + st); } } else { pnlDelete.Visible = false; btnSave.Visible = false; btnUpdate.Visible = false; lblResult.Text = "<div class='alert alert-danger'><span>" + _chk.Int32SecurityCheckError + "</span></div> "; } } if (Request.QueryString["de_id"] != null) { string ID = Request.QueryString["de_id"].ToString(); pnlDelete.Visible = false; btnSave.Visible = false; btnUpdate.Visible = false; if (_chk.int32CheckSecurity("select count(*) from ProductAdd where p_id=" + ID, 1)) { _chk.stringCheck("delete from ProductAdd where p_id=" + ID); lblResult.Text = "<div class='alert alert-success'><span> Product Deleted </span></div> "; } else { pnlDelete.Visible = false; btnSave.Visible = false; btnUpdate.Visible = false; lblResult.Text = "<div class='alert alert-danger'><span>" + _chk.Int32SecurityCheckError + "</span></div> "; } } } else { Response.Redirect("~/AuthorizationFailed"); } }
protected void Page_Load(object sender, EventArgs e) { if (Session["m_UserID"] != null && _VR.Check(Path.GetFileNameWithoutExtension(Page.AppRelativeVirtualPath), Session["m_UserID"].ToString())) { if (!IsPostBack) { Show(); } if (Request.QueryString["de_id"] != null) { string ID = Request.QueryString["de_id"].ToString(); if (_chk.BoolSecurityCheck("select count(*) from ReturnProduct where r_id=" + ID)) { _chk.BoolSecurityCheck("delete from ReturnProduct where r_id=" + ID); Response.Redirect("../Return/Purchase_Add"); } else { Response.Redirect("../Error?=Return ID Not Found"); } } } else { Response.Redirect("~/AuthorizationFailed"); } }
protected void Page_Load(object sender, EventArgs e) { if (Session["m_UserID"] != null && _VR.Check(Path.GetFileNameWithoutExtension(Page.AppRelativeVirtualPath), Session["m_UserID"].ToString())) { if (Request.QueryString[""] != null) { string ID = Request.QueryString[""].ToString(); if (_Chk.int32Check("select count(*) from Customer where c_id=" + ID) == 1) { string st = " from Customer where c_id=" + ID; lblName.Controls.Add(new LiteralControl(_Chk.stringCheck("select Name" + st))); lblCustomerID.Controls.Add(new LiteralControl(ID)); lblDetails.Controls.Add(new LiteralControl(_Chk.stringCheck("select Details" + st))); lblEmail.Controls.Add(new LiteralControl(_Chk.stringCheck("select Email" + st))); lblGender.Controls.Add(new LiteralControl(_Chk.stringCheck("select Gender" + st))); lblPhone.Controls.Add(new LiteralControl(_Chk.stringCheck("select Mobile" + st))); lblAddress.Controls.Add(new LiteralControl(_Chk.stringCheck("select Address" + st))); Show(); } else { Response.Redirect("Error?=Customer Not Found."); } } } else { Response.Redirect("~/AuthorizationFailed"); } }
protected void Page_Load(object sender, EventArgs e) { if (Session["m_UserID"] != null && _VR.Check(Path.GetFileNameWithoutExtension(Page.AppRelativeVirtualPath), Session["m_UserID"].ToString())) { if (Request.QueryString[""] != null) { string invoice = Request.QueryString[""].ToString(); if (chk.int32CheckSecurity("select count(*) from ReturnProduct where r_id=" + invoice, 1)) { CompanyImage.ImageUrl = "../image/" + chk.stringCheck("select ValueString from Settings where id=7"); //bar.BarcodeFontSize = chk.int32Check("select ValueInt from Settings where id=9"); //bar.BarcodeWidth = chk.int32Check("select ValueInt from Settings where id=10"); //bar.BarcodeHigth = chk.int32Check("select ValueInt from Settings where id=11"); //lblTermsAndCondition.Text = chk.stringCheck("select ValueString from Settings where id=8"); //BarcodeShow.ImageUrl = bar.BarcodeGenerator(invoice); //BarcodeShow.Height = bar.ImageHeigth; //BarcodeShow.Width = bar.ImageWidth; lblInvoice.Text = invoice; lblCompanyName.Text = chk.stringCheck("select ValueString from Settings where id=3"); lblCompanyAddress1.Text = chk.stringCheck("select ValueString from Settings where id=4"); lblCompanyAddress2.Text = chk.stringCheck("select ValueString from Settings where id=5"); lblCompanyPhone.Text = chk.stringCheck("select ValueString from Settings where id=6"); string st = " from ReturnProduct where r_id=" + invoice; string SupploerID = chk.stringCheck("select c_id " + st); if (SupploerID != "0") { var supplier = " from Supplier where c_id=" + SupploerID; lblCustomarName.Text = chk.stringCheck("select Name " + supplier); lblCustomarAddress.Text = chk.stringCheck("select Address " + supplier); lblCustomarPhone.Text = chk.stringCheck("select Mobile " + supplier); } lblDate.Text = chk.stringCheck("select InputDate " + st); lblTotal.Text = chk.stringCheck("select Amount " + st); lblTotal.Text = chk.stringCheck("select Amount " + st); lblProductName.Text = chk.stringCheck("select ProductName " + st); lblDiscription.Text = chk.stringCheck("select Remark " + st); lblReturnPrice.Text = chk.stringCheck("select ReturnPrice " + st); lblQuantity.Text = chk.stringCheck("select RetuenIteam " + st); lblTotalCost.Text = chk.stringCheck("select Amount " + st); divAlign.Attributes.Add("class", "row d-flex " + chk.stringCheck("select ValueString from Settings where id=14")); divSize.Attributes.Add("class", chk.stringCheck("select ValueString from Settings where id=15")); } else { Response.Redirect("../Error?=Invoice Not Found try Again"); } } } else { Response.Redirect("~/AuthorizationFailed"); } }
protected void Page_Load(object sender, EventArgs e) { if (Session["m_UserID"] != null && _VR.Check(Path.GetFileNameWithoutExtension(Page.AppRelativeVirtualPath), Session["m_UserID"].ToString())) { if (!IsPostBack) { showProduct(); showSupplier(); txtBuyQuantity.Enabled = false; btnStockAdd.Enabled = false; txtAmount.Enabled = false; txtBuyingPrice.Enabled = false; } //txtBuyQuantity.Attributes.Add("onkeyup", "Sum();"); if (Request.QueryString["de"] != null) { string ID = Request.QueryString["de"].ToString(); Delete(Convert.ToInt32(ID)); } ShowDatainList(); } else { Response.Redirect("~/AuthorizationFailed"); } }
protected void Page_Load(object sender, EventArgs e) { if (Session["m_UserID"] != null && _VR.Check(Path.GetFileNameWithoutExtension(Page.AppRelativeVirtualPath), Session["m_UserID"].ToString())) { if (!IsPostBack) { Show(); } if (Request.QueryString["de"] != null) { string StockID = Request.QueryString["de"].ToString(); if (Chk.int32CheckSecurity("select count(*) from StockList where stock_id='" + StockID + "' ", 1)) { Chk.stringCheck("delete from StockList where stock_id='" + StockID + "' "); Chk.stringCheck("delete from Stock where stock_id='" + StockID + "' "); Response.Redirect("../Product/Product_StockList"); } else { Response.Redirect("../Error?=Please check your url it not found any data."); } } if (Request.QueryString["cng_id"] != null && Request.QueryString["auth"] != null) { string StockID = Request.QueryString["cng_id"].ToString(); string Make = Request.QueryString["auth"].ToString(); string Auth = ""; if (Make == "1") { Auth = "True"; } else { Auth = "False"; } if (Chk.int32CheckSecurity("select count(*) from StockList where stock_id='" + StockID + "' ", 1)) { Chk.boolCheck("update StockList set Activity='" + Auth + "' where stock_id='" + StockID + "' "); Response.Redirect("../Product/Product_StockList"); } else { Response.Redirect("../Error?=Please check your url it not found any data."); } } } else { if (Session["m_UserID"] != null) { Response.Redirect("~/AuthorizationFailed"); } else { Response.Redirect("~/Login?=" + Request.Url.AbsolutePath); } } }
protected void Page_Load(object sender, EventArgs e) { if (Session["m_UserID"] != null && _VR.Check(Path.GetFileNameWithoutExtension(Page.AppRelativeVirtualPath), Session["m_UserID"].ToString())) { if (Request.QueryString[""] != null) { string invoice = Request.QueryString[""].ToString(); if (chk.int32CheckSecurity("select count(*) from SaleList where Invoice_no='" + invoice + "' ", 1)) { CompanyImage.ImageUrl = "../image/" + chk.stringCheck("select ValueString from Settings where id=7"); bar.BarcodeFontSize = chk.int32Check("select ValueInt from Settings where id=9"); bar.BarcodeWidth = chk.int32Check("select ValueInt from Settings where id=10"); bar.BarcodeHigth = chk.int32Check("select ValueInt from Settings where id=11"); lblTermsAndCondition.Text = chk.stringCheck("select ValueString from Settings where id=8"); BarcodeShow.ImageUrl = bar.BarcodeGenerator(invoice); BarcodeShow.Height = bar.ImageHeigth; BarcodeShow.Width = bar.ImageWidth; lblInvoice.Text = invoice; lblCompanyName.Text = chk.stringCheck("select ValueString from Settings where id=3"); lblCompanyAddress1.Text = chk.stringCheck("select ValueString from Settings where id=4"); lblCompanyAddress2.Text = chk.stringCheck("select ValueString from Settings where id=5"); lblCompanyPhone.Text = chk.stringCheck("select ValueString from Settings where id=6"); string st = " from SaleList where Invoice_no='" + invoice + "' "; lblCustomarName.Text = chk.stringCheck("select CustomerName " + st); lblCustomarAddress.Text = chk.stringCheck("select CustomerAddress " + st); lblCustomarPhone.Text = chk.stringCheck("select CustomerMobile " + st); lblorderID.Text = chk.stringCheck("select sale_id " + st); lblDate.Text = chk.stringCheck("select SubmitDate " + st); lblDiscount.Text = chk.stringCheck("select DiscountAmount " + st); lblDue.Text = chk.stringCheck("select TotalDue " + st); lblPaid.Text = chk.stringCheck("select Payment " + st); lblPreviousDue.Text = chk.stringCheck("select PreviousDue " + st); lblSubTotal.Text = chk.stringCheck("select SubTotal " + st); double Payment = Convert.ToDouble(chk.int32Check("select Payment " + st)); double TotalDue = Convert.ToDouble(chk.int32Check("select TotalDue " + st)); lblTotal.Text = (Payment + TotalDue).ToString(); lblVat.Text = chk.stringCheck("select VatAmount " + st); lblInWord.Text = chk.stringCheck("select InWord " + st); lblMemo.Text = chk.stringCheck("select Memo " + st); divAlign.Attributes.Add("class", "row d-flex " + chk.stringCheck("select ValueString from Settings where id=12")); divSize.Attributes.Add("class", chk.stringCheck("select ValueString from Settings where id=13")); SaleProductList(invoice); } else { Response.Redirect("../Error?=Invoice Not Found try Again"); } } } else { Response.Redirect("~/AuthorizationFailed"); } }
protected void Page_Load(object sender, EventArgs e) { //session check and Verify the page authrity if (Session["m_UserID"] != null && _VR.Check(Path.GetFileNameWithoutExtension(Page.AppRelativeVirtualPath), Session["m_UserID"].ToString())) { if (!IsPostBack) { showProduct();//show the product in dorpdownlist } pnlReturnIteams.Visible = false; pnlSaleIteams.Visible = false; pnlShowRetuen.Visible = false; pnlPreviousReturn.Visible = false; pnlRemark.Visible = false; if (Request.QueryString["sc_id"] != null && Request.QueryString["s_id"] != null) { pnlReturnIteams.Visible = true; pnlSaleIteams.Visible = true; pnlShowRetuen.Visible = true; pnlPreviousReturn.Visible = true; pnlRemark.Visible = true; string sc_id = Request.QueryString["s_id"].ToString(); string s_id = Request.QueryString["sc_id"].ToString(); var st = " from Stock where s_id=" + s_id; int Sale = 0; if (chk.int32Check("select count(*) from SaleProductList where s_id=" + s_id) > 0) { Sale = chk.int32Check("select sum(Quantity) from SaleProductList where s_id=" + s_id); } int totalIteams = chk.int32Check("select BuyQuantity " + st); int Avaiable = totalIteams - Sale; // int BuyingPrice = chk.int32Check("select BuyingPrice " + st); int PreviousReturn = 0; if (!IsPostBack) { if (chk.int32Check("select count(*) from ReturnProduct where s_id=" + Convert.ToInt32(s_id) + " ") > 0) { PreviousReturn = chk.int32Check("select sum(RetuenIteam) from ReturnProduct where s_id=" + s_id); } Avaiable = (Avaiable - PreviousReturn); txtPreviousReturn.Text = PreviousReturn.ToString(); txtBuyingPrice.Text = chk.stringCheck("select BuyingPrice " + st); txtAmount.Text = "0";// chk.stringCheck("select BuyingPrice " + st); txtAvaiableStock.Text = Avaiable.ToString(); txtSaleIteams.Text = Sale.ToString(); //txtTtotalAmount.Text = chk.stringCheck("select Amount " + st); txtUnit.Text = chk.stringCheck("select Unit " + st); } } } else { Response.Redirect("~/AuthorizationFailed"); } }
protected void Page_Load(object sender, EventArgs e) { if (Session["m_UserID"] != null && _VR.Check(Path.GetFileNameWithoutExtension(Page.AppRelativeVirtualPath), Session["m_UserID"].ToString())) { } else { Response.Redirect("~/AuthorizationFailed"); } }
protected void Page_Load(object sender, EventArgs e) { if (Session["m_UserID"] != null && _VR.Check(Path.GetFileNameWithoutExtension(Page.AppRelativeVirtualPath), Session["m_UserID"].ToString())) { if (!IsPostBack) { showProdut(); pnlStockAdd.Visible = false; txtManualBarcode.Visible = false; chkAutomatic.Checked = true; btnBarCodeGenerater.Visible = false; btnClear.Visible = false; } if (Request.QueryString["p"] != null) { lblProductName.Text = "<strong>(" + Request.QueryString["p"].ToString() + ")</strong>"; } if (Request.QueryString["stock"] != null) { string C_ID = Request.QueryString["stock"].ToString(); pnlTable.Visible = false; pnlStockAdd.Visible = true; //pnlQuantity.Visible = false; //pnlStockAdd.Visible = true; if (chk.int32CheckSecurity("select count(*) from Stock where s_id=" + C_ID, 1)) { showBarCodes(); S_ID = C_ID; string StockID = chk.stringCheck("select stock_id from Stock where s_id=" + C_ID); string p_id = chk.stringCheck("select p_id from Stock where s_id=" + C_ID); P_ID = p_id; int BuyQuantity = chk.int32Check("select BuyQuantity from Stock where s_id=" + C_ID); int Sale = saleCount(Convert.ToInt32(C_ID)); int SellingPrice = chk.int32Check("select SellingPrice from ProductAdd where p_id=" + p_id); int Avaiable = BuyQuantity - Sale; Avaiable_Product = Avaiable; lblAvaiable.Text = Avaiable.ToString(); if (!IsPostBack) { //txtSellingPrice.Text = SellingPrice.ToString(); txtAmount.Text = SellingPrice.ToString(); //txtUnit.Text = chk.stringCheck("select Unit from Stock where s_id=" + C_ID); } } else { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "Notify", "alert('Error: " + chk.Int32SecurityCheckError + "');", true); } } } else { Response.Redirect("~/AuthorizationFailed"); } }
protected void Page_Load(object sender, EventArgs e) { if (Session["m_UserID"] != null && _VR.Check(Path.GetFileNameWithoutExtension(Page.AppRelativeVirtualPath), Session["m_UserID"].ToString())) { btnUpdateBrand.Visible = false; if (!IsPostBack) { ShowWirehouse(); } if (Request.QueryString["d_b_id"] != null) { string ID = Request.QueryString["d_b_id"].ToString(); if (_chk.int32Check("select count(*) from Brand where b_id='" + ID + "'") == 1) { _chk.stringCheck("delete from Brand where b_id='" + ID + "'"); pnlUpdate.Visible = false; btnBrand.Visible = false; btnUpdateBrand.Visible = false; txtBrandName.Visible = false; lblResult.Text = "<div class='alert alert-success'><span>Brand Deleted.</span></div> "; } else { Response.Redirect(ErrorPage + "?=Brand id Not Found. Not Delete"); } } if (Request.QueryString["b_id"] != null) { string ID = Request.QueryString["b_id"].ToString(); if (_chk.int32Check("select count(*) from Brand where b_id='" + ID + "'") == 1) { //ddlCategory.Visible = false; //ddlSubCategory.Visible = false; // ddlWirehouse.Visible = false; if (!IsPostBack) { txtBrandName.Text = _chk.stringCheck("select BrandName from Brand where b_id='" + ID + "'"); } btnUpdateBrand.Visible = true; btnBrand.Visible = false; pnlUpdate.Visible = false; } else { Response.Redirect(ErrorPage + "?=Brand id Not Found."); } } } else { Response.Redirect("~/AuthorizationFailed"); } }
//Check _chk = new Check(); protected void Page_Load(object sender, EventArgs e) { //DropDownList WireHouse = Master.FindControl("WireHouse") as DropDownList; //ShowCategory(WireHouse.SelectedValue.ToString()); if (Session["m_UserID"] != null && _VR.Check(Path.GetFileNameWithoutExtension(Page.AppRelativeVirtualPath), Session["m_UserID"].ToString())) { btnUpdateSubCategory.Visible = false; if (!IsPostBack) { ShowWirehouse(); } if (Request.QueryString["sc_id"] != null) { string ID = Request.QueryString["sc_id"].ToString(); if (_chk.int32Check("select count(*) from SubCategory where s_id='" + ID + "' ") == 1) { pnlUpdate.Visible = false; btnAddSubCategory.Visible = false; btnUpdateSubCategory.Visible = true; if (!IsPostBack) { txtSubCategoryName.Text = _chk.stringCheck("select Sub_Category_Name from SubCategory where s_id='" + ID + "'"); } } else { Response.Redirect("Error?=SubCategoty ID Not Found."); } } if (Request.QueryString["d_sc_id"] != null) { string ID = Request.QueryString["d_sc_id"].ToString(); if (_chk.int32Check("select count(*) from SubCategory where s_id='" + ID + "' ") == 1) { pnlUpdate.Visible = false; btnAddSubCategory.Visible = false; btnUpdateSubCategory.Visible = false; txtSubCategoryName.Visible = false; _chk.stringCheck("delete from SubCategory where s_id='" + ID + "'"); lblResult.Text = "<div class='alert alert-success'><span>Sub Category Update.</span></div> "; } else { Response.Redirect("Error?=SubCategoty ID Not Found."); } } } else { Response.Redirect("~/AuthorizationFailed"); } }
protected void Page_Load(object sender, EventArgs e) { if (Session["m_UserID"] != null && _VR.Check(Path.GetFileNameWithoutExtension(Page.AppRelativeVirtualPath), Session["m_UserID"].ToString())) { if (!IsPostBack) { Show(); showData(); } if (Request.QueryString["id"] != null && Request.QueryString["St"] != null) { string ID = Request.QueryString["id"].ToString(); string Status = Request.QueryString["St"].ToString(); if (Status == "1") { Status = "Approved"; } else { Status = "Pending"; } if (Chk.BoolSecurityCheck("update Expanse set Status='" + Status + "',InputDateTime='" + DateTime.Now.ToString() + "' where e_id=" + ID) && Chk.int32CheckSecurity("select count(*) from Expanse where e_id=" + ID, 1)) { Response.Redirect("../Expanse/ExpanseAdd"); } else { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "Notify", "alert('Messege 1: " + Chk.BoolSecurityErrorMessege + " \n Messege 2:" + Chk.Int32SecurityCheckError + "');", true); } } if (Request.QueryString["eid"] != null) { string ID = Request.QueryString["id"].ToString(); if (Chk.BoolSecurityCheck("delete from Expanse where e_id=" + ID) && Chk.int32CheckSecurity("select count(*) from Expanse where e_id=" + ID, 1)) { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "Notify", "alert('Messege : Delete Successfully');", true); Response.Redirect("../Expanse/ExpanseAdd"); } else { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "Notify", "alert('Messege 1: " + Chk.BoolSecurityErrorMessege + " \n Messege 2:" + Chk.Int32SecurityCheckError + "');", true); } } } else { Response.Redirect("~/AuthorizationFailed"); } }
protected void Page_Load(object sender, EventArgs e) { if (Session["m_UserID"] != null && _VR.Check(Path.GetFileNameWithoutExtension(Page.AppRelativeVirtualPath), Session["m_UserID"].ToString())) { //btnUpdateBrand.Visible = false; if (!IsPostBack) { ShowWirehouse(); ShowData(); } } else { Response.Redirect("~/AuthorizationFailed"); } }
protected void Page_Load(object sender, EventArgs e) { //DropDownList WireHouse = (DropDownList)Master.FindControl("WireHouse") as DropDownList; //WireHouse.Page = Master.fi; //WireHouse.; if (Session["m_UserID"] != null && _VR.Check(Path.GetFileNameWithoutExtension(Page.AppRelativeVirtualPath), Session["m_UserID"].ToString())) { btnUpdateCategory.Visible = false; if (Request.QueryString["c_id"] != null) { btnUpdateCategory.Visible = true; btnAddCategory.Visible = false; string Category_id = Request.QueryString["c_id"].ToString(); //_chk.ConfigarationName = "dbm"; if (_chk.int32Check("select count(*) from Category where c_id='" + Category_id + "' ") == 1) { txtCategoryName.Text = _chk.stringCheck("select CategoryName from Category where c_id='" + Category_id + "'"); } else { Response.Redirect(ErrorPage + "?=Category id Not Found."); } } if (Request.QueryString["dc_id"] != null) { btnAddCategory.Visible = false; btnUpdateCategory.Visible = false; txtCategoryName.Visible = false; string Category_id = Request.QueryString["dc_id"].ToString(); if (_chk.int32Check("select count(*) from Category where c_id='" + Category_id + "' ") == 1) { _chk.stringCheck("delete from Category where c_id='" + Category_id + "'"); lblResult.Text = "<div class='alert alert-success'><span>Category Deleted.</span></div>"; } else { Response.Redirect(ErrorPage + "?=Category id Not Found."); } } } else { Response.Redirect("~/AuthorizationFailed"); } }
protected void Page_Load(object sender, EventArgs e) { if (Session["m_UserID"] != null && _VR.Check(Path.GetFileNameWithoutExtension(Page.AppRelativeVirtualPath), Session["m_UserID"].ToString())) { btnUpdate.Visible = false; if (Request.QueryString["ed_id"] != null) { btnCreate.Visible = false; btnUpdate.Visible = true; string ID = Request.QueryString["ed_id"].ToString(); string st = " from Customer where c_id=" + ID; if (!IsPostBack) { txtAddress.Text = _Chk.stringCheck("select Address " + st); txtDetails.Text = _Chk.stringCheck("select Details " + st); txtEmail.Text = _Chk.stringCheck("select Email " + st); txtMobileNumber.Text = _Chk.stringCheck("select Mobile " + st); txtName.Text = _Chk.stringCheck("select Name " + st); ddlGender.SelectedValue = _Chk.stringCheck("select Gender " + st); } } if (Request.QueryString["de_id"] != null) { pnlDelete.Visible = false; btnCreate.Visible = false; btnUpdate.Visible = false; if (_Chk.BoolSecurityCheck("delete from Customer where c_id=" + Request.QueryString["de_id"].ToString())) { lblResult.Text = "<div class='alert alert-success'><span>Customer Delete.</span></div> "; } else { lblResult.Text = "<div class='alert alert-danger'><span>" + _Chk.BoolSecurityErrorMessege + "</span></div> "; } } } else { Response.Redirect("~/AuthorizationFailed"); } }
protected void Page_Load(object sender, EventArgs e) { if (Session["m_UserID"] != null && _VR.Check(Path.GetFileNameWithoutExtension(Page.AppRelativeVirtualPath), Session["m_UserID"].ToString())) { if (!IsPostBack) { showProdut(); } } else { if (Session["m_UserID"] != null) { Response.Redirect("~/AuthorizationFailed"); } else { Response.Redirect("~/Login?=" + Request.Url.AbsolutePath); } } }
protected void Page_Load(object sender, EventArgs e) { if (Session["m_UserID"] != null && _VR.Check(Path.GetFileNameWithoutExtension(Page.AppRelativeVirtualPath), Session["m_UserID"].ToString())) { if (Request.QueryString[""] != null) { string GenertID = Request.QueryString[""].ToString(); if (chk.int32Check("select count(*) from Barcode where GeneratID='" + GenertID + "'") > 0) { int B_Width = settings.Get_InValue_Settings(17); int B_Height = settings.Get_InValue_Settings(18); int FontSize = settings.Get_InValue_Settings(19); string PointX = settings.Get_StringValue_Settings(20); string PointY = settings.Get_StringValue_Settings(21); Color B_Color = FindColor(settings.Get_StringValue_Settings(22)); string FontName = settings.Get_StringValue_Settings(23); bool PriceTag = settings.Get_BoolValue_Settings(24); bool CompanyTag = settings.Get_BoolValue_Settings(24); string BarCode_Col_MD = settings.Get_StringValue_Settings(26); string BarCode_Image_width = settings.Get_StringValue_Settings(27); bool PriceTagEnable = settings.Get_BoolValue_Settings(24); bool CompanyTagEnable = settings.Get_BoolValue_Settings(25); string ParLine = settings.Get_StringValue_Settings(26); string Width_Size = settings.Get_StringValue_Settings(27); int CompanyNameSize = settings.Get_InValue_Settings(28); string CompanyPointX = settings.Get_StringValue_Settings(29); string CompanyPointY = settings.Get_StringValue_Settings(30); string CompanyFontName = settings.Get_StringValue_Settings(31); int CompanyFontSize = settings.Get_InValue_Settings(32); Color CompanyColor = FindColor(settings.Get_StringValue_Settings(33)); int PriceTagSize = settings.Get_InValue_Settings(34); string PricePointX = settings.Get_StringValue_Settings(35); string PriceFontName = settings.Get_StringValue_Settings(36); int PriceFontSize = settings.Get_InValue_Settings(37); Color PriceColor = FindColor(settings.Get_StringValue_Settings(38)); string CompanyName = settings.Get_StringValue_Settings(39); string Price = settings.Get_StringValue_Settings(40); barcode.BarcodeWidth = B_Width; barcode.BarcodeHigth = B_Height; barcode.BarcodeColor = B_Color; barcode.BarcodeFontSize = FontSize; barcode.FontName = FontName; barcode.PointX = float.Parse(PointX.Replace("f", "")); barcode.PointY = float.Parse(PointY.Replace("f", "")); barcode.Company_Color = CompanyColor; barcode.Company_FontName = CompanyFontName; barcode.Company_FontSize = CompanyFontSize; barcode.Company_Name_Size = CompanyNameSize; barcode.Company_PointX = float.Parse(CompanyPointX.Replace("f", "")); barcode.Company_PointY = float.Parse(CompanyPointY.Replace("f", "")); barcode.Price_Color = PriceColor; barcode.Price_FontName = PriceFontName; barcode.Price_FontSize = PriceFontSize; barcode.Price_Name_Size = PriceTagSize; barcode.Price_PointX = float.Parse(PricePointX.Replace("f", "")); string show = ""; DataTable dt = chk.DataTable("select * from Barcode where GeneratID='" + GenertID + "' "); foreach (DataRow dr in dt.Rows) { show += string.Format(@" <div class='{0} m-b-30 m-t-30'> <img src='{1}' width='{2}' /> </div> ", BarCode_Col_MD, barcode.barCode(dr["BarCode"].ToString(), PriceTagEnable? Price.Replace("{##}", dr["Product_Price"].ToString()):"", CompanyTagEnable? CompanyName:""), BarCode_Image_width); } pnlShowBarcode.Controls.Add(new LiteralControl(show)); } else { Response.Redirect("~/Error?=Barcode id is not found. Try again!"); } } } else { Response.Redirect("~/AuthorizationFailed"); } }
protected void Page_Load(object sender, EventArgs e) { if (Session["m_UserID"] != null && _VR.Check(Path.GetFileNameWithoutExtension(Page.AppRelativeVirtualPath), Session["m_UserID"].ToString())) { if (!IsPostBack) { btnUpdate.Visible = false; } if (Request.QueryString["ed_id"] != null) // edit Query { btnUpdate.Visible = true; btnUser.Visible = false; string UserID = Request.QueryString["ed_id"].ToString(); string St = " from m_login where userid='" + UserID + "' "; _chk.ConfigarationName = "dbm"; if (_chk.int32Check("select count(*) " + St) == 1) { if (!IsPostBack) { txtAddress.Text = _chk.stringCheck("select Address " + St); txtDetails.Text = _chk.stringCheck("select Details " + St); txtEmail.Text = _chk.stringCheck("select Email " + St); txtName.Text = _chk.stringCheck("select Name " + St); txtNID.Text = _chk.stringCheck("select Nid " + St); txtPassword.Text = _chk.stringCheck("select Password " + St); txtUserName.Text = _chk.stringCheck("select Username " + St); ddlGroup.SelectedValue = _chk.stringCheck("select GroupName " + St); ddlLoginPermit.SelectedValue = _chk.stringCheck("select Authority " + St); txtMobileNumber.Text = _chk.stringCheck("select Number " + St); } } else { Response.Redirect(Error_page); } } if (Request.QueryString["de_id"] != null)// delete a user profile { string UserID = Request.QueryString["ed_id"].ToString(); string St = " from m_login where userid='" + UserID + "' "; _chk.ConfigarationName = "dbm"; if (_chk.int32Check("select count(*) " + St) == 1) { using (SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["dbm"].ConnectionString)) { SqlCommand cmd = new SqlCommand(); cmd.Connection = con; cmd.CommandText = "delete from m_login where userid='" + UserID + "' "; con.Open(); cmd.ExecuteNonQuery(); con.Close(); Response.Redirect("~/User/UserList"); } } else { Response.Redirect(Error_page); } } if (Request.QueryString["cng_id"] != null && Request.QueryString["ad_id"] != null) { string New_ID = Request.QueryString["cng_id"].ToString(); string Admin_ID = Request.QueryString["ad_id"].ToString(); _chk.ConfigarationName = "dbm"; //string St = " from m_login where userid='" + UserID + "' "; if (_chk.int32Check("select count(*) from m_login where userid='" + New_ID + "'") == 1 && _chk.int32Check("select count(*) from m_login where userid='" + Admin_ID + "'") == 1) { string New_Type = _chk.stringCheck("select Type from m_login where userid='" + New_ID + "'"); string New_GroupName = _chk.stringCheck("select GroupName from m_login where userid='" + New_ID + "'"); string Admin_Type = _chk.stringCheck("select Type from m_login where userid='" + Admin_ID + "'"); string Admin_GroupName = _chk.stringCheck("select GroupName from m_login where userid='" + Admin_ID + "'"); using (SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["dbm"].ConnectionString)) { SqlCommand cmd = new SqlCommand(); cmd.Connection = con; cmd.CommandText = "update m_login set Type='" + Admin_Type + "', GroupName='" + Admin_GroupName + "', Authority='True' where userid='" + New_ID + "' "; con.Open(); cmd.ExecuteNonQuery(); con.Close(); cmd.CommandText = "update m_login set Type='" + New_Type + "', GroupName='" + New_GroupName + "', Authority='True' where userid='" + Admin_ID + "' "; con.Open(); cmd.ExecuteNonQuery(); con.Close(); if (Session["m_Type"] != null) { Session["m_Type"] = New_Type; } Response.Redirect("~/User/UserList"); } } else { Response.Redirect(Error_page); } } } else { Response.Redirect("~/AuthorizationFailed"); } }
protected void Page_Load(object sender, EventArgs e) { if (Session["m_UserID"] != null && _VR.Check(Path.GetFileNameWithoutExtension(Page.AppRelativeVirtualPath), Session["m_UserID"].ToString())) { if (!IsPostBack) { showCustomar(); showProduct(); txtDate.Text = DateTime.Now.ToShortDateString(); if (!settings.Get_BoolValue_Settings(41)) { txtSellingPrice.Enabled = false; } if (!settings.Get_BoolValue_Settings(42)) { txtQuantity.Enabled = false; Page.ClientScript.RegisterStartupScript(this.GetType(), "CallMyFunction", "Sum()", true); } if (chk.stringCheck("select Barcode_Sell_Enable from m_login where userid='" + Session["m_UserID"].ToString() + "' ").ToLower() == "true" ? true : false) { ddlProductlist.Visible = false; txtBarcode.Visible = true; txtQuantity.Enabled = false; } else { ddlProductlist.Visible = true; txtBarcode.Visible = false; txtQuantity.Enabled = true; } } //txtMemo.Text = StockAdd.Count.ToString(); showSellingProduct(); if (Request.QueryString[""] != null) { string Name = Request.QueryString[""].ToString(); pnlTable.Visible = true; pnlStockAdd.Visible = false; if (Name == "Wholesale") { ddlCustomerName.Visible = true; txtAddress.Enabled = false; txtMobile.Enabled = false; txtCustomerName.Visible = false; } else { ddlCustomerName.Visible = false; txtCustomerName.Visible = true; txtAddress.Enabled = true; txtMobile.Enabled = true; } } else { Response.Redirect("../Default"); } if (Request.QueryString["de"] != null) { string ID = Request.QueryString["de"].ToString(); Delete(Convert.ToInt32(ID)); } if (Request.QueryString["stock"] != null) { string C_ID = Request.QueryString["stock"].ToString(); pnlTable.Visible = false; pnlStockAdd.Visible = true; if (chk.int32CheckSecurity("select count(*) from Stock where s_id=" + C_ID, 1)) { string StockID = chk.stringCheck("select stock_id from Stock where s_id=" + C_ID); string p_id = chk.stringCheck("select p_id from Stock where s_id=" + C_ID); int BuyQuantity = chk.int32Check("select BuyQuantity from Stock where s_id=" + C_ID); int Sale = saleCount(Convert.ToInt32(C_ID)); int SellingPrice = chk.int32Check("select SellingPrice from ProductAdd where p_id=" + p_id); int Avaiable = BuyQuantity - Sale; lblAvaiable.Text = Avaiable.ToString(); if (!IsPostBack) { txtSellingPrice.Text = SellingPrice.ToString(); txtUnit.Text = chk.stringCheck("select Unit from Stock where s_id=" + C_ID); } if (Request.QueryString["price"] != null) { bool a = settings.Get_BoolValue_Settings(41); bool b = settings.Get_BoolValue_Settings(42); if (!IsPostBack) { txtAmount.Text = Request.QueryString["price"].ToString(); txtSellingPrice.Text = Request.QueryString["price"].ToString(); txtQuantity.Text = "1"; } if (!a && !b) { ProductADD(); Response.Redirect("../Sale/ProductSale?=" + Request.QueryString[""].ToString()); } } } else { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "Notify", "alert('Stock Not Found Error (101) " + chk.Int32SecurityCheckError + "');", true); } } } else { if (Session["m_UserID"] != null) { Response.Redirect("~/AuthorizationFailed"); } else { Response.Redirect("~/Login?=/Sale/ProductSale?=Retailer"); } } }
protected void Page_Load(object sender, EventArgs e) { if (Session["m_UserID"] != null && _VR.Check(Path.GetFileNameWithoutExtension(Page.AppRelativeVirtualPath), Session["m_UserID"].ToString())) { if (!IsPostBack) { txtCompanyAddress1.Text = chk.stringCheck("select ValueString from Settings where id=4"); txtCompanyAddress2.Text = chk.stringCheck("select ValueString from Settings where id=5"); txtCompanyName.Text = chk.stringCheck("select ValueString from Settings where id=3"); txtCompanyPhone.Text = chk.stringCheck("select ValueString from Settings where id=6"); txtInvoiceBarcodeFontSize.Text = chk.stringCheck("select ValueInt from Settings where id=9"); txtInvoiceBarcodeHeight.Text = chk.stringCheck("select ValueInt from Settings where id=11"); txtInvoiceBarcodeWidth.Text = chk.stringCheck("select ValueInt from Settings where id=10"); txtInvoiceID.Text = chk.stringCheck("select ValueInt from Settings where id=2"); txtStockID.Text = chk.stringCheck("select ValueInt from Settings where id=1"); txtTermsAndCondition.Text = chk.stringCheck("select ValueString from Settings where id=8"); ddlInvoiceAlign.SelectedValue = chk.stringCheck("select ValueString from Settings where id=12"); ddlInvoiceSize.SelectedValue = chk.stringCheck("select ValueString from Settings where id=13"); ddlRetuenPageSize.SelectedValue = chk.stringCheck("select ValueString from Settings where id=15"); ddlReturnPageAlign.SelectedValue = chk.stringCheck("select ValueString from Settings where id=14"); txtBarcodeNumber.Text = chk.stringCheck("select ValueInt from Settings where id=16"); txtBarcodeWidth.Text = chk.stringCheck("select ValueInt from Settings where id=17"); txtBarcodeHigth.Text = chk.stringCheck("select ValueInt from Settings where id=18"); txtBarcodeFontSize.Text = chk.stringCheck("select ValueInt from Settings where id=19"); txtBarcodePointX.Text = chk.stringCheck("select ValueString from Settings where id=20"); txtBarcodePointY.Text = chk.stringCheck("select ValueString from Settings where id=21"); txtBarCodeFontName.Text = chk.stringCheck("select ValueString from Settings where id=23"); ddlBarcodePageLine.SelectedValue = chk.stringCheck("select ValueString from Settings where id=26"); txtBarcodeImageWidth.Text = chk.stringCheck("select ValueString from Settings where id=27"); chkBarcode_CompanyTag.Checked = set.Get_BoolValue_Settings(24); chkBarcode_PriceTag.Checked = set.Get_BoolValue_Settings(25); txtBarcode_CompanyNameSize.Text = set.Get_InValue_Settings(28).ToString(); txtBarcode_CompanyPointX.Text = set.Get_StringValue_Settings(29); txtBarcode_CompanyPointY.Text = set.Get_StringValue_Settings(30); txtBarcode_CompanyFontName.Text = set.Get_StringValue_Settings(31); txtBarcode_CompanyFontSize.Text = set.Get_InValue_Settings(32).ToString(); txtBarcode_PriceTagSize.Text = set.Get_InValue_Settings(34).ToString(); txtBarcode_PricePointX.Text = set.Get_StringValue_Settings(35); txtBarcode_PriceFontName.Text = set.Get_StringValue_Settings(36); txtBarcode_PriceFontSize.Text = set.Get_InValue_Settings(37).ToString(); txtBarcode_CompanyName.Text = set.Get_StringValue_Settings(39); txtBarcode_PriceTag.Text = set.Get_StringValue_Settings(40); chkSalePrice.Checked = set.Get_BoolValue_Settings(41); chkBarcodeQuality.Checked = set.Get_BoolValue_Settings(42); chkAlertBuyPrice.Checked = set.Get_BoolValue_Settings(43); ddlColor.Items.Clear(); ddlBarcode_CompanyColor.Items.Clear(); ddlBarcode_PriceColor.Items.Clear(); foreach (string s in barCode.BarcodeAllColor) { ddlColor.Items.Add(new ListItem(s, s)); ddlBarcode_CompanyColor.Items.Add(new ListItem(s, s)); ddlBarcode_PriceColor.Items.Add(new ListItem(s, s)); } ddlColor.SelectedValue = chk.stringCheck("select ValueString from Settings where id=22"); ddlBarcode_CompanyColor.SelectedValue = chk.stringCheck("select ValueString from Settings where id=33"); ddlBarcode_PriceColor.SelectedValue = chk.stringCheck("select ValueString from Settings where id=38"); } } else { if (Session["m_UserID"] != null) { Response.Redirect("~/AuthorizationFailed"); } else { Response.Redirect("~/Login?=/Settings/Settings"); } } }