Ejemplo n.º 1
0
    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    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) { }
    }
Ejemplo n.º 2
0
    //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    protected void Page_Load(object sender, EventArgs e)
    {
        //--Common Code----------------------------------------------------------------- //
        FormSession.FillSession("Users", pageDiv);
        FormCtrl.RefreshGridEmpty(ref grdData, 20, "No Data Found", "لا توجد بيانات");
        //--Common Code----------------------------------------------------------------- //

        if (!string.IsNullOrEmpty(txtUsrPassword.Text))
        {
            ViewState["Pass"] = txtUsrPassword.Text;
        }
        if (ViewState["Pass"] != null)
        {
            txtUsrPassword.Attributes["value"] = ViewState["Pass"].ToString();
        }

        if (!IsPostBack)
        {
            btnAdd.Enabled    = FormSession.PermUsr.Contains("I" + MainPer);
            pnlSearch.Enabled = grdData.Enabled = FormSession.PermUsr.Contains("V" + MainPer);
            FillGrid(MainQuery);

            DataItemStatus(false);
        }
    }
Ejemplo n.º 3
0
    ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    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"); }
    }
 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 private void PermSideMenu()
 {
     btnDepartment.Enabled  = FormSession.getPerm("Departments");
     btnDepRelation.Enabled = FormSession.getPerm("Departments");
     //btnCreateCards.Enabled          = FormSession.getPerm("ICrdVis");
     //btnCardHistory.Enabled          = FormSession.getPerm("SCrdVis");
 }
Ejemplo n.º 5
0
    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    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) { }
    }
Ejemplo n.º 6
0
    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    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"); }
    }
Ejemplo n.º 7
0
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    protected void Page_Load(object sender, EventArgs e)
    {
        //--Common Code----------------------------------------------------------------- //
        FormSession.FillSession("Home", pageDiv);
        //--Common Code----------------------------------------------------------------- //

        if (!string.IsNullOrEmpty(txtCurrentPass.Text))
        {
            ViewState["CurrentPass"] = txtCurrentPass.Text;
        }
        if (ViewState["CurrentPass"] != null)
        {
            txtCurrentPass.Attributes["value"] = ViewState["CurrentPass"].ToString();
        }

        if (!string.IsNullOrEmpty(txtNewPass.Text))
        {
            ViewState["NewPass"] = txtNewPass.Text;
        }
        if (ViewState["NewPass"] != null)
        {
            txtNewPass.Attributes["value"] = ViewState["NewPass"].ToString();
        }

        if (!string.IsNullOrEmpty(txtConfirmPass.Text))
        {
            ViewState["ConfirmPass"] = txtConfirmPass.Text;
        }
        if (ViewState["ConfirmPass"] != null)
        {
            txtConfirmPass.Attributes["value"] = ViewState["ConfirmPass"].ToString();
        }
    }
Ejemplo n.º 8
0
    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    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();
        }
    }
Ejemplo n.º 9
0
 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 private void PermSideMenu()
 {
     btnImportDBConfig.Enabled = FormSession.getPerm("USet");
     btnWorktimeSet.Enabled    = FormSession.getPerm("USet");
     btnImportTimeSch.Enabled  = FormSession.getPerm("USet");
     btnDatalogImport.Enabled  = FormSession.getPerm("USet");
     btnEmailSetting.Enabled   = FormSession.getPerm("USet");
 }
Ejemplo n.º 10
0
    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    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"); }
    }
Ejemplo n.º 11
0
    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    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"); }
    }
Ejemplo n.º 12
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //--Common Code----------------------------------------------------------------- //
        FormSession.FillSession("Home", pageDiv);
        //--Common Code----------------------------------------------------------------- //

        if (!IsPostBack)
        {
        }
    }
Ejemplo n.º 13
0
    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    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 == "View")
                    {
                        //if (!FormSession.getPerm("UMng")) { btnSave.Enabled = false; btnIDSearch.Enabled = false; }
                        string iEmpID = Request.QueryString["EmpID"].ToString();
                        divContract.Visible = true;
                        divSection.Visible  = true;
                        DataItemEnabled(false);
                        Fillddl();
                        btnIDSearch.Enabled = btnUploadDoc.Enabled = false;

                        if (Request.QueryString["EmpID"] != null)
                        {
                            DataTable EmpDT = DBFun.FetchData("SELECT * FROM EmployeeMaster WHERE EmpID = '" + iEmpID + "' ");
                            FillGrdDocs(EmpDT.Rows[0]["EmpNationalID"].ToString());

                            if (!DBFun.IsNullOrEmpty(EmpDT))
                            {
                                ddlEmpType.SelectedIndex = ddlEmpType.Items.IndexOf(ddlEmpType.Items.FindByValue(EmpDT.Rows[0]["EmpType"].ToString()));
                                FillFromDT(EmpDT);
                            }
                        }
                    }
                }
            }

            if (IsPostBack)
            {
                EmpImage.PopulateImage(txtEmpNationalID.Text);
            }
        }
        catch (Exception e1) { DBFun.InsertError(FormSession.PageName, "PageLoad"); }
    }
