protected void Page_Load(object sender, EventArgs e) { if (Session["UserId"] == null) { Response.Redirect("~/ERPLogin.aspx"); } StrBrandId = Session["BrandId"].ToString(); StrLocId = Session["LocId"].ToString(); strCompId = Session["CompId"].ToString(); if (!IsPostBack) { FillTransferRequestgrid(); txtTransferDate.Text = DateTime.Now.ToString(ObjSysParam.GetSysParameterByParamName("Date_Format").Rows[0]["Param_Value"].ToString()); FillGrid(); FillGridBin(); btnList_Click(null, null); } AllPageCode(); }
public string GetDateFormat(string Date) { try { return(Convert.ToDateTime(Date).ToString(ObjSysParam.GetSysParameterByParamName("Date_Format").Rows[0]["Param_Value"].ToString()).ToString()); } catch { return(""); } }
protected void Page_Load(object sender, EventArgs e) { if (Session["UserId"] == null) { Response.Redirect("~/ERPLogin.aspx"); } if (!IsPostBack) { StrBrandId = Session["BrandId"].ToString(); StrLocationId = Session["LocId"].ToString(); StrCompId = Session["CompId"].ToString(); UserId = Session["UserId"].ToString(); txtlRequestNo.Text = GetDocumentNumber(); btnList_Click(null, null); FillUnit(); txtRequestdate.Text = DateTime.Now.ToString(ObjSysParam.GetSysParameterByParamName("Date_Format").Rows[0]["Param_Value"].ToString()); txtExpDelDate.Text = DateTime.Now.ToString(ObjSysParam.GetSysParameterByParamName("Date_Format").Rows[0]["Param_Value"].ToString()); Fillgrid(); FillGridBin(); Reset(); btnReset_Click(null, null); txtValue.Focus(); } AllPageCode(); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { Page.Title = ObjSysPeram.GetSysTitle(); // lblModuleIs.Text = "PegasusERP :: " + Session["HeaderText"].ToString(); lnkUserName.Text = Session["UserId"].ToString(); setHeaderImage(); label4.Text = "Version " + ObjSysPeram.GetSysParameterByParamName("Application_Version").Rows[0]["Param_Value"].ToString(); if (Session["lang"] == null) { Session["lang"] = "1"; Session["CompId"] = Session["CompId"].ToString(); body1.Style[HtmlTextWriterStyle.Direction] = "ltr"; } else if (Session["lang"].ToString() == "2") { body1.Style[HtmlTextWriterStyle.Direction] = "rtl"; } else if (Session["lang"].ToString() == "1") { body1.Style[HtmlTextWriterStyle.Direction] = "ltr"; } BasePage bs = new BasePage(); try { lblCompany1.Text = Session["CompName"].ToString(); lblLocation1.Text = Session["LocName"].ToString(); lblBrand1.Text = Session["BrandName"].ToString(); lblLanguage.Text = Session["Language"].ToString(); } catch { } } PopulateAcrDynamically(); }
public void FillModule() { DataTable Dt = new DataTable(); DataTable Dtapplication = objSys.GetSysParameterByParamName("Application_Id"); Dt = objModule.GetModuleMaster(); Dt = new DataView(Dt, "Application_Id=" + Dtapplication.Rows[0]["Param_Value"].ToString() + "", "", DataViewRowState.CurrentRows).ToTable(); if (Dt.Rows.Count > 0) { ddlModuleName.DataSource = Dt; ddlModuleName.DataTextField = "Module_Name"; ddlModuleName.DataValueField = "Module_Id"; ddlModuleName.DataBind(); } else { Dt.Clear(); ddlModuleName.DataSource = Dt; ddlModuleName.DataBind(); } ddlModuleName.Items.Insert(0, "--Select--"); }