Beispiel #1
0
        protected void txtUserId_TextChanged(object sender, EventArgs e)
        {
            int          idno = Converter.GetInteger(txtUserId.Text);
            A2ZSYSIDSDTO dto  = new A2ZSYSIDSDTO();

            dto = A2ZSYSIDSDTO.GetUserInformation(idno, "A2ZHKMCUS");
            if (dto.IdsNo > 0)
            {
                ddlUserId.SelectedValue = Converter.GetString(dto.IdsNo);
            }
            else
            {
                IDsNotFoundMsg();
                ddlUserId.SelectedValue = "-Select-";
                txtUserId.Text          = string.Empty;
                txtUserId.Focus();
                return;
            }


            ddlUserId.SelectedValue = Converter.GetString(txtUserId.Text);

            MoveChkMark();

            Div1.Visible = true;
            FindUserCashCode();
        }
Beispiel #2
0
        protected void SODProcessFunction()
        {
            lblMsgFlag.Text = "0";

            A2ZERPSYSPRMDTO prmobj = A2ZERPSYSPRMDTO.GetParameterValue();

            if (prmobj.PrmEODStat == 0)
            {
                return;
            }
            else
            {
                A2ZSYSIDSDTO sysobj = A2ZSYSIDSDTO.GetUserInformation(Converter.GetInteger(lblID.Text), "A2ZHKWMS");

                if (sysobj.SODflag == false)
                {
                    lblMsgFlag.Text = "2";
                    //String csname1 = "PopupScript";
                    //Type cstype = GetType();
                    //ClientScriptManager cs = Page.ClientScript;

                    //if (!cs.IsStartupScriptRegistered(cstype, csname1))
                    //{
                    //    String cstext1 = "alert('Access Denied START OF DAY NOT DONE');";
                    //    cs.RegisterStartupScript(cstype, csname1, cstext1, true);
                    //}
                    return;
                }
                else
                {
                    lblMsgFlag.Text = "1";
                }
            }
        }
Beispiel #3
0
        protected void txtIdsNo_TextChanged(object sender, EventArgs e)
        {
            int          idno = Converter.GetInteger(txtIdsNo.Text);
            A2ZSYSIDSDTO dto  = new A2ZSYSIDSDTO();

            dto = A2ZSYSIDSDTO.GetUserInformation(idno, "A2ZHKOMS");
            if (dto.IdsNo > 0)
            {
                ddlIdsNo.SelectedValue = Converter.GetString(dto.IdsNo);

                string sqlquery = "SELECT ModuleNo,ModuleName from A2ZSYSMODULECTRL WHERE IDSNO = '" + ddlIdsNo.SelectedValue + "' ";
                ddlModule = DataAccessLayer.BLL.CommonManager.Instance.FillDropDownList(sqlquery, ddlModule, "A2ZHKOMS");
            }
            else
            {
                IDsNotFoundMsg();
                ddlIdsNo.SelectedValue = "-Select-";
                txtIdsNo.Text          = string.Empty;
                txtIdsNo.Focus();
                return;
            }


            ddlIdsNo.SelectedValue = Converter.GetString(txtIdsNo.Text);
        }
Beispiel #4
0
        protected void btnUpdate_Click(object sender, EventArgs e)
        {
            try
            {
                A2ZSYSIDSDTO dto = new A2ZSYSIDSDTO();
                dto.IdsNo    = Converter.GetInteger(txtIdNo.Text);
                dto.IdsLevel = Converter.GetSmallInteger(ddlIdLevel.SelectedValue);
                dto.EmpCode  = Converter.GetSmallInteger(ddlPerNo.SelectedValue);
                dto.IdsName  = Converter.GetString(lblIdsName.Text);
                //dto.IdsFlag = Converter.GetSmallInteger(ddlPermission.SelectedValue);
                dto.GLCashCode = Converter.GetInteger(txtGlCashCode.Text);

                dto.SODflag           = Converter.GetBoolean(ChkSODflag.Checked);
                dto.VPrintflag        = Converter.GetBoolean(ChkVPrintflag.Checked);
                dto.IdsCWarehouseflag = Converter.GetBoolean(ChkCWarehouse.Checked);

                int noOfRowEffected = A2ZSYSIDSDTO.Update(dto);

                if (noOfRowEffected > 0)
                {
                    //ShowMessage("Data has been Update successfully.", Color.Green);
                    ClearInformation();
                    UpdateMSG();
                }
            }
            catch (Exception ex)
            {
                Page.ClientScript.RegisterStartupScript(this.GetType(), "scriptkey", "<script>alert('System Error.btnUpdate_Click Problem');</script>");

                //throw ex;
            }
        }