Ejemplo n.º 14
0
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    protected void Page_Load(object sender, EventArgs e)
    {
        //--Common Code----------------------------------------------------------------- //
        FormSession.FillSession("Settings", pageDiv);
        //--Common Code----------------------------------------------------------------- //

        if (!IsPostBack)
        {
            PopulateUI(MainQuery);
        }
    }
Ejemplo n.º 15
0
    //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    protected void Page_Load(object sender, EventArgs e)
    {
        //--Common Code----------------------------------------------------------------- //
        FormSession.FillSession("Machines", pageDiv);
        FormCtrl.RefreshGridEmpty(ref grdData, 20, "No Data Found", "لا توجد بيانات");
        //--Common Code----------------------------------------------------------------- //

        if (!IsPostBack)
        {
            FillGrid(MainQuery);
        }
    }
Ejemplo n.º 16
0
    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    private void PermSideMenu()
    {
        btnNewVisitors.Enabled          = FormSession.getPerm("IVis");
        btnUpdateVisitors.Enabled       = FormSession.getPerm("UVis");
        btnImportVisitors.Enabled       = FormSession.getPerm("ImpVis");
        btnImportImagesVisitors.Enabled = FormSession.getPerm("ImpVis");
        btnPrintCards.Enabled           = FormSession.getPerm("PCrdVis");
        btnTemplatesCard.Enabled        = FormSession.getPerm("TCrdVis");
        btnHistoryVisitors.Enabled      = FormSession.getPerm("SVis");

        //btnCreateCards.Enabled          = FormSession.getPerm("ICrdVis");
        //btnCardHistory.Enabled          = FormSession.getPerm("SCrdVis");
    }
Ejemplo n.º 17
0
    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    private void PermSideMenu()
    {
        btnCreateEmpManager.Enabled    = FormSession.getPerm("IMng");
        btnUpdateEmpManager.Enabled    = FormSession.getPerm("UMng");
        btnCreateEmpEmployee.Enabled   = FormSession.getPerm("IEmp");
        btnUpdateEmpEmployee.Enabled   = FormSession.getPerm("UEmp");
        btnCreateEmpContractor.Enabled = FormSession.getPerm("ICon");
        btnUpdateEmpContractor.Enabled = FormSession.getPerm("UCon");

        btnUpdateEmpType.Enabled  = FormSession.getPerm("UEmpType");
        btnSearchEmployee.Enabled = FormSession.getPerm("SEmployees");
        btnEmpFP.Enabled          = FormSession.getPerm("VFPEmp");
        btnAfis.Enabled           = FormSession.getPerm("FPVerify");
    }
Ejemplo n.º 18
0
    //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    private void PermSideMenu()
    {
        btnCreateCards.Enabled   = FormSession.getPerm("ICrd");
        btnUpdateCards.Enabled   = FormSession.getPerm("UCrd");
        btnApproveCards.Enabled  = FormSession.getPerm("ACrd");
        btnPrintCards.Enabled    = FormSession.getPerm("PCrd");
        btnTemplatesCard.Enabled = FormSession.getPerm("TCrd");
        btnCardHistory.Enabled   = FormSession.getPerm("SCrd");

        btnUpdateIssue.Enabled = FormSession.PermUsr.Contains("UIsCrd");

        btnCreateSticker.Enabled    = FormSession.getPerm("IStick");
        btnPrintSticker.Enabled     = FormSession.getPerm("PStck");
        btnTemplatesSticker.Enabled = FormSession.getPerm("TStck");
    }
Ejemplo n.º 19
0
    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

    /*#############################################################################################################################*/
    /*#############################################################################################################################*/
    #region Reports Groups Events

    private void FillReportsGroups()
    {
        DataTable GDT = DBFun.FetchData(" SELECT * FROM ReportGroup ORDER BY RgpID ");

        if (!DBFun.IsNullOrEmpty(GDT))
        {
            foreach (DataRow DR in GDT.Rows)
            {
                if (FormSession.getPerm(new string[] { "Rep" + DR["RgpID"] }))
                {
                    ListItem _liReport = new ListItem(DR["RgpName" + FormSession.Language].ToString(), DR["RgpID"].ToString());
                    lstReportsGroups.Items.Add(_liReport);
                }
            }
        }
    }
    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    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");
            }
        }
    }
Ejemplo n.º 21
0
    //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    protected void Page_Load(object sender, EventArgs e)
    {
        //--Common Code----------------------------------------------------------------- //
        FormSession.FillSession("EmpVacation", pageDiv);
        FormCtrl.RefreshGridEmpty(ref grdData, 20, "No Data Found", "لا توجد بيانات");
        //--Common Code----------------------------------------------------------------- //

        if (!IsPostBack)
        {
            btnAdd.Enabled    = FormSession.PermUsr.Contains("I" + MainPer);
            pnlSearch.Enabled = grdData.Enabled = FormSession.PermUsr.Contains("V" + MainPer);
            FillGrid(MainQuery);

            DataItemStatus(false);
        }
    }
Ejemplo n.º 22
0
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    protected void ButtonAction(String pBtn) //string pBtn = [Fetch,Save,Cancel]
    {
        string action = "IStick";

        btnIDSearch.Enabled = Convert.ToBoolean(Convert.ToInt32(pBtn[0].ToString()));
        btnSave.Enabled     = Convert.ToBoolean(Convert.ToInt32(pBtn[1].ToString()));
        btnCancel.Enabled   = Convert.ToBoolean(Convert.ToInt32(pBtn[2].ToString()));
        if (pBtn[0] != '0')
        {
            btnIDSearch.Enabled = FormSession.getPerm(action);
        }
        if (pBtn[1] != '0')
        {
            btnSave.Enabled = FormSession.getPerm(action);
        }
    }
Ejemplo n.º 23
0
 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 public void RedirectPage()
 {
     FormSession.FillSession("", null);
     PermSideMenu();
     foreach (Control ctrl in this.Controls)
     {
         if (ctrl is LinkButton)
         {
             LinkButton lb = (LinkButton)ctrl;
             string     id = lb.ID;
             if (lb.Enabled)
             {
                 Response.Redirect(lb.PostBackUrl); break;
             }
         }
     }
 }
Ejemplo n.º 24
0
    //string SubQuery  = "SELECT * FROM SubDepartments WHERE SdpID = SdpID ";
    //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    protected void Page_Load(object sender, EventArgs e)
    {
        //--Common Code----------------------------------------------------------------- //
        FormSession.FillSession("Departments", pageDiv);
        FormCtrl.RefreshGridEmpty(ref grdMainData, 20, "No Data Found", "لا توجد بيانات");
        //FormCtrl.RefreshGridEmpty(ref grdSubData , 20, "No Data Found","لا توجد بيانات");
        //--Common Code----------------------------------------------------------------- //

        if (!IsPostBack)
        {
            btnMainAdd.Enabled = FormSession.PermUsr.Contains("I" + MainPer);
            pnlSearch.Enabled  = grdMainData.Enabled = FormSession.PermUsr.Contains("V" + MainPer);
            FillMainGrid(MainQuery);
            //FillSubGrid(SubQuery + " AND SdpID = -1");

            DataMainItemStatus(false);
            //DataSubItemStatus(false);
        }
    }
Ejemplo n.º 25
0
    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    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) { }
    }
Ejemplo n.º 26
0
    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    protected void Page_Load(object sender, EventArgs e)
    {
        FormSession.FillSession("", null);

        try { Response.AppendHeader("Refresh", Convert.ToString((Session.Timeout * 60) + 2) + "; URL=../Login.aspx"); } catch (Exception ex) { }

        if (FormSession.Language == "Ar")
        {
            MainDiv.Attributes.Add("dir", "rtl");
        }
        else
        {
            MainDiv.Attributes.Add("dir", "ltr");
        }

        int Index = InfoTab.FindPageIndex(FormSession.PageIndex);

        InfoTab.ShowTabs(Index, Session["Language"].ToString(), (HtmlTableCell)MyHeader.FindControl("MenuHeader"));
        lblHeading.Text = Titel;
    }
Ejemplo n.º 27
0
    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    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"); }
    }
Ejemplo n.º 28
0
 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 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) { }
 }
Ejemplo n.º 29
0
    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    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) { }
    }
Ejemplo n.º 30
0
    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    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) { }
    }