示例#1
0
        protected void TrnLimitValidity()
        {
            try
            {
                double         TotalAmt = Converter.GetDouble(txtTrnAmount.Text);
                int            Ids      = Converter.GetInteger(hdnUserId.Text);
                A2ZTRNLIMITDTO getDTO   = (A2ZTRNLIMITDTO.GetInformation(Ids));

                CtrlProcStat.Text = "0";

                if (getDTO.IdsNo > 0)
                {
                    if (TotalAmt > getDTO.LIdsTrfDebit)
                    {
                        CtrlProcStat.Text = "1";
                    }
                    else
                    {
                        CtrlProcStat.Text = "0";
                    }
                }
            }

            catch (Exception ex)
            {
                Page.ClientScript.RegisterStartupScript(this.GetType(), "scriptkey", "<script>alert('System Error.TrnLimitValidity Problem');</script>");
                //throw ex;
            }
        }
示例#2
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;
            }
        }
示例#3
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;
            }
        }
        protected void BtnSelect_Click(object sender, EventArgs e)
        {
            try
            {
                Button      b          = (Button)sender;
                GridViewRow r          = (GridViewRow)b.NamingContainer;
                Label       voucher    = (Label)gvCUInfo.Rows[r.RowIndex].Cells[1].FindControl("lblVoucherNo");
                Label       lblTrnDesc = (Label)gvCUInfo.Rows[r.RowIndex].Cells[2].FindControl("TrnDesc");
                Label       TrnAmount  = (Label)gvCUInfo.Rows[r.RowIndex].Cells[3].FindControl("Amount");
                lblTrnAmount.Text = Converter.GetString(TrnAmount.Text);

                string VNo = Converter.GetString(voucher.Text);

                double         TotalAmt = Converter.GetDouble(lblTrnAmount.Text);
                int            Ids      = Converter.GetInteger(hdnID.Text);
                A2ZTRNLIMITDTO getDTO   = (A2ZTRNLIMITDTO.GetInformation(Ids));

                if (getDTO.IdsNo > 0)
                {
                    if (TotalAmt > getDTO.LIdsCashCredit)
                    {
                        OverAccessLimitMSG();
                        return;
                    }



                    if (TotalAmt > getDTO.LIdsCashDebit)
                    {
                        OverAccessLimitMSG();
                        return;
                    }
                }

                Session["VouNo"]  = VNo;
                Session["Module"] = CtrlModule.Text;



                if (CtrlModule.Text == "2")
                {
                    gv2Info();
                }
                else
                {
                    gv6Info();
                }


                ScriptManager.RegisterStartupScript(Page, typeof(System.Web.UI.Page),
                                                    "click", @"<script>window.open('GLViewDailyTransaction.aspx','_blank');</script>", false);

                //Page.ClientScript.RegisterStartupScript(
                //this.GetType(), "OpenWindow", "window.open('GLViewDailyTransaction.aspx','_newtab');", true);
            }
            catch (Exception ex)
            {
                Page.ClientScript.RegisterStartupScript(this.GetType(), "scriptkey", "<script>alert('System Error.BtnSelect_Click Problem');</script>");
                //throw ex;
            }
        }
