Ejemplo n.º 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["UserId"] == null)
        {
            Response.Redirect("~/ERPLogin.aspx");
        }

        ScriptManager sm = (ScriptManager)Master.FindControl("SM1");

        sm.RegisterPostBackControl(btnLogProcess);


        Session["AccordianId"] = "6";
        Session["HeaderText"]  = "Attendance Reports";
        Page.Title             = objSys.GetSysTitle();
        if (!IsPostBack)
        {
            txtYear.Text           = System.DateTime.Now.Year.ToString();
            ddlMonth.SelectedValue = System.DateTime.Now.Month.ToString();

            pnlEmpAtt.Visible = true;

            FillGrid();
            rbtnEmpSal.Checked   = true;
            rbtnGroupSal.Checked = false;
            EmpGroupSal_CheckedChanged(null, null);
            pnlReport.Visible = false;
        }

        GetReport();
    }
Ejemplo n.º 2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["UserId"] == null)
        {
            Response.Redirect("~/ERPLogin.aspx");
        }



        Session["AccordianId"] = "6";
        Session["HeaderText"]  = "Attendance Reports";
        Page.Title             = objSys.GetSysTitle();
        if (!IsPostBack)
        {
            pnlEmpAtt.Visible = true;

            FillGrid();
            rbtnEmpSal.Checked   = true;
            rbtnGroupSal.Checked = false;
            EmpGroupSal_CheckedChanged(null, null);
            pnlReport.Visible = false;
            if (Session["EmpList"] != null)
            {
                pnlEmpAtt.Visible = false;
                pnlReport.Visible = true;
            }
        }
        txtFrom_CalendarExtender.Format = objSys.SetDateFormat();
        CalendarExtender1.Format        = objSys.SetDateFormat();
    }
Ejemplo n.º 3
0
    public void AllPageCode()
    {
        Page.Title             = objSys.GetSysTitle();
        Session["AccordianId"] = "8";
        Session["HeaderText"]  = "Master Setup";
        DataTable dtAllPageCode = cmn.GetAllPagePermission(Session["UserId"].ToString(), "8", "43");

        if (dtAllPageCode.Rows.Count != 0)
        {
            if (dtAllPageCode.Rows[0][0].ToString() == "SuperAdmin")
            {
                btnCSave.Visible = true;
                foreach (GridViewRow Row in GvGroup.Rows)
                {
                    ((ImageButton)Row.FindControl("btnEdit")).Visible    = true;
                    ((ImageButton)Row.FindControl("IbtnDelete")).Visible = true;
                }
                imgBtnRestore.Visible   = true;
                ImgbtnSelectAll.Visible = true;
            }
            else
            {
                foreach (DataRow DtRow in dtAllPageCode.Rows)
                {
                    if (Convert.ToBoolean(DtRow["Op_Add"].ToString()))
                    {
                        btnCSave.Visible = true;
                    }
                    foreach (GridViewRow Row in GvGroup.Rows)
                    {
                        if (Convert.ToBoolean(DtRow["Op_Edit"].ToString()))
                        {
                            ((ImageButton)Row.FindControl("btnEdit")).Visible = true;
                        }
                        if (Convert.ToBoolean(DtRow["Op_Delete"].ToString()))
                        {
                            ((ImageButton)Row.FindControl("IbtnDelete")).Visible = true;
                        }
                    }
                    if (Convert.ToBoolean(DtRow["Op_Restore"].ToString()))
                    {
                        imgBtnRestore.Visible   = true;
                        ImgbtnSelectAll.Visible = true;
                    }
                    if (Convert.ToBoolean(DtRow["Op_View"].ToString()))
                    {
                    }
                    if (Convert.ToBoolean(DtRow["Op_Print"].ToString()))
                    {
                    }
                    if (Convert.ToBoolean(DtRow["Op_Download"].ToString()))
                    {
                    }
                    if (Convert.ToBoolean(DtRow["Op_Upload"].ToString()))
                    {
                    }
                }
            }
        }
    }
    public void AllPageCode()
    {
        Page.Title    = ObjSysParam.GetSysTitle();
        UserId        = Session["UserId"].ToString();
        StrCompId     = Session["CompId"].ToString();
        StrBrandId    = Session["BrandId"].ToString();
        StrLocationId = Session["LocId"].ToString();

        Session["AccordianId"] = "12";
        Session["HeaderText"]  = "Purchase";
        DataTable dtAllPageCode = cmn.GetAllPagePermission(UserId.ToString(), "12", "58");

        if (dtAllPageCode.Rows.Count != 0)
        {
            if (dtAllPageCode.Rows[0][0].ToString() == "SuperAdmin")
            {
                btnSave.Visible = true;

                foreach (GridViewRow Row in GvPurchaseInvocie.Rows)
                {
                    ((ImageButton)Row.FindControl("btnEdit")).Visible = true;
                }
            }
            else
            {
                foreach (DataRow DtRow in dtAllPageCode.Rows)
                {
                    if (Convert.ToBoolean(DtRow["Op_Add"].ToString()))
                    {
                        btnSave.Visible = true;
                    }
                    foreach (GridViewRow Row in GvPurchaseInvocie.Rows)
                    {
                        if (Convert.ToBoolean(DtRow["Op_Edit"].ToString()))
                        {
                            ((ImageButton)Row.FindControl("btnEdit")).Visible = true;
                        }
                    }


                    if (Convert.ToBoolean(DtRow["Op_Restore"].ToString()))
                    {
                    }
                    if (Convert.ToBoolean(DtRow["Op_View"].ToString()))
                    {
                    }
                    if (Convert.ToBoolean(DtRow["Op_Print"].ToString()))
                    {
                    }
                    if (Convert.ToBoolean(DtRow["Op_Download"].ToString()))
                    {
                    }
                    if (Convert.ToBoolean(DtRow["Op_Upload"].ToString()))
                    {
                    }
                }
            }
        }
    }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["UserId"] == null)
     {
         Response.Redirect("~/ERPLogin.aspx");
     }
     Session["AccordianId"] = "9";
     Session["HeaderText"]  = "Attendance Setup";
     if (!IsPostBack)
     {
         GetLog("10");
     }
     Page.Title = objSys.GetSysTitle();
 }
Ejemplo n.º 6
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["UserId"] == null)
     {
         Response.Redirect("~/ERPLogin.aspx");
     }
     Page.Title = objSys.GetSysTitle();
     if (!IsPostBack)
     {
         FillGrid();
         pnlDeviceOp.Visible = false;
     }
     AllPageCode();
 }
Ejemplo n.º 7
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Session["AccordianId"] = "8";
        SystemParameter objSys = new SystemParameter();

        Page.Title = objSys.GetSysTitle();
        if (!IsPostBack)
        {
            pnl1.Visible = true;
            pnl2.Visible = true;

            fillDropdown(ddlCompany, fillCompanybyUser(), "Company_Name", "Company_Id");

            try
            {
                ddlCompany.SelectedIndex = 0;
            }
            catch
            {
            }
            ddlCompany_SelectedIndexChanged(null, null);
        }
        else
        {
            try
            {
                Label lblcomp      = (Label)Master.FindControl("lblCompany1");
                Label lblBrand     = (Label)Master.FindControl("lblBrand1");
                Label lblLocation  = (Label)Master.FindControl("lblLocation1");
                Label lblLanguage1 = (Label)Master.FindControl("lblLanguage");

                lblcomp.Text         = ddlCompany.SelectedItem.Text;
                lblBrand.Text        = ddlBrand.SelectedItem.Text;
                lblLocation.Text     = ddlLocation.SelectedItem.Text;
                lblLanguage1.Text    = ddlLanguage.SelectedItem.Text;
                Session["CompName"]  = lblcomp.Text;
                Session["LocName"]   = lblLocation.Text;
                Session["BrandName"] = lblBrand.Text;
                Session["Language"]  = lblLanguage1.Text;
            }
            catch
            {
                //Session.Abandon();
                //Session.Clear();
                //Response.Redirect("~/ERPLogin.aspx");
            }
        }
    }
Ejemplo n.º 8
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["UserId"] == null)
     {
         Response.Redirect("~/ERPLogin.aspx");
     }
     StrCompId = Session["CompId"].ToString();
     StrUserId = Session["UserId"].ToString();
     Session["AccordianId"] = "11";
     Session["HeaderText"]  = "Inventory";
     if (!IsPostBack)
     {
         FillProductGrid();
         btnList_Click(null, null);
     }
     Page.Title = ObjSysParam.GetSysTitle();
 }
