protected void Page_Load(object sender, EventArgs e) { if (Session["UserCode"] == null) { Response.Redirect("Signin.aspx"); } if (!IsPostBack) { if (Session["dir"].ToString() == "ltr") { LabelItemsInfo.Text = String.Format(global::Resources.ResourceMain.LabelItemsInfo); LabelProductCode.Text = String.Format(global::Resources.ResourceMain.LabelProductCode); LabelActive.Text = String.Format(global::Resources.ResourceMain.LabelActive); LabelAvaiableQuantity.Text = String.Format(global::Resources.ResourceMain.LabelAvaiableQuantity); LabelCostPrice.Text = String.Format(global::Resources.ResourceMain.LabelCostPrice); LabelDescription.Text = String.Format(global::Resources.ResourceMain.LabelDescription); LabelSalePrice.Text = String.Format(global::Resources.ResourceMain.LabelSalePrice); LabelDisplayforCustomers.Text = String.Format(global::Resources.ResourceMain.LabelDisplayforCustomers); LabelLeastQuantity.Text = String.Format(global::Resources.ResourceMain.LabelLeastQuantity); LabelMinSalePrice.Text = String.Format(global::Resources.ResourceMain.LabelMinSalePrice); LabelUnitName.Text = String.Format(global::Resources.ResourceMain.LabelUnitName); LabelOfferPrice.Text = String.Format(global::Resources.ResourceMain.LabelOfferPrice); LabelOrderQuantity.Text = String.Format(global::Resources.ResourceMain.LabelOrderQuantity); LabelUploadImage.Text = String.Format(global::Resources.ResourceMain.LabelUploadImage); LabelVAT.Text = String.Format(global::Resources.ResourceMain.LabelVAT); LabelWholeSalePrice.Text = String.Format(global::Resources.ResourceMain.LabelWholeSalePrice); BtnNext.Text = String.Format(global::Resources.ResourceMain.BtnNext); ButtonPrevious.Text = String.Format(global::Resources.ResourceMain.ButtonPrevious); //GvCompany.Columns[2].HeaderText = String.Format(global::Resources.ResourceMain.CompanyId); //GvCompany.Columns[3].HeaderText = String.Format(global::Resources.ResourceMain.CompanyName); //GvCompany.Columns[4].HeaderText = String.Format(global::Resources.ResourceMain.CompanyShortName); //GvCompany.Columns[5].HeaderText = String.Format(global::Resources.ResourceMain.Address); //GvCompany.Columns[6].HeaderText = String.Format(global::Resources.ResourceMain.Email); //GvCompany.Columns[7].HeaderText = String.Format(global::Resources.ResourceMain.Phone); } else { LabelItemsInfo.Text = String.Format(global::Resources.ResourceMain_Ar.LabelItemsInfo); LabelProductCode.Text = String.Format(global::Resources.ResourceMain_Ar.LabelProductCode); LabelActive.Text = String.Format(global::Resources.ResourceMain_Ar.LabelActive); LabelAvaiableQuantity.Text = String.Format(global::Resources.ResourceMain_Ar.LabelAvaiableQuantity); LabelCostPrice.Text = String.Format(global::Resources.ResourceMain_Ar.LabelCostPrice); LabelDescription.Text = String.Format(global::Resources.ResourceMain_Ar.LabelDescription); LabelSalePrice.Text = String.Format(global::Resources.ResourceMain_Ar.LabelSalePrice); LabelDisplayforCustomers.Text = String.Format(global::Resources.ResourceMain_Ar.LabelDisplayforCustomers); LabelLeastQuantity.Text = String.Format(global::Resources.ResourceMain_Ar.LabelLeastQuantity); LabelMinSalePrice.Text = String.Format(global::Resources.ResourceMain_Ar.LabelMinSalePrice); LabelUnitName.Text = String.Format(global::Resources.ResourceMain_Ar.LabelUnitName); LabelOfferPrice.Text = String.Format(global::Resources.ResourceMain_Ar.LabelOfferPrice); LabelOrderQuantity.Text = String.Format(global::Resources.ResourceMain_Ar.LabelOrderQuantity); LabelUploadImage.Text = String.Format(global::Resources.ResourceMain_Ar.LabelUploadImage); LabelVAT.Text = String.Format(global::Resources.ResourceMain_Ar.LabelVAT); LabelWholeSalePrice.Text = String.Format(global::Resources.ResourceMain_Ar.LabelWholeSalePrice); BtnNext.Text = String.Format(global::Resources.ResourceMain_Ar.BtnNext); ButtonPrevious.Text = String.Format(global::Resources.ResourceMain_Ar.ButtonPrevious); //LabelCompanyName.Text = String.Format(global::Resources.ResourceMain_Ar.CompanyName); //LabelCMPShortName.Text = String.Format(global::Resources.ResourceMain_Ar.CompanyShortName); //LabelCMPAddress.Text = String.Format(global::Resources.ResourceMain_Ar.Address); //LabelEmail.Text = String.Format(global::Resources.ResourceMain_Ar.Email); //LabelMobile.Text = String.Format(global::Resources.ResourceMain_Ar.Phone); //LabelCMPAccountingMonth.Text = String.Format(global::Resources.ResourceMain_Ar.AccountingMonth); //LabelPassword.Text = String.Format(global::Resources.ResourceMain_Ar.Password); //GvCompany.Columns[2].HeaderText = String.Format(global::Resources.ResourceMain_Ar.CompanyId); //GvCompany.Columns[3].HeaderText = String.Format(global::Resources.ResourceMain_Ar.CompanyName); //GvCompany.Columns[4].HeaderText = String.Format(global::Resources.ResourceMain_Ar.CompanyShortName); //GvCompany.Columns[5].HeaderText = String.Format(global::Resources.ResourceMain_Ar.Address); //GvCompany.Columns[6].HeaderText = String.Format(global::Resources.ResourceMain_Ar.Email); //GvCompany.Columns[7].HeaderText = String.Format(global::Resources.ResourceMain_Ar.Phone); } ViewState["EditId"] = "0"; BindUnit(); DropDownListUnitName.Items.Insert(0, new ListItem("Select Unit", "0")); DropDownListVATvalue.DataBind(); DropDownListVATvalue.Items.Insert(0, new ListItem("Select VAT", "-1")); } }
protected void Page_Load(object sender, EventArgs e) { if (Session["UserCode"] == null) { Response.Redirect("Signin.aspx"); } if (!IsPostBack) { ViewState["EditId"] = "0"; ItemGroupId = 0; ParentGroupId = 0; PopulateTreeView(); TreeView1.CollapseAll(); TreeView1.Attributes.Add("onclick", "OnTreeClick(event)"); if (Session["dir"].ToString() == "ltr") { LabelItemsInfo.Text = String.Format(global::Resources.ResourceMain.LabelItemsInfo); LabelProductCode.Text = String.Format(global::Resources.ResourceMain.LabelProductCode); LabelActive.Text = String.Format(global::Resources.ResourceMain.LabelActive); LabelAvaiableQuantity.Text = String.Format(global::Resources.ResourceMain.LabelAvaiableQuantity); LabelCostPrice.Text = String.Format(global::Resources.ResourceMain.LabelCostPrice); LabelMinSalePrice.Text = String.Format(global::Resources.ResourceMain.LabelMinSalePrice); LabelSalePrice.Text = String.Format(global::Resources.ResourceMain.LabelSalePrice); LabelDisplayforCustomers.Text = String.Format(global::Resources.ResourceMain.LabelDisplayforCustomers); LabelLeastQuantity.Text = String.Format(global::Resources.ResourceMain.LabelLeastQuantity); LabelMinSalePrice.Text = String.Format(global::Resources.ResourceMain.LabelMinSalePrice); LabelUnitName.Text = String.Format(global::Resources.ResourceMain.LabelUnitName); LabelOfferPrice.Text = String.Format(global::Resources.ResourceMain.LabelOfferPrice); LabelOrderQuantity.Text = String.Format(global::Resources.ResourceMain.LabelOrderQuantity); LabelUploadImage.Text = String.Format(global::Resources.ResourceMain.LabelUploadImage); LabelVAT.Text = String.Format(global::Resources.ResourceMain.LabelVAT); LabelWholeSalePrice.Text = String.Format(global::Resources.ResourceMain.LabelWholeSalePrice); LabelAveragePrice.Text = String.Format(global::Resources.ResourceMain.LabelAveragePrice); LabelCompanBarcode.Text = String.Format(global::Resources.ResourceMain.LabelCompanBarcode); LabelAgentName.Text = String.Format(global::Resources.ResourceMain.LabelAgentName); LabelItemType.Text = String.Format(global::Resources.ResourceMain.LabelItemType); LabelDescription.Text = String.Format(global::Resources.ResourceMain.LabelDescription); LabelLocation.Text = String.Format(global::Resources.ResourceMain.LabelLocation); //GvCompany.Columns[2].HeaderText = String.Format(global::Resources.ResourceMain.CompanyId); //GvCompany.Columns[3].HeaderText = String.Format(global::Resources.ResourceMain.CompanyName); //GvCompany.Columns[4].HeaderText = String.Format(global::Resources.ResourceMain.CompanyShortName); //GvCompany.Columns[5].HeaderText = String.Format(global::Resources.ResourceMain.Address); //GvCompany.Columns[6].HeaderText = String.Format(global::Resources.ResourceMain.Email); //GvCompany.Columns[7].HeaderText = String.Format(global::Resources.ResourceMain.Phone); } else { LabelItemsInfo.Text = String.Format(global::Resources.ResourceMain_Ar.LabelItemsInfo); LabelProductCode.Text = String.Format(global::Resources.ResourceMain_Ar.LabelProductCode); LabelActive.Text = String.Format(global::Resources.ResourceMain_Ar.LabelActive); LabelAvaiableQuantity.Text = String.Format(global::Resources.ResourceMain_Ar.LabelAvaiableQuantity); LabelCostPrice.Text = String.Format(global::Resources.ResourceMain_Ar.LabelCostPrice); LabelMinSalePrice.Text = String.Format(global::Resources.ResourceMain_Ar.LabelMinSalePrice); LabelSalePrice.Text = String.Format(global::Resources.ResourceMain_Ar.LabelSalePrice); LabelDisplayforCustomers.Text = String.Format(global::Resources.ResourceMain_Ar.LabelDisplayforCustomers); LabelLeastQuantity.Text = String.Format(global::Resources.ResourceMain_Ar.LabelLeastQuantity); LabelMinSalePrice.Text = String.Format(global::Resources.ResourceMain_Ar.LabelMinSalePrice); LabelUnitName.Text = String.Format(global::Resources.ResourceMain_Ar.LabelUnitName); LabelOfferPrice.Text = String.Format(global::Resources.ResourceMain_Ar.LabelOfferPrice); LabelOrderQuantity.Text = String.Format(global::Resources.ResourceMain_Ar.LabelOrderQuantity); LabelUploadImage.Text = String.Format(global::Resources.ResourceMain_Ar.LabelUploadImage); LabelVAT.Text = String.Format(global::Resources.ResourceMain_Ar.LabelVAT); LabelWholeSalePrice.Text = String.Format(global::Resources.ResourceMain_Ar.LabelWholeSalePrice); LabelAveragePrice.Text = String.Format(global::Resources.ResourceMain_Ar.LabelAveragePrice); LabelCompanBarcode.Text = String.Format(global::Resources.ResourceMain_Ar.LabelCompanBarcode); LabelAgentName.Text = String.Format(global::Resources.ResourceMain_Ar.LabelAgentName); LabelItemType.Text = String.Format(global::Resources.ResourceMain_Ar.LabelItemType); LabelLocation.Text = String.Format(global::Resources.ResourceMain_Ar.LabelLocation); LabelDescription.Text = String.Format(global::Resources.ResourceMain_Ar.LabelDescription); //LabelMobile.Text = String.Format(global::Resources.ResourceMain_Ar.Phone); //LabelCMPAccountingMonth.Text = String.Format(global::Resources.ResourceMain_Ar.AccountingMonth); //LabelPassword.Text = String.Format(global::Resources.ResourceMain_Ar.Password); //GvCompany.Columns[2].HeaderText = String.Format(global::Resources.ResourceMain_Ar.CompanyId); //GvCompany.Columns[3].HeaderText = String.Format(global::Resources.ResourceMain_Ar.CompanyName); //GvCompany.Columns[4].HeaderText = String.Format(global::Resources.ResourceMain_Ar.CompanyShortName); //GvCompany.Columns[5].HeaderText = String.Format(global::Resources.ResourceMain_Ar.Address); //GvCompany.Columns[6].HeaderText = String.Format(global::Resources.ResourceMain_Ar.Email); //GvCompany.Columns[7].HeaderText = String.Format(global::Resources.ResourceMain_Ar.Phone); } BtnDelete.Visible = false; BtnEdit.Visible = false; BtnSave.Visible = true; BindAgent(); DropDownList2.Items.Insert(0, new ListItem("Select Agent", "0")); BindUnit(); DropDownListUnitName.Items.Insert(0, new ListItem("Select Unit", "0")); DropDownListVATvalue.DataBind(); DropDownListVATvalue.Items.Insert(0, new ListItem("Select VAT", "-1")); } }