Beispiel #5
0
        protected void CSFunc()
        {
            try
            {
                SessionStore.SaveToCustomStore(Params.SYS_SELECT_DBNAME, "A2ZACOMS");
                SessionStore.SaveToCustomStore(Params.SYS_SELECT_MODULE, Enums.ModuleConstant.AccountsService);//Session["LoadSelectedModule"] = "Inventory";

                hdnModule.Value = "1";
                //CheckUserId();

                int checkUser = CheckUserId();
                switch (checkUser)
                {
                    //case 3:
                    //    AbnormalMSG();
                    //    return;
                }

                A2ZSYSIDSDTO.UpdateUserCSLoginFlag(Converter.GetInteger(txtIdNo.Text), 1);

                //hdnModule.Value = "1";
                //CheckUserId();

                Login();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        protected void btnReset_Click(object sender, EventArgs e)
        {
            try
            {
                int RowEffected = 0;

                A2ZSYSIDSDTO dto = new A2ZSYSIDSDTO();

                AtoZUtility a2zUtility = new AtoZUtility();
                //string newPass = a2zUtility.GeneratePassword("XXXXXXXX", 0);
                string newPass = "******";

                dto.IdsNo = Converter.GetInteger(txtIdsNo.Text);

                dto.IdsPass = newPass;

                RowEffected = A2ZSYSIDSDTO.UpdateResetPassword(dto);

                if (RowEffected > 0)
                {
                    UpdateMSG();
                    //ShowMessage("Data has been saved successfully.", Color.Green);
                    ClearInformation();
                    txtIdsNo.Focus();
                }
            }
            catch (Exception ex)
            {
                Page.ClientScript.RegisterStartupScript(this.GetType(), "scriptkey", "<script>alert('System Error.Add Problem');</script>");
                //throw ex;
            }
        }
Beispiel #7
0
        protected void HKFunc()
        {
            try
            {
                SessionStore.SaveToCustomStore(Params.SYS_SELECT_DBNAME, "A2ZHKOMS");
                SessionStore.SaveToCustomStore(Params.SYS_SELECT_MODULE, Enums.ModuleConstant.HouseKeeping);//Session["LoadSelectedModule"] = "Inventory";

                hdnModule.Value = "2";
                //CheckUserId();

                int checkUser = CheckUserId();
                switch (checkUser)
                {
                    //case 3:
                    //    AbnormalMSG();
                    //    return;
                }

                A2ZSYSIDSDTO.UpdateUserHKLoginFlag(Converter.GetInteger(txtIdNo.Text), 1);

                //hdnModule.Value = "3";
                //CheckUserId();

                //CashCodeDropdown();
                //ddlFCashCode.SelectedValue = txtGLCashCode.Text;

                Login();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        protected void btnBooth_Click(object sender, EventArgs e)
        {
            string    qry    = "SELECT IdsNo,ModuleNo FROM A2ZSYSMODULECTRL WHERE ModuleNo=6";
            DataTable dt     = DataAccessLayer.BLL.CommonManager.Instance.GetDataTableByQuery(qry, "A2ZHKGMS");
            int       totrec = dt.Rows.Count;

            if (dt.Rows.Count > 0)
            {
                foreach (DataRow dr in dt.Rows)
                {
                    var idsno    = dr["IdsNo"].ToString();
                    var moduleno = dr["ModuleNo"].ToString();


                    int RowEffected = 0;

                    A2ZSYSIDSDTO dto = new A2ZSYSIDSDTO();

                    AtoZUtility a2zUtility = new AtoZUtility();
                    //string newPass = a2zUtility.GeneratePassword("XXXXXXXX", 0);
                    string newPass = "******";

                    dto.IdsNo = Converter.GetInteger(idsno);

                    dto.IdsPass = newPass;

                    RowEffected = A2ZSYSIDSDTO.UpdateResetPassword(dto);
                }
                ClearInformation();
                Response.Redirect("A2ZERPModule.aspx", false);
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                lblID.Text       = DataAccessLayer.Utility.Converter.GetString(SessionStore.GetValue(Params.SYS_USER_ID));
                lblCashCode.Text = DataAccessLayer.Utility.Converter.GetString(SessionStore.GetValue(Params.SYS_USER_GLCASHCODE));


                WarehouseDropdown();
                GroupDropdown();


                A2ZCSPARAMETERDTO dto  = A2ZCSPARAMETERDTO.GetParameterValue();
                DateTime          dt   = Converter.GetDateTime(dto.ProcessDate);
                string            date = dt.ToString("dd/MM/yyyy");

                int Month = dt.Month;
                int Year  = dt.Year;

                ddlPeriodMM.SelectedValue   = Converter.GetString(Month);
                ddlPeriodYYYY.SelectedValue = Converter.GetString(Year);

                hdnToDaysDate.Text = Converter.GetString(String.Format("{0:Y}", dt));


                //txtfdate.Text = Converter.GetString(date);
                //txttdate.Text = Converter.GetString(date);

                A2ZSYSIDSDTO sysobj = A2ZSYSIDSDTO.GetUserInformation(Converter.GetInteger(lblID.Text), "A2ZHKMCUS");

                if (sysobj.IdsCWarehouseflag == false)
                {
                    lblCWarehouseflag.Text = "0";
                }
                else
                {
                    lblCWarehouseflag.Text = "1";
                }


                if (lblCWarehouseflag.Text == "0")
                {
                    ddlWarehouse.Enabled       = false;
                    txtWarehouse.Enabled       = false;
                    chkWarehouse.Visible       = false;
                    chkWarehouse.Checked       = false;
                    txtWarehouse.Text          = Converter.GetString(lblCashCode.Text);
                    ddlWarehouse.SelectedValue = Converter.GetString(lblCashCode.Text);
                }
                else
                {
                    ddlWarehouse.Enabled       = false;
                    txtWarehouse.Enabled       = false;
                    chkWarehouse.Visible       = true;
                    chkWarehouse.Checked       = true;
                    txtWarehouse.Text          = string.Empty;
                    ddlWarehouse.SelectedIndex = 0;
                }
            }
        }
        protected void btnAdd_Click(object sender, EventArgs e)
        {
            try
            {
                string idName          = string.Empty;
                Int32  EmpCode         = 0;
                int    noOfRowEffected = 0;


                //if (ddlIdLevel.SelectedIndex == 4)
                //{
                //    idName = txtManagment.Text.Trim();
                //}
                //else
                //{
                idName = ddlPerNo.SelectedItem.Text;

                //}

                A2ZSYSIDSDTO dto = new A2ZSYSIDSDTO();

                dto.IdsNo = Converter.GetInteger(txtIdNo.Text);


                dto.EmpCode = Converter.GetSmallInteger(ddlPerNo.SelectedValue);
                dto.IdsName = lblIdsName.Text;


                dto.IdsLevel = Converter.GetSmallInteger(ddlIdLevel.SelectedValue);
                //dto.IdsFlag = Converter.GetSmallInteger(ddlPermission.SelectedValue);
                dto.UserId     = Converter.GetInteger(SessionStore.GetValue(Params.SYS_USER_ID));
                dto.GLCashCode = Converter.GetInteger(txtGlCashCode.Text);

                dto.SODflag           = Converter.GetBoolean(ChkSODflag.Checked);
                dto.VPrintflag        = Converter.GetBoolean(ChkVPrintflag.Checked);
                dto.IdsCWarehouseflag = Converter.GetBoolean(ChkCWarehouse.Checked);

                noOfRowEffected = A2ZSYSIDSDTO.InsertNewIdInformation(dto);

                if (noOfRowEffected > 0)
                {
                    UpdateMSG();
                    //ShowMessage("Data has been saved successfully.", Color.Green);
                    ClearInformation();
                }
                else
                {
                    NotUpdateMSG();
                    //ShowMessage("Sorry!!Data has not been saved.", Color.Red);
                }
            }

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

                //throw;
            }
        }
Beispiel #11
0
        protected void btnPasswordChange_Click(object sender, EventArgs e)
        {
            try
            {
                if (txtNewPassword.Text == string.Empty)
                {
                    txtNewPassword.Focus();
                    MSG4();
                    return;
                }


                //AtoZUtility a2zUtility = new AtoZUtility();
                //string orgPass = a2zUtility.GeneratePassword(OrgPass.Value, 1);


                AtoZUtility a2zUtility = new AtoZUtility();
                string      orgPass    = a2zUtility.GeneratePassword(lblOrgPassH.Text.Replace(" ", ""), 1);

                if (orgPass != txtOldPassword.Text)
                {
                    txtOldPassword.Focus();
                    MSG1();
                }
                else
                {
                    if (txtNewPassword.Text != this.txtConfirmPassword.Text)
                    {
                        MSG2();
                    }
                    else
                    {
                        string newPass = a2zUtility.GeneratePassword(txtNewPassword.Text, 0);

                        A2ZSYSIDSDTO idsDto = new A2ZSYSIDSDTO();

                        idsDto.IdsNo   = Converter.GetSmallInteger(txtBoothUserId.Text);
                        idsDto.IdsPass = newPass;

                        int rowEffiect = A2ZSYSIDSDTO.UpdateNewPassword(idsDto);

                        if (rowEffiect > 0)
                        {
                            MSG3();
                            txtBoothUserId.Text = string.Empty;
                            txtUserId.Text      = string.Empty;
                            txtUserId.Focus();
                            divMain.Visible       = true;
                            divChangePass.Visible = false;
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Beispiel #12
0
        protected int CheckBoothUserId()
        {
            // For Return Value of CheckUserId()
            //---------------------------------
            // 0 = Id is Available
            // 1 = ID not in Table
            // 2 = Please Change Password - New Id was created
            // 3 = Id was not Initialize - Abnormal Logout
            //---------------------------------
            // End of For Return Value of CheckUserId()

            try
            {
                A2ZSYSIDSDTO idsDto = A2ZSYSIDSDTO.GetUserInformation(Converter.GetInteger(txtBoothUserId.Text), "A2ZACWMS");

                lblhdnfldVariable.Text = idsDto.IdsName;
                lblOrgPassH.Text       = idsDto.IdsPass;

                //lblMobileFlag.Text = Converter.GetString(idsDto.IdsMobile);

                if (idsDto.IdsNo == 0)
                {
                    DisplayMsg.Text = "ID Not Found";
                    DisplayMassage();

                    txtBoothUserId.Text = string.Empty;
                    txtBoothUserId.Focus();

                    return(0);
                }

                return(0);


                //string sqlQuery = @"SELECT * FROM dbo.A2ZSYSMODULECTRL  WHERE IDSNO='" + txtBoothUserId.Text + "' AND ModuleNo = 2";

                //DataTable dt = DataAccessLayer.BLL.CommonManager.Instance.GetDataTableByQuery(sqlQuery, "A2ZHKWMS");

                //if (dt.Rows.Count > 0)
                //{
                //    lblOrgPassH.Text = idsDto.IdsPass;
                //    return 0;
                //}
                //else
                //{
                //    DisplayMsg.Text = "Invalid Id. No.";
                //    DisplayMassage();
                //    txtBoothUserId.Text = string.Empty;
                //    txtBoothUserId.Focus();

                //    return 0;
                //}
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Beispiel #13
0
        public void UserIdInitial()
        {
            int UserId = DataAccessLayer.Utility.Converter.GetInteger(SessionStore.GetValue(Params.SYS_USER_ID));

            A2ZSYSIDSDTO.UpdateUserCSLoginFlag(UserId, 0);
            A2ZSYSIDSDTO.UpdateUserGLLoginFlag(UserId, 0);
            A2ZSYSIDSDTO.UpdateUserHKLoginFlag(UserId, 0);
            A2ZSYSIDSDTO.UpdateUserHRLoginFlag(UserId, 0);
            A2ZSYSIDSDTO.UpdateUserBTLoginFlag(UserId, 0);
            //A2ZSYSIDSDTO.UpdateUserOBTLoginFlag(UserId, 0);
        }
Beispiel #14
0
        protected void btnPasswordChange_Click(object sender, EventArgs e)
        {
            try
            {
                AtoZUtility a2zUtility = new AtoZUtility();
                string      orgPass    = a2zUtility.GeneratePassword(OrgPass.Value, 1);

                if (orgPass != txtOldPassword.Text)
                {
                    MSG1();

                    //ShowMessage("Old Password did not match.", Color.Red);
                    // DivLogin.Visible = false;
                }
                else
                {
                    if (txtNewPassword.Text != this.txtConfirmPassword.Text)
                    {
                        MSG2();
                        //ShowMessage("New Password did not match.", Color.Red);
                        // DivLogin.Visible = false;
                    }
                    else
                    {
                        string newPass = a2zUtility.GeneratePassword(txtNewPassword.Text, 0);

                        A2ZSYSIDSDTO idsDto = new A2ZSYSIDSDTO();

                        idsDto.IdsNo   = Converter.GetSmallInteger(txtIdNo.Text);
                        idsDto.IdsPass = newPass;

                        int rowEffiect = A2ZSYSIDSDTO.UpdateNewPassword(idsDto);

                        if (rowEffiect > 0)
                        {
                            MSG3();
                            //ShowMessage("Data saved successfully.", Color.Green);

                            main.Visible = true;
                            Pass.Visible = false;
                        }
                    }
                }



                txtIdNo.Text = string.Empty;
                //lblWelcome.Text = string.Empty;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Beispiel #15
0
        protected void btnUpdate_Click(object sender, EventArgs e)
        {
            try
            {
                //if (txtGlCashCode.Text == string.Empty)
                //{
                //    txtGlCashCode.Focus();
                //    ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Please Input GL Cash Code');", true);
                //    return;
                //}



                A2ZSYSIDSDTO dto = new A2ZSYSIDSDTO();
                dto.IdsNo    = Converter.GetInteger(txtIdNo.Text);
                dto.IdsLevel = Converter.GetSmallInteger(ddlIdLevel.SelectedValue);
                //dto.EmpCode = Converter.GetSmallInteger(ddlPerNo.SelectedValue);
                //dto.IdsName = Converter.GetString(lblIdsName.Text);
                //dto.IdsFlag = Converter.GetSmallInteger(ddlPermission.SelectedValue);
                //dto.GLCashCode = Converter.GetInteger(txtGlCashCode.Text);



                dto.SODflag    = Converter.GetBoolean(ChkSODflag.Checked);
                dto.VPrintflag = Converter.GetBoolean(ChkVPrintflag.Checked);
                dto.IdsMobile  = Converter.GetBoolean(ChkMobileflag.Checked);

                //dto.AutoVchflag = Converter.GetBoolean(ChkGenAutoVch.Checked);

                dto.IdsName = Converter.GetString(txtUserName.Text);



                int noOfRowEffected = A2ZSYSIDSDTO.Update(dto);


                //string sqlQuery = "INSERT INTO A2ZUSERCASHCODE (IdsNo,FromCashCode,FromCashCodeDesc) VALUES ('" + txtIdNo.Text + "','" + txtGlCashCode.Text + "','" + ddlGLCashCode.SelectedItem.Text + "')";

                //string strQuery = "UPDATE A2ZUSERCASHCODE SET  FromCashCode = '" + txtGlCashCode.Text + "',FromCashCodeDesc = '" + ddlGLCashCode.SelectedItem.Text + "' WHERE IdsNo='" + txtIdNo.Text + "'";
                //int rowEffect = Converter.GetInteger(DataAccessLayer.BLL.CommonManager.Instance.ExecuteNonQuery(strQuery, "A2ZCSCUBS"));



                //ShowMessage("Data has been Update successfully.", Color.Green);
                ClearInformation();
                UpdateMSG();
            }
            catch (Exception ex)
            {
                Page.ClientScript.RegisterStartupScript(this.GetType(), "scriptkey", "<script>alert('System Error.btnUpdate_Click Problem');</script>");

                //throw ex;
            }
        }
Beispiel #16
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                lblID.Text       = DataAccessLayer.Utility.Converter.GetString(SessionStore.GetValue(Params.SYS_USER_ID));
                lblCashCode.Text = DataAccessLayer.Utility.Converter.GetString(SessionStore.GetValue(Params.SYS_USER_GLCASHCODE));

                ddlCategory.Enabled = false;
                ddlGroup.Enabled    = false;
                ddlSupplier.Enabled = false;
                ddlTrnType.Enabled  = false;
                txtVchNo.Enabled    = false;

                WarehouseDropdown();

                A2ZCSPARAMETERDTO dto  = A2ZCSPARAMETERDTO.GetParameterValue();
                DateTime          dt   = Converter.GetDateTime(dto.ProcessDate);
                string            date = dt.ToString("dd/MM/yyyy");
                txtfdate.Text = Converter.GetString(date);
                txttdate.Text = Converter.GetString(date);


                A2ZSYSIDSDTO sysobj = A2ZSYSIDSDTO.GetUserInformation(Converter.GetInteger(lblID.Text), "A2ZHKMCUS");

                if (sysobj.IdsCWarehouseflag == false)
                {
                    lblCWarehouseflag.Text = "0";
                }
                else
                {
                    lblCWarehouseflag.Text = "1";
                }


                if (lblCWarehouseflag.Text == "0")
                {
                    ddlWarehouse.Enabled       = false;
                    txtWarehouse.Enabled       = false;
                    chkWarehouse.Visible       = false;
                    chkWarehouse.Checked       = false;
                    txtWarehouse.Text          = Converter.GetString(lblCashCode.Text);
                    ddlWarehouse.SelectedValue = Converter.GetString(lblCashCode.Text);
                }
                else
                {
                    ddlWarehouse.Enabled       = false;
                    txtWarehouse.Enabled       = false;
                    chkWarehouse.Visible       = true;
                    chkWarehouse.Checked       = true;
                    txtWarehouse.Text          = string.Empty;
                    ddlWarehouse.SelectedIndex = 0;
                }
            }
        }
Beispiel #17
0
        protected void txtIdsNo_TextChanged(object sender, EventArgs e)
        {
            try
            {
                //Iniatialized();

                int          idno = Converter.GetInteger(txtIdsNo.Text);
                A2ZSYSIDSDTO dto  = new A2ZSYSIDSDTO();
                dto = A2ZSYSIDSDTO.GetUserInformation(idno, "A2ZHKMCUS");
                if (dto.IdsNo > 0)
                {
                    ddlIdsNo.SelectedValue = Converter.GetString(dto.IdsNo);
                }
                else
                {
                    IDsNotFoundMsg();
                    ddlIdsNo.SelectedValue = "-Select-";
                    txtIdsNo.Text          = string.Empty;
                    txtIdsNo.Focus();
                    return;
                }

                gvCertiDetailInfo.Visible = true;
                Iniatialized();

                ddlIdsNo.SelectedValue = Converter.GetString(txtIdsNo.Text);

                string    sqlQuery = "SELECT * FROM dbo.A2ZHRCERTCTRL  WHERE IDSNO = '" + ddlIdsNo.SelectedValue + "'";
                DataTable dt       = DataAccessLayer.BLL.CommonManager.Instance.GetDataTableByQuery(sqlQuery, "A2ZHRMCUS");

                if (dt.Rows.Count > 0)
                {
                    foreach (DataRow dr in dt.Rows)
                    {
                        var empcode = dr["EmpCode"].ToString();

                        lblEmpNo.Text = empcode;

                        ShowGridViewWithValue();
                    }
                }
                else
                {
                    //Iniatialized();
                }
            }

            catch (Exception ex)
            {
                throw ex;
            }
        }
Beispiel #18
0
        protected void txtIdsNo_TextChanged(object sender, EventArgs e)
        {
            try
            {
                if (txtIdsNo.Text != string.Empty)
                {
                    // DataTable dt = DataAccessLayer.BLL.CommonManager.Instance.GetDataTableByQuery("SELECT * FROM A2ZSYSIDS ", "");
                    int          idno = Converter.GetInteger(txtIdsNo.Text);
                    A2ZSYSIDSDTO dto  = new A2ZSYSIDSDTO();
                    dto = A2ZSYSIDSDTO.GetUserInformation(idno, "A2ZACGMS");
                    if (dto.IdsNo > 0)
                    {
                        ddlIdsNo.SelectedValue = Converter.GetString(dto.IdsNo);
                        txtLIdsCashCredit.Focus();
                    }
                    else
                    {
                        IDsNotFoundMsg();
                        ddlIdsNo.SelectedValue = "-Select-";
                        txtIdsNo.Text          = string.Empty;
                        txtIdsNo.Focus();
                    }


                    A2ZTRNLIMITDTO getDTO = (A2ZTRNLIMITDTO.GetInformation(idno));
                    if (getDTO.IdsNo > 0)
                    {
                        txtIdsNo.Text          = Converter.GetString(getDTO.IdsNo);
                        txtLIdsCashCredit.Text = Converter.GetString(String.Format("{0:0,0.00}", getDTO.LIdsCashCredit));
                        txtLIdsCashDebit.Text  = Converter.GetString(String.Format("{0:0,0.00}", getDTO.LIdsCashDebit));
                        txtLIdsTrfCredit.Text  = Converter.GetString(String.Format("{0:0,0.00}", getDTO.LIdsTrfCredit));
                        txtLIdsTrfDebit.Text   = Converter.GetString(String.Format("{0:0,0.00}", getDTO.LIdsTrfDebit));

                        ddlIdsNo.SelectedValue = Converter.GetString(getDTO.IdsNo);
                        txtLIdsCashCredit.Focus();
                        BtnSubmit.Visible = false;
                        BtnUpdate.Visible = true;
                    }
                    else
                    {
                        BtnSubmit.Visible = true;
                        BtnUpdate.Visible = false;

                        clearinfo();
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Beispiel #19
0
        protected void ddlIdsNo_SelectedIndexChanged(object sender, EventArgs e)
        {
            try
            {
                if (ddlIdsNo.SelectedValue == "-Select-")
                {
                    txtIdsNo.Text = string.Empty;
                    txtIdsNo.Focus();
                    clearinfo();
                    BtnSubmit.Visible = true;
                    BtnUpdate.Visible = false;
                    return;
                }

                if (ddlIdsNo.SelectedValue != "-Select-")
                {
                    int          idno = Converter.GetInteger(ddlIdsNo.SelectedValue);
                    A2ZSYSIDSDTO dto  = new A2ZSYSIDSDTO();
                    dto = A2ZSYSIDSDTO.GetUserInformation(idno, "A2ZACGMS");
                    if (dto.IdsNo > 0)
                    {
                        txtIdsNo.Text = Converter.GetString(dto.IdsNo);
                        txtLIdsCashCredit.Focus();
                    }



                    A2ZTRNLIMITDTO getDTO = (A2ZTRNLIMITDTO.GetInformation(idno));
                    if (getDTO.IdsNo > 0)
                    {
                        txtIdsNo.Text          = Converter.GetString(getDTO.IdsNo);
                        txtLIdsCashCredit.Text = Converter.GetString(String.Format("{0:0,0.00}", getDTO.LIdsCashCredit));
                        txtLIdsCashDebit.Text  = Converter.GetString(String.Format("{0:0,0.00}", getDTO.LIdsCashDebit));
                        txtLIdsTrfCredit.Text  = Converter.GetString(String.Format("{0:0,0.00}", getDTO.LIdsTrfCredit));
                        txtLIdsTrfDebit.Text   = Converter.GetString(String.Format("{0:0,0.00}", getDTO.LIdsTrfDebit));

                        BtnSubmit.Visible = false;
                        BtnUpdate.Visible = true;
                    }
                    else
                    {
                        BtnSubmit.Visible = true;
                        BtnUpdate.Visible = false;
                        clearinfo();
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Beispiel #20
0
        protected void btnExit_Click(object sender, EventArgs e)
        {
            if (RestoreFlag.Text == string.Empty)
            {
                Response.Redirect("A2ZHKERPMODULE.aspx");
            }
            else
            {
                A2ZSYSIDSDTO.UpdateUserHKLoginFlag(Converter.GetInteger(SessionStore.GetValue(Params.SYS_USER_ID)), 0);

                Response.Redirect("A2ZLogin.aspx");
            }
        }
Beispiel #21
0
        protected void txtIdsNo_TextChanged(object sender, EventArgs e)
        {
            try
            {
                Iniatialized();

                int          idno = Converter.GetInteger(txtIdsNo.Text);
                A2ZSYSIDSDTO dto  = new A2ZSYSIDSDTO();
                dto = A2ZSYSIDSDTO.GetUserInformation(idno, "A2ZHKMCUS");
                if (dto.IdsNo > 0)
                {
                    ddlIdsNo.SelectedValue = Converter.GetString(dto.IdsNo);
                }
                else
                {
                    IDsNotFoundMsg();
                    ddlIdsNo.SelectedValue = "-Select-";
                    txtIdsNo.Text          = string.Empty;
                    txtIdsNo.Focus();
                    return;
                }


                ddlIdsNo.SelectedValue = Converter.GetString(txtIdsNo.Text);

                string sqlQuery = "SELECT * FROM dbo.A2ZSYSMODULECTRL  WHERE IDSNO = '" + ddlIdsNo.SelectedValue + "'";

                DataTable dt = DataAccessLayer.BLL.CommonManager.Instance.GetDataTableByQuery(sqlQuery, "A2ZHKMCUS");

                if (dt.Rows.Count > 0)
                {
                    DataView view = new DataView(dt);

                    foreach (DataRowView row in view)
                    {
                        int moduleNo = Converter.GetInteger(row["ModuleNo"].ToString()) - 1;
                        //int moduleNo = Converter.GetInteger(row["ModuleNo"].ToString());
                        ((CheckBox)gvModule.Rows[moduleNo].FindControl("chkSelect")).Checked = true;
                    }
                }
                else
                {
                    Iniatialized();
                }
            }

            catch (Exception ex)
            {
                throw ex;
            }
        }
Beispiel #22
0
        protected int CheckUserId()
        {
            // For Return Value of CheckUserId()
            //---------------------------------
            // 0 = Id is Available
            // 1 = ID not in Table
            // 2 = Please Change Password - New Id was created
            // 3 = Id was not Initialize - Abnormal Logout
            //---------------------------------
            // End of For Return Value of CheckUserId()

            try
            {
                A2ZSYSIDSDTO idsDto = A2ZSYSIDSDTO.GetUserInformation(Converter.GetInteger(txtIdNo.Text), "A2ZHKOMS");

                if (idsDto.IdsNo == 0)
                {
                    String csname1         = "PopupScript";
                    Type   cstype          = GetType();
                    ClientScriptManager cs = Page.ClientScript;

                    if (!cs.IsStartupScriptRegistered(cstype, csname1))
                    {
                        String cstext1 = "alert('ID Not Found .');";
                        cs.RegisterStartupScript(cstype, csname1, cstext1, true);
                        txtIdNo.Text = string.Empty;
                    }
                    return(0);
                }

                OrgPass.Value = idsDto.IdsPass;

                if (idsDto.IdsPass == "XXXXXXXX")
                {
                    return(2);
                }

                //if (idsDto.IdsLogInFlag == 1)
                //{
                //    return 3;
                //}

                return(0);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        protected void txtUserId_TextChanged(object sender, EventArgs e)
        {
            A2ZSYSIDSDTO dto = A2ZSYSIDSDTO.GetUserInformation(Converter.GetInteger(txtUserId.Text), "A2ZHKWMS");

            if (dto.IdsNo != 0)
            {
                txtUserId.Text = string.Empty;
                txtUserId.Focus();
                ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Id Already Use');", true);
                return;
            }
            else
            {
                txtUserName.Focus();
            }
        }
Beispiel #24
0
        protected void Login()
        {
            try
            {
                string dbName = Converter.GetString(SessionStore.GetValue(Params.SYS_SELECT_DBNAME));
                if (hdnModule.Value == "1")
                {
                    A2ZSYSIDSDTO.UpdateUserCSLoginFlag(Converter.GetInteger(txtIdNo.Text), 1);
                }

                //if (hdnModule.Value == "2")
                //{
                //    A2ZSYSIDSDTO.UpdateUserGLLoginFlag(Converter.GetInteger(txtIdNo.Text), 1);
                //}

                if (hdnModule.Value == "2")
                {
                    A2ZSYSIDSDTO.UpdateUserHKLoginFlag(Converter.GetInteger(txtIdNo.Text), 1);
                }
                //if (hdnModule.Value == "3")
                //{
                //    A2ZSYSIDSDTO.UpdateUserBTLoginFlag(Converter.GetInteger(txtIdNo.Text), 1);
                //}
                //if (hdnModule.Value == "7")
                //{
                //    A2ZSYSIDSDTO.UpdateUserOBTLoginFlag(Converter.GetInteger(txtIdNo.Text), 1);
                //}
                SessionStore.SaveToCustomStore(Params.SYS_USER_ID, txtIdNo.Text);
                SessionStore.SaveToCustomStore(Params.SYS_USER_NAME, lblWelcome.Text);
                SessionStore.SaveToCustomStore(Params.SYS_USER_LEVEL, txtIdsLevel.Text);
                SessionStore.SaveToCustomStore(Params.SYS_USER_PERMISSION, txtIdsFlag.Text);
                SessionStore.SaveToCustomStore(Params.SYS_USER_EMP_CODE, txtUserEmpCode.Text);
                SessionStore.SaveToCustomStore(Params.SYS_USER_SERVER_IP, txtServerIP.Text);
                SessionStore.SaveToCustomStore(Params.SYS_USER_SERVER_NAME, txtServerName.Text);
                SessionStore.SaveToCustomStore(Params.SYS_USER_IP, txtUserIP.Text);
                SessionStore.SaveToCustomStore(Params.SYS_USER_GLCASHCODE, ddlFCashCode.SelectedValue);
                SessionStore.SaveToCustomStore(Params.SYS_USER_BRNO, txtUserBranchNo.Text);

                AddAuditInformation();

                Response.Redirect("A2ZERPModule.aspx", false);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        protected void txtIdNo_TextChanged(object sender, EventArgs e)
        {
            A2ZSYSIDSDTO dto = A2ZSYSIDSDTO.GetUserInformation(Converter.GetInteger(txtIdNo.Text), "A2ZHKMCUS");

            if (dto.IdsNo != 0)
            {
                UsedMSG();
                //ShowMessage("Id Already Use.", Color.Red);
                txtIdNo.Text = string.Empty;

                return;
            }
            else
            {
                txtPerNo.Focus();
            }
        }
        protected void btnRemovedUser_Click(object sender, EventArgs e)
        {
            int intModule = Converter.GetSmallInteger(ddlModule.SelectedValue);
            int userId    = Converter.GetInteger(ddlUserId.SelectedValue);

            if (intModule == 1)
            {
                A2ZSYSIDSDTO.UpdateUserCSLoginFlag(userId, 0);
            }
            if (intModule == 2)
            {
                A2ZSYSIDSDTO.UpdateUserHKLoginFlag(userId, 0);
            }
            //if (intModule == 3)
            //{
            //    A2ZSYSIDSDTO.UpdateUserHKLoginFlag(userId, 0);
            //}
            //if (intModule == 4)
            //{
            //    A2ZSYSIDSDTO.UpdateUserHRLoginFlag(userId, 0);
            //}
            //if (intModule == 6)
            //{
            //    A2ZSYSIDSDTO.UpdateUserBTLoginFlag(userId, 0);
            //}
            //if (intModule == 7)
            //{
            //    A2ZSYSIDSDTO.UpdateUserOBTLoginFlag(userId, 0);
            //}

            ddlModule_SelectedIndexChanged(null, null);

            txtUserId.Text = string.Empty;

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

            if (!cs.IsStartupScriptRegistered(cstype, csname1))
            {
                String cstext1 = "alert('User Intialize Done');";
                cs.RegisterStartupScript(cstype, csname1, cstext1, true);
            }
        }
Beispiel #27
0
        protected void txtUserId_TextChanged(object sender, EventArgs e)
        {
            A2ZSYSIDSDTO dto = A2ZSYSIDSDTO.GetUserInformation(Converter.GetInteger(txtUserId.Text), "A2ZHKWMS");

            if (dto.IdsNo != 0)
            {
                txtUserId.Text     = Converter.GetString(dto.IdsNo);
                txtUserName.Text   = Converter.GetString(dto.IdsName);
                ChkSODflag.Checked = Converter.GetBoolean(dto.SODflag);


                string sqlQuery = "SELECT * FROM dbo.A2ZSYSMODULECTRL  WHERE IDSNO = '" + txtUserId.Text + "'";

                DataTable dt = DataAccessLayer.BLL.CommonManager.Instance.GetDataTableByQuery(sqlQuery, "A2ZHKWMS");

                if (dt.Rows.Count > 0)
                {
                    DataView view = new DataView(dt);

                    foreach (DataRowView row in view)
                    {
                        int moduleNo = Converter.GetInteger(row["ModuleNo"].ToString());
                        if (moduleNo == 1)
                        {
                            ChkWSmoduleflag.Checked = true;
                        }

                        if (moduleNo == 2)
                        {
                            ChkHKmoduleflag.Checked = true;
                        }
                    }
                }
            }
            else
            {
                txtUserId.Text = string.Empty;
                txtUserId.Focus();
                ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Id. Not Found');", true);
                return;
            }
        }
Beispiel #28
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                A2ZSYSIDSDTO.UpdateUserCSLoginFlag(Converter.GetInteger(SessionStore.GetValue(Params.SYS_USER_ID)), 0);

                var login = Session["login"];

                Response.Redirect("A2ZLogin.aspx?value=" + login, false);

                Session.RemoveAll();


                //SessionStore.RemoveFromCustomStore(Params.SYS_USER_ID);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Beispiel #29
0
        protected void txtIdNo_TextChanged(object sender, EventArgs e)
        {
            try
            {
                A2ZSYSIDSDTO dto = A2ZSYSIDSDTO.GetUserInformation(Converter.GetInteger(txtIdNo.Text), "A2ZHKMCUS");

                if (dto.IdsNo != 0)
                {
                    txtIdNo.Text             = Converter.GetString(dto.IdsNo);
                    ddlIdLevel.SelectedValue = Converter.GetString(dto.IdsLevel);
                    lblcheckEmpCode.Text     = Converter.GetString(dto.EmpCode);
                    if (lblcheckEmpCode.Text == "0")
                    {
                        InvalidEmpCode();
                        ddlIdLevel.SelectedIndex = 0;
                        return;
                    }
                    txtPerNo.Text          = Converter.GetString(dto.EmpCode);
                    ddlPerNo.SelectedValue = Converter.GetString(dto.EmpCode);
                    //ddlPermission.SelectedValue = Converter.GetString(dto.IdsFlag);
                    txtGlCashCode.Text = Converter.GetString(dto.GLCashCode);

                    if (txtGlCashCode.Text != string.Empty && txtGlCashCode.Text != "0")
                    {
                        ddlGLCashCode.SelectedValue = Converter.GetString(dto.GLCashCode);
                    }

                    ChkSODflag.Checked    = Converter.GetBoolean(dto.SODflag);
                    ChkVPrintflag.Checked = Converter.GetBoolean(dto.VPrintflag);
                    ChkCWarehouse.Checked = Converter.GetBoolean(dto.IdsCWarehouseflag);

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

                //throw ex;
            }
        }
Beispiel #30
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                lblCashCode.Text = DataAccessLayer.Utility.Converter.GetString(SessionStore.GetValue(Params.SYS_USER_GLCASHCODE));
                lblID.Text       = DataAccessLayer.Utility.Converter.GetString(SessionStore.GetValue(Params.SYS_USER_ID));
                lblIDName.Text   = DataAccessLayer.Utility.Converter.GetString(SessionStore.GetValue(Params.SYS_USER_NAME));

                string    qry = "SELECT GLAccDesc FROM A2ZCGLMST where GLAccNo='" + lblCashCode.Text + "'";
                DataTable dt1 = DataAccessLayer.BLL.CommonManager.Instance.GetDataTableByQuery(qry, "A2ZGLMCUS");
                if (dt1.Rows.Count > 0)
                {
                    lblBoothNo.Text   = lblCashCode.Text;
                    lblBoothName.Text = Converter.GetString(dt1.Rows[0]["GLAccDesc"]);
                }



                A2ZSYSIDSDTO sysobj = A2ZSYSIDSDTO.GetUserInformation(Converter.GetInteger(lblID.Text), "A2ZHKMCUS");
                if (sysobj.VPrintflag == false)
                {
                    lblVPrintFlag.Text = "0";
                }
                else
                {
                    lblVPrintFlag.Text = "1";
                }


                GroupDropdown();
                UnitDropdown();
                SupplierDropdown();

                GLCashCodeDropdown();

                ddlWarehouse.SelectedValue = Converter.GetString(lblCashCode.Text);

                TrancateWFTRN();
            }
        }