示例#5
0
        //protected void PerNoDropdown()
        //{
        //    string strQuery1 = "SELECT EmpCode,EmpName FROM A2ZEMPLOYEE";
        //    ddlPerNo = DataAccessLayer.BLL.CommonManager.Instance.FillDropDownList(strQuery1, ddlPerNo, "A2ZHRCUBS");


        //}
        //protected void GLCashCodeDropdown()
        //{

        //    string sqlquery = "SELECT GLAccNo,GLAccDesc from A2ZCGLMST where GLRecType = 2 and GLSubHead = 10101000";
        //    ddlGLCashCode = DataAccessLayer.BLL.CommonManager.Instance.FillDropDownList(sqlquery, ddlGLCashCode, "A2ZGLCUBS");

        //}


        protected void txtIdNo_TextChanged(object sender, EventArgs e)
        {
            try
            {
                A2ZSYSIDSDTO dto = A2ZSYSIDSDTO.GetUserInformation(Converter.GetInteger(txtIdNo.Text), "A2ZHKGMS");

                if (dto.IdsNo != 0)
                {
                    txtIdNo.Text             = Converter.GetString(dto.IdsNo);
                    ddlIdLevel.SelectedValue = Converter.GetString(dto.IdsLevel);

                    if (ddlIdLevel.SelectedValue == "40")
                    {
                        txtUserName.Text = Converter.GetString(dto.IdsName);



                        lblSODfag.Visible      = true;
                        ChkSODflag.Visible     = true;
                        lblVchPrintfag.Visible = true;
                        ChkVPrintflag.Visible  = true;
                        ChkMobileflag.Visible  = true;
                        //ChkGenAutoVch.Visible = true;
                        lblUserName.Visible = true;
                        txtUserName.Visible = true;
                    }
                    else
                    {
                        txtUserName.Text = Converter.GetString(dto.IdsName);

                        //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);
                        ChkMobileflag.Checked = Converter.GetBoolean(dto.IdsMobile);
                        //ChkGenAutoVch.Checked = Converter.GetBoolean(dto.AutoVchflag);



                        lblSODfag.Visible      = true;
                        ChkSODflag.Visible     = true;
                        lblVchPrintfag.Visible = true;
                        ChkVPrintflag.Visible  = true;
                        ChkMobileflag.Visible  = true;
                        //ChkGenAutoVch.Visible = true;

                        lblUserName.Visible = true;
                        txtUserName.Visible = true;

                        lblWriteFlag.Text = "0";

                        int            idno = Converter.GetInteger(txtIdNo.Text);
                        A2ZTRNLIMITDTO dto1 = (A2ZTRNLIMITDTO.GetInformation(idno));
                        if (dto1.IdsNo != 0)
                        {
                            lblWriteFlag.Text      = "1";
                            txtLIdsCashCredit.Text = Converter.GetString(String.Format("{0:0,0.00}", dto1.LIdsCashCredit));
                            txtLIdsCashDebit.Text  = Converter.GetString(String.Format("{0:0,0.00}", dto1.LIdsCashDebit));
                            txtLIdsTrfCredit.Text  = Converter.GetString(String.Format("{0:0,0.00}", dto1.LIdsTrfCredit));
                            txtLIdsTrfDebit.Text   = Converter.GetString(String.Format("{0:0,0.00}", dto1.LIdsTrfDebit));
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                Page.ClientScript.RegisterStartupScript(this.GetType(), "scriptkey", "<script>alert('System Error.txtIdNo_TextChanged Problem');</script>");

                //throw ex;
            }
        }
示例#6
0
        protected void TrnLimitValidity()
        {
            double TotalAmt = 0;

            CtrlProcStat.Text = "0";

            TotalAmount();

            TotalAmt = Converter.GetDouble(CtrlTotAmount.Text);

            //if (CtrlTrnMode.Text == "0" || CtrlTrnMode.Text == "1")
            //{
            lblTrnMode.Text = CtrlTrnMode.Text;
            //}

            //if (CtrlTrnMode.Text == "2")
            //{
            //    if (txtCrAmount.Text == "")
            //    {
            //        lblTrnMode.Text = "1";
            //    }
            //    else
            //    {
            //        lblTrnMode.Text = "0";
            //    }

            //}

            int            Ids    = Converter.GetInteger(hdnID.Value);
            A2ZTRNLIMITDTO getDTO = (A2ZTRNLIMITDTO.GetInformation(Ids));

            if (getDTO.IdsNo > 0)
            {
                if (lblTrnMode.Text == "0" && CtrlTrnType.Text == "1")
                {
                    if (TotalAmt > getDTO.LIdsCashCredit)
                    {
                        CtrlProcStat.Text = "1";
                    }
                    else
                    {
                        CtrlProcStat.Text = "0";
                    }
                }

                if (lblTrnMode.Text == "1" && CtrlTrnType.Text == "1")
                {
                    if (TotalAmt > getDTO.LIdsCashDebit)
                    {
                        CtrlProcStat.Text = "1";
                    }
                    else
                    {
                        CtrlProcStat.Text = "0";
                    }
                }

                if (lblTrnMode.Text == "0" && CtrlTrnType.Text == "3")
                {
                    if (TotalAmt > getDTO.LIdsTrfDebit)
                    {
                        CtrlProcStat.Text = "1";
                    }
                    else
                    {
                        CtrlProcStat.Text = "0";
                    }
                }

                if (lblTrnMode.Text == "1" && CtrlTrnType.Text == "3")
                {
                    if (TotalAmt > getDTO.LIdsTrfCredit)
                    {
                        CtrlProcStat.Text = "1";
                    }
                    else
                    {
                        CtrlProcStat.Text = "0";
                    }
                }
            }
        }
示例#7
0
        protected void TrnLimitValidity()
        {
            try
            {
                double TotalAmt = 0;
                CtrlProcStat.Text = "0";

                TotalAmount();

                TotalAmt = Converter.GetDouble(CtrlTotAmount.Text);

                if (CtrlTrnMode.Text == "0" || CtrlTrnMode.Text == "1")
                {
                    lblTrnMode.Text = CtrlTrnMode.Text;
                }

                if (CtrlTrnMode.Text == "2")
                {
                    lblTrnMode.Text = "1";
                }



                int            Ids    = Converter.GetInteger(hdnID.Value);
                A2ZTRNLIMITDTO getDTO = (A2ZTRNLIMITDTO.GetInformation(Ids));

                if (getDTO.IdsNo > 0)
                {
                    if (lblTrnMode.Text == "0" && CtrlTrnType.Text == "1")
                    {
                        if (TotalAmt > getDTO.LIdsCashCredit)
                        {
                            CtrlProcStat.Text = "1";
                        }
                        else
                        {
                            CtrlProcStat.Text = "0";
                        }
                    }

                    if (lblTrnMode.Text == "1" && CtrlTrnType.Text == "1")
                    {
                        if (TotalAmt > getDTO.LIdsCashDebit)
                        {
                            CtrlProcStat.Text = "1";
                        }
                        else
                        {
                            CtrlProcStat.Text = "0";
                        }
                    }

                    if (lblTrnMode.Text == "0" && CtrlTrnType.Text == "3")
                    {
                        if (TotalAmt > getDTO.LIdsTrfDebit)
                        {
                            CtrlProcStat.Text = "1";
                        }
                        else
                        {
                            CtrlProcStat.Text = "0";
                        }
                    }

                    if (lblTrnMode.Text == "1" && CtrlTrnType.Text == "3")
                    {
                        if (TotalAmt > getDTO.LIdsTrfCredit)
                        {
                            CtrlProcStat.Text = "1";
                        }
                        else
                        {
                            CtrlProcStat.Text = "0";
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                Page.ClientScript.RegisterStartupScript(this.GetType(), "scriptkey", "<script>alert('System Error.TrnLimitValidity Problem');</script>");
                //throw ex;
            }
        }