///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// protected void Page_Load(object sender, EventArgs e) { /*** Fill Session ************************************/ FormSession.FillSession("Config", pageDiv); /*** Fill Session ************************************/ if (!Page.IsPostBack) { pnlMain.Attributes.Add("onkeypress", "javascript:return DefaultButton(event,'" + btnSave.ClientID + "');"); MainMasterPage.ShowTitel(General.Msg("E-mail settings", "إعدادات البريد الإلكتروني")); if (!FormSession.getPerm(new string[] { "IEml", "UEml" })) { Response.Redirect(@"~/Login.aspx"); btnSave.Enabled = false; } else { btnSave.Enabled = true; } UIDataEnabled(true); ViewState["CommandName"] = "NOT"; PopulateUI(); } }
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// protected void Page_Load(object sender, EventArgs e) { try { // --------------------Common Code ----------------------------------------------------------------- // FormSession.FillSession("Employees", pageDiv); // --------------------Common Code ----------------------------------------------------------------- // if (!IsPostBack) { if (!FormSession.getPerm("SEmployees")) { Response.Redirect(@"~/Login.aspx"); } MainMasterPage.ShowTitel(General.Msg("Employees History", "سجلات الموظفين")); Fillddl(); DataLang(); if (!FormSession.getPerm("ICrd")) { grdData.Columns[16].Visible = false; } } } catch (Exception e1) { } }
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// protected void Page_Load(object sender, EventArgs e) { try { //---Common Code ----------------------------------------------------------------- // FormSession.FillSession("Config", pageDiv); //---Common Code ----------------------------------------------------------------- // MainMasterPage.ShowTitel(General.Msg("institution Setting", "إعدادات المنشأة")); if (!FormSession.PermUsr.Contains("U" + MainPer)) { Response.Redirect(@"~/Login.aspx"); } btnSave.Enabled = FormSession.PermUsr.Contains("U" + MainPer); btnSave.Text = General.Msg("Save", "حفظ"); if (!IsPostBack) { PopulateUI(); } if (IsPostBack) { imgLogo.PopulateImage("Logo"); } } catch (Exception e1) { } }
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// protected void Page_Load(object sender, EventArgs e) { try { // --------------------Common Code ----------------------------------------------------------------- // FormSession.FillSession("Employees", pageDiv); // --------------------Common Code ----------------------------------------------------------------- // if (!IsPostBack) { if (!FormSession.getPerm("FPVerify")) { Response.Redirect(@"~/Login.aspx"); } MainMasterPage.ShowTitel(General.Msg("Fingerprint verification", "التحقق بالبصمة")); hfdConnStr.Value = ConfigurationManager.ConnectionStrings["constring"].ConnectionString.Replace("\\", "...."); hfdLoginUser.Value = FormSession.LoginUsr.Replace("\\", "...."); hfdLang.Value = FormSession.Language; string ID = hfdConnStr.Value + "," + hfdLoginUser.Value + "," + hfdLang.Value; ClientScript.RegisterStartupScript(this.GetType(), "key", "javascript:Connect('" + ID + "');", true); } } catch (Exception e1) { DBFun.InsertError(FormSession.PageName, "PageLoad"); } }
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// protected void Page_Load(object sender, EventArgs e) { try { // --------------------Common Code ----------------------------------------------------------------- // FormSession.FillSession("Employees", pageDiv); // --------------------Common Code ----------------------------------------------------------------- // if (!IsPostBack) { txtEmpIDSearch.Enabled = FormSession.getPerm("VFPEmp"); btnSearchDetails.Enabled = FormSession.getPerm("VFPEmp"); MainMasterPage.ShowTitel(General.Msg("Employees FingerPrint", "بصمات الموظفين")); if (FormSession.getPerm("VFPEmp")) { hfdConnStr.Value = ConfigurationManager.ConnectionStrings["constring"].ConnectionString.Replace("\\", "...."); hfdLoginUser.Value = FormSession.LoginUsr.Replace("\\", "...."); hfdLang.Value = FormSession.Language; string ID = hfdConnStr.Value + "," + hfdLoginUser.Value + "," + hfdLang.Value; ClientScript.RegisterStartupScript(this.GetType(), "key", "javascript:Connect('" + ID + "');", true); } } } catch (Exception e1) { DBFun.InsertError(FormSession.PageName, "PageLoad"); } }
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// protected void Page_Load(object sender, EventArgs e) { try { // --------------------Common Code ----------------------------------------------------------------- // FormSession.FillSession("Config", pageDiv); FillGrid(); // --------------------Common Code ----------------------------------------------------------------- // if (!IsPostBack) { if (Request.QueryString["ac"] != null) { if (Request.QueryString["ac"].ToString() == "i") { if (!FormSession.PermUsr.Contains("I" + MainPer)) { Response.Redirect(@"~/Login.aspx"); } btnSave.Enabled = FormSession.PermUsr.Contains("I" + MainPer); ViewState["CommandName"] = "Save"; btnSave.Text = General.Msg("Save", "حفظ"); MainMasterPage.ShowTitel(General.Msg("Add " + MainNameEn, "إضافة " + MainName1Ar)); divUpdDel.Visible = false; } if (Request.QueryString["ac"].ToString() == "u") { if (!FormSession.PermUsr.Contains("U" + MainPer)) { Response.Redirect(@"~/Login.aspx"); } btnSave.Enabled = FormSession.PermUsr.Contains("U" + MainPer); ViewState["CommandName"] = "Update"; btnSave.Text = General.Msg("Update", "تعديل"); MainMasterPage.ShowTitel(General.Msg("Update " + MainNameEn, "تعديل " + MainName1Ar)); divUpdDel.Visible = true; Fillddl(); } if (Request.QueryString["ac"].ToString() == "d") { if (!FormSession.PermUsr.Contains("D" + MainPer)) { Response.Redirect(@"~/Login.aspx"); } btnSave.Enabled = FormSession.PermUsr.Contains("D" + MainPer); ViewState["CommandName"] = "Delete"; btnSave.Text = General.Msg("Delete", "حذف"); MainMasterPage.ShowTitel(General.Msg("Delete " + MainNameEn, "حذف " + MainName1Ar)); divUpdDel.Visible = true; Fillddl(); } } } } catch (Exception EX) { DBFun.InsertError(FormSession.PageName, "PageLoad"); } }
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// protected void Page_Load(object sender, EventArgs e) { try { //---Common Code ----------------------------------------------------------------- // FormSession.FillSession("Visitors", pageDiv); //---Common Code ----------------------------------------------------------------- // if (!IsPostBack) { pnlMain.Attributes.Add("onkeypress", "javascript:return DefaultButton(event,'" + btnIDSearch.ClientID + "');"); if (Request.QueryString["ID"] == null) { Response.Redirect(@"~/Login.aspx"); } ViewState["VisIdentityNo"] = ""; ViewState["Action"] = ""; ButtonAction("00", true); //ddlTmpID.Enabled = false; //VisImage.EnabledImage(false); if (Request.QueryString["ID"].ToString() == "i") { MainMasterPage.ShowTitel(General.Msg("Add " + MainNameEn + " Card", "إضافة بطاقة " + MainName1Ar)); if (!FormSession.PermUsr.Contains("IVis")) { Response.Redirect(@"~/Login.aspx"); } ViewState["Action"] = "A"; btnSave.Enabled = btnCancel.Enabled = false; Fillddl(); } if (Request.QueryString["ID"].ToString() == "u") { MainMasterPage.ShowTitel(General.Msg("Update " + MainNameEn + " Card", "تعديل بطاقة " + MainName1Ar)); if (!FormSession.PermUsr.Contains("UVis")) { Response.Redirect(@"~/Login.aspx"); } ViewState["Action"] = "U"; btnSave.Enabled = btnCancel.Enabled = false; Fillddl(); } ddlTmpID.Enabled = false; } if (IsPostBack) { VisImage.PopulateImage(txtVisIdentityNo.Text); } } catch (Exception ex) { DBFun.InsertError(FormSession.PageName, "PageLoad"); } }
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// protected void Page_Load(object sender, EventArgs e) { //---Common Code ----------------------------------------------------------------- // FormSession.FillSession("Visitors", null); //---Common Code ----------------------------------------------------------------- // if (!IsPostBack) { MainMasterPage.ShowTitel(General.Msg("Import images from a folder", "الاستيراد من مجلد الصور")); if (!FormSession.getPerm(new string[] { "ImpVis" })) { Response.Redirect(@"~/Login.aspx"); } } }
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// protected void Page_Load(object sender, EventArgs e) { try { // --------------------Common Code ----------------------------------------------------------------- // FormSession.FillSession("Config", pageDiv); // --------------------Common Code ----------------------------------------------------------------- // if (!IsPostBack) { if (!FormSession.PermUsr.Contains("SBla")) { Response.Redirect(@"~/Login.aspx"); } MainMasterPage.ShowTitel(General.Msg("Black List History", "بحث القائمة السوداء")); } } catch (Exception e1) { } }
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// protected void Page_Load(object sender, EventArgs e) { try { //---Common Code ----------------------------------------------------------------- // FormSession.FillSession("Employees", pageDiv); //---Common Code ----------------------------------------------------------------- // if (!IsPostBack) { if (!FormSession.getPerm("UEmpType")) { Response.Redirect(@"~/Login.aspx"); } MainMasterPage.ShowTitel(General.Msg("Transferr Employees", "نقل الموظفين")); ButtonAction("00", true); } } catch (Exception e1) { DBFun.InsertError(FormSession.PageName, "PageLoad"); } }
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// protected void Page_Load(object sender, EventArgs e) { try { //---Common Code ----------------------------------------------------------------- // FormSession.FillSession("Visitors", pageDiv); //---Common Code ----------------------------------------------------------------- // if (!IsPostBack) { MainMasterPage.ShowTitel(General.Msg("Import from Excel File", "الاستيراد من ملف اكسل")); if (!FormSession.getPerm(new string[] { "ImpVis" })) { Response.Redirect(@"~/Login.aspx"); } } } catch (Exception e1) { } }
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// protected void Page_Load(object sender, EventArgs e) { try { // --------------------Common Code ----------------------------------------------------------------- // FormSession.FillSession("Card", pageDiv); // --------------------Common Code ----------------------------------------------------------------- // if (!IsPostBack) { if (!FormSession.getPerm("SCrd")) { Response.Redirect(@"~/Login.aspx"); } MainMasterPage.ShowTitel(General.Msg("Cards History", "سجلات البطاقة")); Fillddl(); //DataLang(); } } catch (Exception e1) { } }
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// protected void Page_Load(object sender, EventArgs e) { //---Common Code ----------------------------------------------------------------- // string Type = (Request.QueryString["ID"] != null) ? Request.QueryString["ID"] : ""; FormSession.FillSession("Reports", pageDiv); //---Common Code ----------------------------------------------------------------- // if (!IsPostBack) { if (!FormSession.PermUsr.Contains("Reports")) { Response.Redirect(@"~/Login.aspx"); } MainMasterPage.ShowTitel(General.Msg("Reports", "التقارير")); lblSelectedreport.Text = General.Msg("Please select Report", "من فضلك اختر التقرير"); FillReportsGroups(); FillIssue(); } }
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// protected void Page_Load(object sender, EventArgs e) { try { //---Common Code ----------------------------------------------------------------- // FormSession.FillSession("Visitors", pageDiv); //---Common Code ----------------------------------------------------------------- // if (!IsPostBack) { MainMasterPage.ShowTitel(General.Msg("Events Cards History", "سجلات بطاقات المناسبات")); if (!FormSession.PermUsr.Contains("SVis")) { Response.Redirect(@"~/Login.aspx"); } btnSearch.Enabled = btnCancel.Enabled = FormSession.PermUsr.Contains("SVis"); Fillddl(); } } catch (Exception e1) { } }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// protected void Page_Load(object sender, EventArgs e) { try { //---Common Code ----------------------------------------------------------------- // FormSession.FillSession("Card", pageDiv); //---Common Code ----------------------------------------------------------------- // if (!IsPostBack) { if (!FormSession.getPerm("IStick")) { Response.Redirect(@"~/Login.aspx"); } btnSave.Enabled = FormSession.getPerm("IStick"); MainMasterPage.ShowTitel(General.Msg("Add Sticker", "إصدار ملصق")); ButtonAction("100"); Fillddl(); } } catch (Exception e1) { DBFun.InsertError(FormSession.PageName, "PageLoad"); } }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// protected void Page_Load(object sender, EventArgs e) { try { // --------------------Common Code ----------------------------------------------------------------- // FormSession.FillSession("Users", pageDiv); // --------------------Common Code ----------------------------------------------------------------- // if (!IsPostBack) { MainMasterPage.ShowTitel(General.Msg("Users History", "سجلات المستخدمين")); if (!FormSession.PermUsr.Contains("S" + MainPer)) { Response.Redirect(@"~/Login.aspx"); } btnSearch.Enabled = FormSession.PermUsr.Contains("S" + MainPer); FormCtrl.FillDDL("StatusWithSelect", ddlUsrStatus); } } catch (Exception e1) { } }
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// protected void Page_Load(object sender, EventArgs e) { try { // --------------------Common Code ----------------------------------------------------------------- // FormSession.FillSession("Card", pageDiv); FormCtrl.RefreshGridEmpty(ref grdData, 20, "No cards for Approve", "لا توجد بطاقات للموافقة عليها"); hfdLang.Value = FormSession.Language; // --------------------Common Code ----------------------------------------------------------------- // if (!IsPostBack) { MainMasterPage.ShowTitel(General.Msg("Approve Card", "الموافقة على البطاقات")); if (!FormSession.PermUsr.Contains("ACrd")) { Response.Redirect(@"~/Login.aspx"); } FillDDL(); FillGrid(); } } catch (Exception Ex) { MessageFun.ShowAdminMsg(this, Ex.Message); } }
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// protected void Page_Load(object sender, EventArgs e) { try { // --------------------Common Code ----------------------------------------------------------------- // FormSession.FillSession("Home", pageDiv); MainMasterPage.ShowTitel(General.Msg("Change Password", "تغيير كلمة المرور")); // --------------------Common Code ----------------------------------------------------------------- // if (!string.IsNullOrEmpty(txtOldpassword.Text)) { ViewState["OldPass"] = txtOldpassword.Text; } if (ViewState["OldPass"] != null) { txtOldpassword.Attributes["value"] = ViewState["OldPass"].ToString(); } if (!string.IsNullOrEmpty(txtNewpassword.Text)) { ViewState["NewPass"] = txtNewpassword.Text; } if (ViewState["NewPass"] != null) { txtNewpassword.Attributes["value"] = ViewState["NewPass"].ToString(); } if (!string.IsNullOrEmpty(txtConfirmpassword.Text)) { ViewState["ConfirmPass"] = txtConfirmpassword.Text; } if (ViewState["ConfirmPass"] != null) { txtConfirmpassword.Attributes["value"] = ViewState["ConfirmPass"].ToString(); } } catch (Exception e1) { DBFun.InsertError(FormSession.PageName, "Page_Load"); } }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// protected void Page_Load(object sender, EventArgs e) { try { // --------------------Common Code ----------------------------------------------------------------- // FormSession.FillSession("Card", pageDiv); CardType = "Card"; //string Type = (Request.QueryString["ac"] != null) ? Request.QueryString["ac"] : ""; //if (Type == "ic" || Type == "uc") { FormSession.FillSession("Card"); } //if (Type == "il" || Type == "ul") { FormSession.FillSession("Lic"); } //if (FormSession.Language == "Ar") { pageDiv.Attributes.Add("dir", "rtl"); } else { pageDiv.Attributes.Add("dir", "ltr"); } //PageName = new System.IO.FileInfo(Request.Url.AbsolutePath).Name; //if (Request.QueryString["ac"] != null) //{ // string s = Request.QueryString["ac"].ToString(); // if (s == "ic" || s == "uc") { CardType = "Card"; } // if (s == "il" || s == "ul") { CardType = "LCard"; } // } // --------------------Common Code ----------------------------------------------------------------- // if (Request.QueryString.Count > 0) { if (!IsPostBack) { if (Request.QueryString["ac"] != null) { if (Request.QueryString["ac"].ToString() == "ic") { CardsSideMenu1.Visible = true; if (!FormSession.PermUsr.Contains("IIsCrd")) { Response.Redirect(@"~/Login.aspx"); } btnSave.Enabled = FormSession.PermUsr.Contains("IIsCrd"); btnSave.Text = General.Msg("Save", "حفظ"); MainMasterPage.ShowTitel(General.Msg("Add Issue", "إضافة إصدار")); divUpdDel.Visible = false; FillGrid(); } if (Request.QueryString["ac"].ToString() == "uc") { CardsSideMenu1.Visible = true; if (!FormSession.PermUsr.Contains("UIsCrd")) { Response.Redirect(@"~/Login.aspx"); } btnSave.Enabled = FormSession.PermUsr.Contains("UIsCrd"); btnSave.Text = General.Msg("Update", "تعديل"); MainMasterPage.ShowTitel(General.Msg("Update Issue", "تعديل إصدار")); divUpdDel.Visible = true; FillGrid(); Fillddl(); } if (Request.QueryString["ac"].ToString() == "dc") { CardsSideMenu1.Visible = true; if (!FormSession.PermUsr.Contains("IsCrdDel")) { Response.Redirect(@"~/Login.aspx"); } btnSave.Enabled = FormSession.PermUsr.Contains("IsCrdDel"); btnSave.Text = General.Msg("Delete", "حذف"); MainMasterPage.ShowTitel(General.Msg("Delete Issue", "حذف إصدار")); divUpdDel.Visible = true; FillGrid(); Fillddl(); } } } } } catch (Exception e1) { } }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// protected void Page_Load(object sender, EventArgs e) { try { // --------------------Common Code ----------------------------------------------------------------- // FormSession.FillSession("Users", pageDiv); // --------------------Common Code ----------------------------------------------------------------- // if (!IsPostBack) { pnlMain.Attributes.Add("onkeypress", "javascript:return DefaultButton(event,'" + btnSave.ClientID + "');"); if (Request.QueryString["ac"] != null) { if (Request.QueryString["ac"].ToString() == "i") { if (!FormSession.PermUsr.Contains("I" + MainPer)) { Response.Redirect(@"~/Login.aspx"); } btnSave.Enabled = FormSession.PermUsr.Contains("I" + MainPer); ViewState["CommandName"] = "Save"; btnSave.Text = General.Msg("Save", "حفظ"); MainMasterPage.ShowTitel(General.Msg("Add " + MainNameEn, "إضافة " + MainName1Ar)); divUpdDel.Visible = false; } if (Request.QueryString["ac"].ToString() == "u") { if (!FormSession.PermUsr.Contains("U" + MainPer)) { Response.Redirect(@"~/Login.aspx"); } btnSave.Enabled = FormSession.PermUsr.Contains("U" + MainPer); ViewState["CommandName"] = "Update"; btnSave.Text = General.Msg("Update", "تعديل"); MainMasterPage.ShowTitel(General.Msg("Update " + MainNameEn, "تعديل " + MainName1Ar)); divUpdDel.Visible = true; Fillddl(); } if (Request.QueryString["ac"].ToString() == "d") { if (!FormSession.PermUsr.Contains("D" + MainPer)) { Response.Redirect(@"~/Login.aspx"); } btnSave.Enabled = FormSession.PermUsr.Contains("D" + MainPer); ViewState["CommandName"] = "Delete"; btnSave.Text = General.Msg("Delete", "حذف"); MainMasterPage.ShowTitel(General.Msg("Delete " + MainNameEn, "حذف " + MainName1Ar)); divUpdDel.Visible = true; Fillddl(); } } } } catch (Exception e1) { } }
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// protected void Page_Load(object sender, EventArgs e) { try { // --------------------Common Code ----------------------------------------------------------------- // FormSession.FillSession("Card", pageDiv); FormCtrl.RefreshGridEmpty(ref grdData, 20, "This employee does not have cards", "هذا الموظف لا يملك بطاقات"); // --------------------Common Code ----------------------------------------------------------------- // if (!IsPostBack) { if (!FormSession.getPerm(new string[] { "ICrd", "UCrd" })) { Response.Redirect(@"~/Login.aspx"); } ViewState["EmpID"] = ""; divCountPrint.Visible = false; FillDDL(); MainMasterPage.ShowTitel(General.Msg("Add Cards", "إصدار بطاقة")); ButtonAction("111000"); DataItemStatus(false, ""); if (Request.QueryString["ID"] != null) { ddlSearchBy.SelectedIndex = 0; txtSearchBy.Text = Request.QueryString["ID"].ToString(); ViewState["EmpID"] = txtSearchBy.Text; Fetch(); } //if (Request.QueryString["ac"] != null) //{ // if (Request.QueryString["ac"].ToString() == "i") // { // btnSave.Text = General.Msg("Save","حفظ"); // MainMasterPage.ShowTitel(General.Msg("Add Cards", "إصدار بطاقة")); // ButtonAction("10"); // ddlIssue.Enabled = true; // if (Request.QueryString["ID"] != null) // { // ddlSearchBy.SelectedIndex = 0; // txtSearchBy.Text = Request.QueryString["ID"].ToString(); // ViewState["EmpID"] = txtSearchBy.Text; // Fetch(); // } // } // if (Request.QueryString["ac"].ToString() == "u") // { // btnSave.Text = General.Msg("Update","تعديل"); // MainMasterPage.ShowTitel(General.Msg("Update Cards", "تعديل بطاقة")); // ButtonAction("10"); // ddlIssue.Enabled = false; // } //} } } catch (Exception Ex) { DBFun.InsertError(FormSession.PageName, "PageLoad"); MessageFun.ShowAdminMsg(this, Ex.Message); } }
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// protected void Page_Load(object sender, EventArgs e) { try { //---Common Code ----------------------------------------------------------------- // FormSession.FillSession("Employees", pageDiv); //---Common Code ----------------------------------------------------------------- // if (!IsPostBack) { pnlMain.Attributes.Add("onkeypress", "javascript:return DefaultButton(event,'" + btnIDSearch.ClientID + "');"); if (!FormSession.getPerm(new string[] { "IMng", "UMng", "IEmp", "UEmp", "ICon", "UCon" })) { Response.Redirect(@"~/Login.aspx"); } if (Request.QueryString["ac"] != null) { string ac = Request.QueryString["ac"].ToString(); ViewState["ac"] = ac; if (ac == "IMng") { if (!FormSession.getPerm("IMng")) { btnSave.Enabled = false; btnIDSearch.Enabled = false; } btnSave.Text = General.Msg("Save", "حفظ"); MainMasterPage.ShowTitel(General.Msg("Add Aramco Employee", "إضافة موظف أرامكو")); ddlEmpType.SelectedIndex = ddlEmpType.Items.IndexOf(ddlEmpType.Items.FindByValue("Mng")); divContract.Visible = false; rfvCompID.Enabled = false; divSection.Visible = false; rfvSecID.Enabled = false; } if (ac == "UMng") { if (!FormSession.getPerm("UMng")) { btnSave.Enabled = false; btnIDSearch.Enabled = false; } btnSave.Text = General.Msg("Update", "تعديل"); MainMasterPage.ShowTitel(General.Msg("Update Aramco Employee", "تعديل موظف أرامكو")); ddlEmpType.SelectedIndex = ddlEmpType.Items.IndexOf(ddlEmpType.Items.FindByValue("Mng")); divContract.Visible = false; rfvCompID.Enabled = false; divSection.Visible = false; rfvSecID.Enabled = false; } if (ac == "IEmp") { if (!FormSession.getPerm("IEmp")) { btnSave.Enabled = false; btnIDSearch.Enabled = false; } btnSave.Text = General.Msg("Save", "حفظ"); MainMasterPage.ShowTitel(General.Msg("Add Third party Employee", "إضافة موظف جهات خارجية ")); ddlEmpType.SelectedIndex = ddlEmpType.Items.IndexOf(ddlEmpType.Items.FindByValue("Emp")); divContract.Visible = false; rfvCompID.Enabled = false; divSection.Visible = true; rfvSecID.Enabled = true; txtIDSearch.Text = FindMaxID(); } if (ac == "UEmp") { if (!FormSession.getPerm("UEmp")) { btnSave.Enabled = false; btnIDSearch.Enabled = false; } btnSave.Text = General.Msg("Update", "تعديل"); MainMasterPage.ShowTitel(General.Msg("Update Third party Employee", "تعديل موظف جهات خارجية ")); ddlEmpType.SelectedIndex = ddlEmpType.Items.IndexOf(ddlEmpType.Items.FindByValue("Emp")); divContract.Visible = false; rfvCompID.Enabled = false; divSection.Visible = true; rfvSecID.Enabled = true; } if (ac == "ICon") { if (!FormSession.getPerm("ICon")) { btnSave.Enabled = false; btnIDSearch.Enabled = false; } btnSave.Text = General.Msg("Save", "حفظ"); MainMasterPage.ShowTitel(General.Msg("Add Contractor", "إضافة متعاقد")); ddlEmpType.SelectedIndex = ddlEmpType.Items.IndexOf(ddlEmpType.Items.FindByValue("Con")); divContract.Visible = true; rfvCompID.Enabled = true; divSection.Visible = false; rfvSecID.Enabled = false; txtIDSearch.Text = FindMaxID(); } if (ac == "UCon") { if (!FormSession.getPerm("UCon")) { btnSave.Enabled = false; btnIDSearch.Enabled = false; } btnSave.Text = General.Msg("Update", "تعديل"); MainMasterPage.ShowTitel(General.Msg("Update Contractor", "تعديل متعاقد")); ddlEmpType.SelectedIndex = ddlEmpType.Items.IndexOf(ddlEmpType.Items.FindByValue("Con")); divContract.Visible = true; rfvCompID.Enabled = true; divSection.Visible = false; rfvSecID.Enabled = false; } } EmpImage.EnabledImage(false); Fillddl(); } if (IsPostBack) { EmpImage.PopulateImage(txtEmpNationalID.Text); } } catch (Exception e1) { DBFun.InsertError(FormSession.PageName, "PageLoad"); } }
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// protected void Page_Load(object sender, EventArgs e) { try { // --------------------Common Code ----------------------------------------------------------------- // string Type = (Request.QueryString["Type"] != null) ? Request.QueryString["Type"] : ""; if (Type == "PCard" || Type == "TCard" || Type == "PStck" || Type == "TStck") { FormSession.FillSession("Card", pageDiv); } if (Type == "PVCrd" || Type == "TVCrd") { FormSession.FillSession("Visitor", pageDiv); } // --------------------Common Code ----------------------------------------------------------------- // if (!IsPostBack) { string CardType = ""; if (Type == "PCard") { CardType = "CardPrint"; /**/ CardsSideMenu1.Visible = true; /**/ MainMasterPage.ShowTitel(General.Msg("Print Card", "طباعة البطاقات")); } if (Type == "TCard") { CardType = "CardTemplate"; /**/ CardsSideMenu1.Visible = true; /**/ MainMasterPage.ShowTitel(General.Msg("Templates Card", "نماذج البطاقات")); } if (Type == "PStck") { CardType = "SCardPrint"; /**/ CardsSideMenu1.Visible = true; /**/ MainMasterPage.ShowTitel(General.Msg("Print Sticker Cars", "طباعة ملصقات السيارات")); } if (Type == "TStck") { CardType = "SCardTemplate"; /**/ CardsSideMenu1.Visible = true; /**/ MainMasterPage.ShowTitel(General.Msg("Templates Sticker Cars", "نماذج ملصقات السيارات")); } if (Type == "PVCrd") { CardType = "VCardPrint"; /**/ VisitorsSideMenu1.Visible = true; /**/ MainMasterPage.ShowTitel(General.Msg("Print Events Cards", "طباعة بطاقات المناسبات")); } if (Type == "TVCrd") { CardType = "VCardTemplate"; /**/ VisitorsSideMenu1.Visible = true; /**/ MainMasterPage.ShowTitel(General.Msg("Templates Events Cards", "نماذج بطاقات المناسبات")); } //if (Type == "ViCard") { CardType = "CardView";/**/ CardsSideMenu1.Visible = true; /**/ MainMasterPage.ShowTitel(General.Msg("View Card", "عرض البطاقات")); } hfdConnStr.Value = ConfigurationManager.ConnectionStrings["constring"].ConnectionString.Replace("\\", "...."); hfdLoginUser.Value = FormSession.LoginUsr.Replace("\\", "...."); hfdLang.Value = FormSession.Language; hfdType.Value = CardType; string Value = hfdConnStr.Value + "," + hfdLoginUser.Value + "," + hfdLang.Value + "," + hfdType.Value; ClientScript.RegisterStartupScript(this.GetType(), "key", "javascript:Connect('" + Value + "');", true); } } catch (Exception e1) { DBFun.InsertError(FormSession.PageName, "PageLoad"); } }
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// protected void Page_Load(object sender, EventArgs e) { try { // --------------------Common Code ----------------------------------------------------------------- // FormSession.FillSession("Users", pageDiv); // --------------------Common Code ----------------------------------------------------------------- // if (!string.IsNullOrEmpty(txtUsrPassword.Text)) { ViewState["Pass"] = txtUsrPassword.Text; } if (ViewState["Pass"] != null) { txtUsrPassword.Attributes["value"] = ViewState["Pass"].ToString(); } if (!IsPostBack) { if (Request.QueryString["ac"] != null) { if (Request.QueryString["ac"].ToString() == "i") { if (!FormSession.PermUsr.Contains("I" + MainPer)) { Response.Redirect(@"~/Login.aspx"); } btnSave.Enabled = FormSession.PermUsr.Contains("I" + MainPer); ViewState["CommandName"] = "Save"; btnSave.Text = General.Msg("Save", "حفظ"); MainMasterPage.ShowTitel(General.Msg("Add " + MainNameEn, "إضافة " + MainName1Ar)); divUpdDel.Visible = false; txtUsrLoginID.Enabled = true; } if (Request.QueryString["ac"].ToString() == "u") { if (!FormSession.PermUsr.Contains("U" + MainPer)) { Response.Redirect(@"~/Login.aspx"); } btnSave.Enabled = FormSession.PermUsr.Contains("U" + MainPer); ViewState["CommandName"] = "Update"; btnSave.Text = General.Msg("Update", "تعديل"); MainMasterPage.ShowTitel(General.Msg("Update " + MainNameEn, "تعديل " + MainName1Ar)); divUpdDel.Visible = true; txtUsrLoginID.Enabled = false; Fillddl(); } if (Request.QueryString["ac"].ToString() == "d") { if (!FormSession.PermUsr.Contains("D" + MainPer)) { Response.Redirect(@"~/Login.aspx"); } btnSave.Enabled = FormSession.PermUsr.Contains("D" + MainPer); ViewState["CommandName"] = "Delete"; btnSave.Text = General.Msg("Delete", "حذف"); MainMasterPage.ShowTitel(General.Msg("Delete " + MainNameEn, "حذف " + MainName1Ar)); divUpdDel.Visible = true; txtUsrLoginID.Enabled = false; Fillddl(); } FormCtrl.FillDDL("Status", ddlUsrStatus); } } } catch (Exception e1) { } }