Ejemplo n.º 9
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["UserId"] == null)
        {
            Response.Redirect("~/ERPLogin.aspx");
        }
        Page.Title = objSys.GetSysTitle();
        AllPageCode();
        if (!IsPostBack)
        {
            txtValue.Focus();

            FillGridBin();
            FillGrid();

            btnList_Click(null, null);
        }
    }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["UserId"] == null)
     {
         Response.Redirect("~/ERPLogin.aspx");
     }
     Page.Title = objSys.GetSysTitle();
     if (!IsPostBack)
     {
         pnlList.Visible = true;
         pnlNew.Visible  = false;
         FillLeaveStatus();
         btnList_Click(null, null);
     }
     Session["AccordianId"]   = "9";
     Session["HeaderText"]    = "Attendance Setup";
     CalendarExtender2.Format = objSys.SetDateFormat();
 }
Ejemplo n.º 11
0
    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();
    }
Ejemplo n.º 12
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["UserId"] == null)
        {
            Response.Redirect("~/ERPLogin.aspx");
        }

        if (!IsPostBack)
        {
            if (Session["lang"] == null)
            {
                Session["lang"] = "1";
            }
            ViewState["CurrIndex"]    = 0;
            ViewState["SubSize"]      = 9;
            ViewState["CurrIndexbin"] = 0;
            ViewState["SubSizebin"]   = 9;
            Session["dtLeave"]        = null;
            TxtYear.Text = DateTime.Now.Year.ToString();
            int CurrentMonth = Convert.ToInt32(DateTime.Now.Month.ToString());
            ddlMonth.SelectedValue = (CurrentMonth).ToString();


            Session["empimgpath"] = null;

            Page.Form.Attributes.Add("enctype", "multipart/form-data");


            bool IsCompOT      = false;
            bool IsPartialComp = false;

            IsCompOT      = Convert.ToBoolean(objAppParam.GetApplicationParameterValueByParamName("IsOverTime", Session["CompId"].ToString()));
            IsPartialComp = Convert.ToBoolean(objAppParam.GetApplicationParameterValueByParamName("Partial_Leave_Enable", Session["CompId"].ToString()));


            btnLeave_Click(null, null);
        }

        Page.Title = objSys.GetSysTitle();

        TxtClaimName.Focus();
    }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["UserId"] == null)
     {
         Response.Redirect("~/ERPLogin.aspx");
     }
     Page.Title = objSys.GetSysTitle();
     if (!IsPostBack)
     {
         pnlEmpAtt.Visible        = true;
         Session["ReportTransId"] = null;
         FillGrid();
         rbtnEmpSal.Checked   = true;
         rbtnGroupSal.Checked = false;
         EmpGroupSal_CheckedChanged(null, null);
         pnlEmpNf.Visible      = false;
         pnlReportType.Visible = false;
     }
     Session["AccordianId"] = "9";
     Session["HeaderText"]  = "Attendance Setup";
 }
Ejemplo n.º 14
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["UserId"] == null)
     {
         Response.Redirect("~/ERPLogin.aspx");
     }
     Page.Title = objSys.GetSysTitle();
     if (!IsPostBack)
     {
         pnlAttList.Visible = true;
         pnlEmpAtt.Visible  = false;
         FillGrid();
         btnList_Click(null, null);
         rbtnByManual.Checked = true;
         rbtnByTour.Checked   = false;
     }
     Session["AccordianId"]          = "9";
     Session["HeaderText"]           = "Attendance Setup";
     CalendarExtender1.Format        = objSys.SetDateFormat();
     CalendarExtender2.Format        = objSys.SetDateFormat();
     txtFrom_CalendarExtender.Format = objSys.SetDateFormat();
 }
Ejemplo n.º 15
0
    public void AllPageCode()
    {
        Page.Title             = ObjSysParam.GetSysTitle();
        StrUserId              = Session["UserId"].ToString();
        StrCompId              = Session["CompId"].ToString();
        Session["AccordianId"] = "12";
        Session["HeaderText"]  = "Purchase";
        DataTable dtAllPageCode = cmn.GetAllPagePermission(StrUserId.ToString(), "12", "74");

        if (dtAllPageCode.Rows.Count != 0)
        {
            if (dtAllPageCode.Rows[0][0].ToString() == "SuperAdmin")
            {
                foreach (GridViewRow Row in gvPurchaseRequest.Rows)
                {
                    ((ImageButton)Row.FindControl("IbtnApprove")).Visible = true;
                    ((ImageButton)Row.FindControl("IbtnReject")).Visible  = true;
                }
            }
            else
            {
                foreach (DataRow DtRow in dtAllPageCode.Rows)
                {
                    if (Convert.ToBoolean(DtRow["Op_Add"].ToString()))
                    {
                    }

                    if (Convert.ToBoolean(DtRow["Op_Edit"].ToString()))
                    {
                    }
                    if (Convert.ToBoolean(DtRow["Op_Delete"].ToString()))
                    {
                    }
                    foreach (GridViewRow Row in gvPurchaseRequest.Rows)
                    {
                        if (Convert.ToBoolean(DtRow["Op_Edit"].ToString()))
                        {
                        }
                        if (Convert.ToBoolean(DtRow["Op_Delete"].ToString()))
                        {
                        }
                    }

                    if (Convert.ToBoolean(DtRow["Op_Restore"].ToString()))
                    {
                    }
                    if (Convert.ToBoolean(DtRow["Op_View"].ToString()))
                    {
                    }
                    if (Convert.ToBoolean(DtRow["Op_Print"].ToString()))
                    {
                    }


                    if (Convert.ToBoolean(DtRow["Op_Download"].ToString()))
                    {
                    }
                    if (Convert.ToBoolean(DtRow["Op_Upload"].ToString()))
                    {
                    }
                }
            }
        }
    }
Ejemplo n.º 16
0
    public void AllPageCode()
    {
        Page.Title = ObjSysParam.GetSysTitle();
        StrUserId  = Session["UserId"].ToString();
        StrCompId  = Session["CompId"].ToString();
        // Session["AccordianId"] = "19";
        //Session["HeaderText"] = "HR";
        DataTable dtAllPageCode = cmn.GetAllPagePermission(StrUserId.ToString(), "19", "65");

        if (dtAllPageCode.Rows.Count != 0)
        {
            if (dtAllPageCode.Rows[0][0].ToString() == "SuperAdmin")
            {
                //btnCSave.Visible = true;
                foreach (GridViewRow Row in GvrProjecttask.Rows)
                {
                    // ((ImageButton)Row.FindControl("btnEdit")).Visible = true;
                    //((ImageButton)Row.FindControl("IbtnDelete")).Visible = true;
                }
                // imgBtnRestore.Visible = true;
                // ImgbtnSelectAll.Visible = true;
            }
            else
            {
                foreach (DataRow DtRow in dtAllPageCode.Rows)
                {
                    if (Convert.ToBoolean(DtRow["Op_Add"].ToString()))
                    {
                        // btnCSave.Visible = true;
                    }
                    foreach (GridViewRow Row in GvrProjecttask.Rows)
                    {
                        if (Convert.ToBoolean(DtRow["Op_Edit"].ToString()))
                        {
                            ((ImageButton)Row.FindControl("btnEdit")).Visible = true;
                        }
                        if (Convert.ToBoolean(DtRow["Op_Delete"].ToString()))
                        {
                            ((ImageButton)Row.FindControl("IbtnDelete")).Visible = true;
                        }
                    }
                    if (Convert.ToBoolean(DtRow["Op_Restore"].ToString()))
                    {
                        // imgBtnRestore.Visible = true;
                        //ImgbtnSelectAll.Visible = true;
                    }
                    if (Convert.ToBoolean(DtRow["Op_View"].ToString()))
                    {
                    }
                    if (Convert.ToBoolean(DtRow["Op_Print"].ToString()))
                    {
                    }
                    if (Convert.ToBoolean(DtRow["Op_Download"].ToString()))
                    {
                    }
                    if (Convert.ToBoolean(DtRow["Op_Upload"].ToString()))
                    {
                    }
                }
            }
        }
    }
Ejemplo n.º 17
0
    public void AllPageCode()
    {
        Page.Title             = ObjSysPeram.GetSysTitle();
        StrUserId              = Session["UserId"].ToString();
        StrCompId              = Session["CompId"].ToString();
        Session["AccordianId"] = "11";
        Session["HeaderText"]  = "Inventory";
        DataTable dtAllPageCode = cmn.GetAllPagePermission(StrUserId.ToString(), "11", "108");

        if (dtAllPageCode.Rows.Count != 0)
        {
            if (dtAllPageCode.Rows[0][0].ToString() == "SuperAdmin")
            {
                btnSave.Visible = true;
                foreach (GridViewRow Row in gvRackMaster.Rows)
                {
                    ((ImageButton)Row.FindControl("btnEdit")).Visible    = true;
                    ((ImageButton)Row.FindControl("IbtnDelete")).Visible = true;
                }
                ImgbtnSelectAll.Visible    = true;
                btnRestoreSelected.Visible = true;
            }
            else
            {
                foreach (DataRow DtRow in dtAllPageCode.Rows)
                {
                    if (Convert.ToBoolean(DtRow["Op_Add"].ToString()))
                    {
                        btnSave.Visible = true;
                    }
                    foreach (GridViewRow Row in gvRackMaster.Rows)
                    {
                        if (Convert.ToBoolean(DtRow["Op_Edit"].ToString()))
                        {
                            ((ImageButton)Row.FindControl("btnEdit")).Visible = true;
                        }
                        if (Convert.ToBoolean(DtRow["Op_Delete"].ToString()))
                        {
                            ((ImageButton)Row.FindControl("IbtnDelete")).Visible = true;
                        }
                    }
                    if (Convert.ToBoolean(DtRow["Op_Restore"].ToString()))
                    {
                        ImgbtnSelectAll.Visible    = true;
                        btnRestoreSelected.Visible = true;
                    }
                    if (Convert.ToBoolean(DtRow["Op_View"].ToString()))
                    {
                    }
                    if (Convert.ToBoolean(DtRow["Op_Print"].ToString()))
                    {
                    }
                    if (Convert.ToBoolean(DtRow["Op_Download"].ToString()))
                    {
                    }
                    if (Convert.ToBoolean(DtRow["Op_Upload"].ToString()))
                    {
                    }
                }
            }
        }
    }
    public void AllPageCode()
    {
        Page.Title = ObjSysParam.GetSysTitle();

        StrBrandId    = Session["BrandId"].ToString();
        StrLocationId = Session["LocId"].ToString();

        UserId    = Session["UserId"].ToString();
        StrCompId = Session["CompId"].ToString();
        Session["AccordianId"] = "11";
        Session["HeaderText"]  = "Inventory";
        DataTable dtAllPageCode = cmn.GetAllPagePermission(UserId.ToString(), "11", "93");

        if (dtAllPageCode.Rows.Count != 0)
        {
            if (dtAllPageCode.Rows[0][0].ToString() == "SuperAdmin")
            {
                btnSave.Visible        = true;
                btnProductSave.Visible = true;
                foreach (GridViewRow Row in gvTransferRequest.Rows)
                {
                    //((ImageButton)Row.FindControl("IbtnPrint")).Visible = true;
                    ((ImageButton)Row.FindControl("btnEdit")).Visible    = true;
                    ((ImageButton)Row.FindControl("IbtnDelete")).Visible = true;
                }
                foreach (GridViewRow Row in gvProductRequest.Rows)
                {
                    ((ImageButton)Row.FindControl("btnEdit")).Visible    = true;
                    ((ImageButton)Row.FindControl("IbtnDelete")).Visible = true;
                }
                imgBtnRestore.Visible   = true;
                ImgbtnSelectAll.Visible = true;
            }
            else
            {
                foreach (DataRow DtRow in dtAllPageCode.Rows)
                {
                    if (Convert.ToBoolean(DtRow["Op_Add"].ToString()))
                    {
                        btnSave.Visible        = true;
                        btnProductSave.Visible = true;
                    }
                    foreach (GridViewRow Row in gvTransferRequest.Rows)
                    {
                        if (Convert.ToBoolean(DtRow["Op_Edit"].ToString()))
                        {
                            ((ImageButton)Row.FindControl("btnEdit")).Visible = true;
                        }
                        if (Convert.ToBoolean(DtRow["Op_Delete"].ToString()))
                        {
                            ((ImageButton)Row.FindControl("IbtnDelete")).Visible = true;
                        }
                    }
                    foreach (GridViewRow Row in gvProductRequest.Rows)
                    {
                        if (Convert.ToBoolean(DtRow["Op_Edit"].ToString()))
                        {
                            ((ImageButton)Row.FindControl("btnEdit")).Visible = true;
                        }
                        if (Convert.ToBoolean(DtRow["Op_Delete"].ToString()))
                        {
                            ((ImageButton)Row.FindControl("IbtnDelete")).Visible = true;
                        }
                    }
                    if (Convert.ToBoolean(DtRow["Op_Restore"].ToString()))
                    {
                        imgBtnRestore.Visible   = true;
                        ImgbtnSelectAll.Visible = true;
                    }
                    if (Convert.ToBoolean(DtRow["Op_View"].ToString()))
                    {
                    }
                    foreach (GridViewRow Row in gvProductRequest.Rows)
                    {
                        if (Convert.ToBoolean(DtRow["Op_Print"].ToString()))
                        {
                            ((ImageButton)Row.FindControl("IbtnPrint")).Visible = true;
                        }
                    }

                    if (Convert.ToBoolean(DtRow["Op_Download"].ToString()))
                    {
                    }
                    if (Convert.ToBoolean(DtRow["Op_Upload"].ToString()))
                    {
                    }
                }
            }
        }
    }