Exemple #1
0
        //protected void VerifyDayConfirmtion()
        //{
        //    try
        //    {
        //        CtrlProcDoneFlag.Text = "0";

        //        string qry1 = "SELECT ProcStatus FROM A2ZERPBRANCH WHERE ProcStatus = 0";
        //        DataTable dt1 = DataAccessLayer.BLL.CommonManager.Instance.GetDataTableByQuery(qry1, "A2ZHKGMS");
        //        if (dt1.Rows.Count > 0)
        //        {
        //            CtrlProcDoneFlag.Text = "1";
        //            ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Process Done Confirmation Not Done');", true);
        //            return;
        //        }

        //    }
        //    catch (Exception ex)
        //    {
        //        Page.ClientScript.RegisterStartupScript(this.GetType(), "scriptkey", "<script>alert('System Error.CheckUnPostTransaction Problem');</script>");
        //        //throw ex;
        //    }
        //}

        protected void btnExit_Click(object sender, EventArgs e)
        {
            A2ZCSPARAMETERDTO.UpdateSingleUserFlag(0);
            if (CtrlProcFlag.Text == "0" || CtrlProcFlag.Text == "")
            {
                Response.Redirect("A2ZERPModule.aspx");
            }
            else
            {
                Response.Redirect("A2ZLogin.aspx");
            }
        }
Exemple #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!IsPostBack)
                {
                    int userPermission = Converter.GetInteger(SessionStore.GetValue(Params.SYS_USER_PERMISSION));

                    hdnID.Text = DataAccessLayer.Utility.Converter.GetString(SessionStore.GetValue(Params.SYS_USER_ID));

                    //if (userPermission != 30)
                    //{
                    //    string notifyMsg = "?txtOne=" + Converter.GetString(SessionStore.GetValue(Params.SYS_USER_NAME)) + "&txtTwo=" + "You Don't Have Permission for Approve" +
                    //                       "&txtThree=" + "Contact Your Super User" + "&PreviousMenu=A2ZERPModule.aspx";
                    //    Server.Transfer("Notify.aspx" + notifyMsg);
                    //}

                    int checkAllUser = DataAccessLayer.DTO.A2ZSYSIDSDTO.CountForSingleUserPurpose(Converter.GetSmallInteger(SessionStore.GetValue(Params.SYS_USER_ID)), "A2ZACGMS");

                    if (checkAllUser > 0)
                    {
                        string strQuery = "SELECT IdsNo, IdsName, EmpCode, IdsFlag, IdsLogInFlag FROM A2ZSYSIDS WHERE IdsLogInFlag <> 0";
                        gvUserInfo = DataAccessLayer.BLL.CommonManager.Instance.FillGridViewList(strQuery, gvUserInfo, "A2ZACGMS");

                        //btnProcess.BackColor = Color.Black;
                        btnProcess.Enabled = false;


                        //string msg = "Can not Process Period End - System Not In Single User";

                        //String csname1 = "PopupScript";
                        //Type cstype = GetType();
                        //ClientScriptManager cs = Page.ClientScript;

                        //if (!cs.IsStartupScriptRegistered(cstype, csname1))
                        //{
                        //    String cstext1 = "alert('" + msg + "');";
                        //    cs.RegisterStartupScript(cstype, csname1, cstext1, true);
                        //}
                        ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Can not Process Period End - System Not In Single User');", true);
                        return;
                    }


                    //string strQry = "SELECT BranchNo, BranchName, ProcStatusDesc, ProcStatusDate, UserId FROM A2ZERPBRANCH";
                    //gvBranchInfo = DataAccessLayer.BLL.CommonManager.Instance.FillGridViewList(strQry, gvBranchInfo, "A2ZHKCUBS");

                    var      dt          = A2ZCSPARAMETERDTO.GetParameterValue();
                    DateTime processDate = dt.ProcessDate;
                    string   date1       = processDate.ToString("dd/MM/yyyy");
                    lblProcDate.Text = date1;

                    lblNewYear.Text = Converter.GetString(dt.CurrentYear);

                    txtDayEnd.Focus();


                    txtToDaysDate.Text = Converter.GetString(String.Format("{0:D}", processDate));


                    A2ZERPSYSPRMDTO dto = A2ZERPSYSPRMDTO.GetParameterValue();
                    hdndatapath.Text = Converter.GetString(dto.PrmDataPath);

                    lblEndOfMonth.Visible = false;
                    //lblYearEnd.Visible = false;

                    lblYearClose.Text = "0";

                    int lastDay = DateTime.DaysInMonth(processDate.Year, processDate.Month);

                    if (processDate.Day == lastDay)
                    {
                        lblEndOfMonth.Visible = true;

                        if (dt.ProcessDate.Month == 12)
                        {
                            lblYearEnd.Visible = true;
                        }
                        if (dt.ProcessDate.Month == 6)
                        {
                            lblYearClose.Text = "1";
                        }
                    }

                    A2ZCSPARAMETERDTO.UpdateSingleUserFlag(1);
                }
            }
            catch (Exception ex)
            {
                Page.ClientScript.RegisterStartupScript(this.GetType(), "scriptkey", "<script>alert('System Error.Page_Load Problem');</script>");
                //throw ex;
            }
        }
Exemple #3
0
 protected void btnExit_Click(object sender, EventArgs e)
 {
     A2ZCSPARAMETERDTO.UpdateSingleUserFlag(0);
     Response.Redirect("A2ZERPModule.aspx");
 }
Exemple #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!IsPostBack)
                {
                    int userPermission = Converter.GetInteger(SessionStore.GetValue(Params.SYS_USER_PERMISSION));

                    //if (userPermission != 30)
                    //{
                    //    string notifyMsg = "?txtOne=" + Converter.GetString(SessionStore.GetValue(Params.SYS_USER_NAME)) + "&txtTwo=" + "You Don't Have Permission for Approve" +
                    //                       "&txtThree=" + "Contact Your Super User" + "&PreviousMenu=A2ZERPModule.aspx";
                    //    Server.Transfer("Notify.aspx" + notifyMsg);
                    //}

                    int checkAllUser = DataAccessLayer.DTO.A2ZSYSIDSDTO.CountForSingleUserPurpose(Converter.GetSmallInteger(SessionStore.GetValue(Params.SYS_USER_ID)), "A2ZCSMCUS");

                    if (checkAllUser > 0)
                    {
                        string strQuery = "SELECT IdsNo, IdsName, EmpCode, IdsFlag, IdsLogInFlag FROM A2ZSYSIDS WHERE IdsLogInFlag <> 0";
                        gvUserInfo = DataAccessLayer.BLL.CommonManager.Instance.FillGridViewList(strQuery, gvUserInfo, "A2ZCSMCUS");

                        //btnProcess.BackColor = Color.Black;
                        btnProcess.Enabled = false;

                        //string msg = "Can not Process Period End - No. of " + checkAllUser + " User is Using System";
                        string msg = "Can not Process Period End - System Not In Single User";

                        String csname1         = "PopupScript";
                        Type   cstype          = GetType();
                        ClientScriptManager cs = Page.ClientScript;

                        if (!cs.IsStartupScriptRegistered(cstype, csname1))
                        {
                            String cstext1 = "alert('" + msg + "');";
                            cs.RegisterStartupScript(cstype, csname1, cstext1, true);
                        }
                    }


                    var      dt          = A2ZCSPARAMETERDTO.GetParameterValue();
                    DateTime processDate = dt.ProcessDate;

                    txtToDaysDate.Text = Converter.GetString(String.Format("{0:D}", processDate));

                    lblEndOfMonth.Visible = false;
                    //lblYearEnd.Visible = false;

                    int lastDay = DateTime.DaysInMonth(processDate.Year, processDate.Month);

                    if (processDate.Day == lastDay)
                    {
                        lblEndOfMonth.Visible = true;

                        //if (dt.ProcessDate.Month == 6)
                        //{
                        //    lblYearEnd.Visible = true;
                        //}
                    }

                    A2ZCSPARAMETERDTO.UpdateSingleUserFlag(1);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }