Esempio n. 1
0
        protected void txtMemNo_TextChanged(object sender, EventArgs e)
        {
            try
            {
                if (txtMemNo.Text != string.Empty)
                {
                    A2ZMEMBERDTO getDTO = new A2ZMEMBERDTO();

                    if (chkOldSearch.Checked == true)
                    {
                        int MemNumber = Converter.GetInteger(txtMemNo.Text);
                        int CuNumber  = Converter.GetInteger(hdnCuNumber.Text);

                        getDTO = (A2ZMEMBERDTO.GetInfoOldMember(CuNumber, MemNumber));
                    }
                    else
                    {
                        Int16 CUType = Converter.GetSmallInteger(lblCuType.Text);
                        int   CUNo   = Converter.GetInteger(lblCuNo.Text);
                        int   MNo    = Converter.GetInteger(txtMemNo.Text);

                        getDTO = (A2ZMEMBERDTO.GetInformation(CUType, CUNo, MNo));
                    }



                    //Int16 CuType = Converter.GetSmallInteger(lblCuType.Text);
                    //int CNo = Converter.GetSmallInteger(lblCuNo.Text);
                    //int MemNumber = Converter.GetInteger(txtMemNo.Text);

                    //A2ZMEMBERDTO getDTO = new A2ZMEMBERDTO();

                    //getDTO = (A2ZMEMBERDTO.GetInformation(CuType, CNo, MemNumber));

                    if (getDTO.NoRecord > 0)
                    {
                        txtMemNo.Text   = Converter.GetString(getDTO.MemberNo);
                        lblMemName.Text = Converter.GetString(getDTO.MemberName);
                    }
                    else
                    {
                        txtMemNo.Text   = string.Empty;
                        lblMemName.Text = string.Empty;
                        txtMemNo.Focus();
                        InvalidMemNoMSG();
                    }
                }
            }

            catch (Exception ex)
            {
                throw ex;
            }
        }
Esempio n. 2
0
        protected void txtMemNo_TextChanged(object sender, EventArgs e)
        {
            A2ZACCOUNTDTO GetAccount = new A2ZACCOUNTDTO();

            Int16 CuType   = Converter.GetSmallInteger(lblCuType.Text);
            int   AccType  = Converter.GetInteger(ddlAcType.SelectedValue);
            int   CreditNo = Converter.GetInteger(lblCuNo.Text);
            int   MemberNo = Converter.GetInteger(txtMemNo.Text);

            GetAccount = (A2ZACCOUNTDTO.GetInfo(AccType, CuType, CreditNo, MemberNo));

            if (GetAccount.AccNo > 0 && GetAccount.AccStatus < 98)
            {
                txtAccNo.Text = Converter.GetString(GetAccount.AccNo);
            }

            else
            {
                txtAccNo.Text = string.Empty;
                txtMemNo.Text = string.Empty;
                txtMemNo.Focus();
                return;
            }


            A2ZMEMBERDTO getDTO = new A2ZMEMBERDTO();

            if (chkOldSearch.Checked == true)
            {
                int MemNumber = Converter.GetInteger(txtMemNo.Text);
                int CuNumber  = Converter.GetInteger(hdnCuNumber.Text);
                getDTO = (A2ZMEMBERDTO.GetInfoOldMember(CuNumber, MemNumber));
            }
            else
            {
                Int16 CUType = Converter.GetSmallInteger(lblCuType.Text);
                int   CUNo   = Converter.GetInteger(lblCuNo.Text);
                int   MNo    = Converter.GetInteger(txtMemNo.Text);
                getDTO = (A2ZMEMBERDTO.GetInformation(CUType, CUNo, MNo));
            }

            if (getDTO.NoRecord > 0)
            {
                lblMemName.Text = Converter.GetString(getDTO.MemberName);
                txtAmount.Focus();
            }
            else
            {
                lblMemName.Text = string.Empty;
                txtMemNo.Focus();
            }
        }
        protected void txtTrnMemNo_TextChanged(object sender, EventArgs e)
        {
            try
            {
                if (txtTrnMemNo.Text != string.Empty)
                {
                    BtnTransfer.Visible = false;

                    A2ZMEMBERDTO getDTO = new A2ZMEMBERDTO();

                    if (chkOldSearch.Checked == true)
                    {
                        int MemNumber = Converter.GetInteger(txtTrnMemNo.Text);
                        int CuNumber  = Converter.GetInteger(hdnCuNumber.Text);

                        getDTO = (A2ZMEMBERDTO.GetInfoOldMember(CuNumber, MemNumber));
                    }
                    else
                    {
                        Int16 CUType = Converter.GetSmallInteger(lblCuType.Text);
                        int   CUNo   = Converter.GetInteger(lblCuNo.Text);
                        int   MNo    = Converter.GetInteger(txtTrnMemNo.Text);

                        getDTO = (A2ZMEMBERDTO.GetInformation(CUType, CUNo, MNo));
                    }

                    if (getDTO.NoRecord > 0)
                    {
                        txtTrnMemNo.Text = Converter.GetString(getDTO.MemberNo);
                        lblMemName.Text  = Converter.GetString(getDTO.MemberName);

                        BtnTrfSearch.Visible = true;
                    }
                    else
                    {
                        InvalidMemNo();
                        BtnTrfSearch.Visible = false;
                        txtTrnMemNo.Text     = string.Empty;
                        txtTrnMemNo.Focus();
                    }
                }
            }

            catch (Exception ex)
            {
                Page.ClientScript.RegisterStartupScript(this.GetType(), "scriptkey", "<script>alert('System Error.txtTrnMemNo_TextChanged Problem');</script>");
                //throw ex;
            }
        }
Esempio n. 4
0
        protected void BtnSearch_Click(object sender, EventArgs e)
        {
            if (txtSearchCuName.Text != string.Empty)
            {
                txtSearchCuName_TextChanged(this, EventArgs.Empty);
                return;
            }

            if (txtSearchMemName.Text != string.Empty)
            {
                txtSearchMemName_TextChanged(this, EventArgs.Empty);
                return;
            }


            if (txtCreditUNo.Text != string.Empty && txtMemNo.Text == string.Empty && txtOldCuNo.Text == string.Empty)
            {
                NewMemberInfoHelp();
                return;
            }
            else if (txtOldCuNo.Text != string.Empty && txtOldMemNo.Text == string.Empty)
            {
                OldMemberInfoHelp();
                return;
            }
            else
            {
                if (lblModule.Text == "4" && txtMemNo.Text != string.Empty)
                {
                    lblCuType.Text = "0";
                    lblCuNo.Text   = "0";

                    Int16        CUType  = Converter.GetSmallInteger(lblCuType.Text);
                    int          CUNo    = Converter.GetInteger(lblCuNo.Text);
                    int          MNo     = Converter.GetInteger(txtMemNo.Text);
                    A2ZMEMBERDTO get6DTO = (A2ZMEMBERDTO.GetInformation(CUType, CUNo, MNo));
                    if (get6DTO.NoRecord > 0)
                    {
                        lblMemName.Text = Converter.GetString(get6DTO.MemberName);
                        gvGetMEMDetail();
                        gvSearchMEMInfo.Visible   = true;
                        txtSearchMemName.ReadOnly = false;
                    }
                    else
                    {
                        InvalidStaffNo();
                        txtMemNo.Text = string.Empty;
                        txtMemNo.Focus();
                        return;
                    }
                }
                else
                {
                    if (txtCreditUNo.Text != string.Empty)
                    {
                        string c = "";
                        int    a = txtCreditUNo.Text.Length;

                        string b = txtCreditUNo.Text;
                        c = b.Substring(0, 1);
                        int    re  = Converter.GetSmallInteger(c);
                        int    dd  = a - 1;
                        string d   = b.Substring(1, dd);
                        int    re1 = Converter.GetSmallInteger(d);

                        Int16 CType = Converter.GetSmallInteger(re);
                        lblCuType.Text = Converter.GetString(CType);
                        int CNo = Converter.GetSmallInteger(re1);
                        lblCuNo.Text = Converter.GetString(CNo);

                        A2ZCUNIONDTO get5DTO = (A2ZCUNIONDTO.GetInformation(CType, CNo));
                        if (get5DTO.NoRecord > 0)
                        {
                            lblCuName.Text    = Converter.GetString(get5DTO.CreditUnionName);
                            lblCuNumber.Text  = lblCuType.Text + lblCuNo.Text;
                            txtCreditUNo.Text = (lblCuType.Text + "-" + lblCuNo.Text);

                            lblCType.Text     = Converter.GetString(get5DTO.CuType);
                            lblCTypeName.Text = Converter.GetString(get5DTO.CreditUnionName);
                            lblCNo.Text       = Converter.GetString(get5DTO.CreditUnionNo);

                            if (get5DTO.CuStatus == 9)
                            {
                                if (get5DTO.CuReguCuType == 0)
                                {
                                    lblCTypeName.Text = Converter.GetString(get5DTO.CuAssoCuTypeName);
                                    lblCNo.Text       = Converter.GetString(get5DTO.CuAssoCuNo);
                                    lblCType.Text     = Converter.GetString(get5DTO.CuAssoCuType);
                                }
                                else
                                {
                                    lblCTypeName.Text = Converter.GetString(get5DTO.CuReguCuTypeName);
                                    lblCNo.Text       = Converter.GetString(get5DTO.CuReguCuNo);
                                    lblCType.Text     = Converter.GetString(get5DTO.CuReguCuType);
                                }

                                DisplayMessage();
                                txtCreditUNo.Text = string.Empty;
                                txtCreditUNo.Focus();
                                return;
                            }

                            Int16        CUType  = Converter.GetSmallInteger(lblCuType.Text);
                            int          CUNo    = Converter.GetInteger(lblCuNo.Text);
                            int          MNo     = Converter.GetInteger(txtMemNo.Text);
                            A2ZMEMBERDTO get6DTO = (A2ZMEMBERDTO.GetInformation(CUType, CUNo, MNo));
                            if (get6DTO.NoRecord > 0)
                            {
                                lblMemName.Text        = Converter.GetString(get6DTO.MemberName);
                                gvSearchCUInfo.Visible = false;

                                gvGetMEMDetail();
                                gvSearchMEMInfo.Visible   = true;
                                txtSearchMemName.ReadOnly = false;
                            }
                            else
                            {
                                InvalidMemNo();
                                txtMemNo.Text = string.Empty;
                                txtMemNo.Focus();
                                return;
                            }
                        }
                        else
                        {
                            InvalidCuNo();
                            txtCreditUNo.Text = string.Empty;
                            txtCreditUNo.Focus();
                            return;
                        }
                    }

                    if (txtOldCuNo.Text != string.Empty)
                    {
                        int CN = Converter.GetInteger(txtOldCuNo.Text);

                        hdnCuNumber.Text = Converter.GetString(CN);

                        A2ZCUNIONDTO getDTO = (A2ZCUNIONDTO.GetOldInfo(CN));

                        //A2ZCUNIONDTO getDTO = (A2ZCUNIONDTO.GetInformation(CuType, CNo));

                        if (getDTO.NoRecord > 0)
                        {
                            lblCuType.Text = Converter.GetString(getDTO.CuType);
                            lblCuNo.Text   = Converter.GetString(getDTO.CreditUnionNo);

                            lblCuNumber.Text = lblCuType.Text + lblCuNo.Text;

                            lblCuName.Text    = Converter.GetString(getDTO.CreditUnionName);
                            txtCreditUNo.Text = (lblCuType.Text + "-" + lblCuNo.Text);

                            lblCType.Text     = Converter.GetString(getDTO.CuType);
                            lblCTypeName.Text = Converter.GetString(getDTO.CreditUnionName);
                            lblCNo.Text       = Converter.GetString(getDTO.CreditUnionNo);

                            if (getDTO.CuStatus == 9)
                            {
                                if (getDTO.CuReguCuType == 0)
                                {
                                    lblCTypeName.Text = Converter.GetString(getDTO.CuAssoCuTypeName);
                                    lblCNo.Text       = Converter.GetString(getDTO.CuAssoCuNo);
                                    lblCType.Text     = Converter.GetString(getDTO.CuAssoCuType);
                                }
                                else
                                {
                                    lblCTypeName.Text = Converter.GetString(getDTO.CuReguCuTypeName);
                                    lblCNo.Text       = Converter.GetString(getDTO.CuReguCuNo);
                                    lblCType.Text     = Converter.GetString(getDTO.CuReguCuType);
                                }

                                DisplayMessage();
                                txtCreditUNo.Text = string.Empty;
                                txtCreditUNo.Focus();
                                return;
                            }



                            int          MemNumber = Converter.GetInteger(txtOldMemNo.Text);
                            int          CuNumber  = Converter.GetInteger(hdnCuNumber.Text);
                            A2ZMEMBERDTO get1DTO   = new A2ZMEMBERDTO();
                            get1DTO = (A2ZMEMBERDTO.GetInfoOldMember(CuNumber, MemNumber));

                            if (get1DTO.NoRecord > 0)
                            {
                                txtMemNo.Text          = Converter.GetString(get1DTO.MemberNo);
                                lblMemName.Text        = Converter.GetString(get1DTO.MemberName);
                                gvSearchCUInfo.Visible = false;

                                gvGetMEMDetail();
                                gvSearchMEMInfo.Visible   = true;
                                txtSearchMemName.ReadOnly = false;
                            }
                            else
                            {
                                InvalidMemNo();
                                txtMemNo.Text = string.Empty;
                                txtMemNo.Focus();
                                return;
                            }
                        }
                        else
                        {
                            InvalidCuNo();
                            txtOldCuNo.Text = string.Empty;
                            txtOldCuNo.Focus();
                            return;
                        }
                    }
                }
            }
        }
Esempio n. 5
0
        protected void BtnSearch_Click(object sender, EventArgs e)
        {
            if (lblModule.Text == "4" && txtMemNo.Text != string.Empty)
            {
                lblCuType.Text = "0";
                lblCuNo.Text   = "0";

                Int16        CUType  = Converter.GetSmallInteger(lblCuType.Text);
                int          CUNo    = Converter.GetInteger(lblCuNo.Text);
                int          MNo     = Converter.GetInteger(txtMemNo.Text);
                A2ZMEMBERDTO get6DTO = (A2ZMEMBERDTO.GetInformation(CUType, CUNo, MNo));
                if (get6DTO.NoRecord > 0)
                {
                    lblMemName.Text = Converter.GetString(get6DTO.MemberName);
                    gvDetail();
                    //MoveAccDescription();
                }
                else
                {
                    InvalidStaffNo();
                    txtMemNo.Text = string.Empty;
                    txtMemNo.Focus();
                    return;
                }
            }
            else
            {
                if (txtCreditUNo.Text != string.Empty)
                {
                    string c = "";
                    int    a = txtCreditUNo.Text.Length;

                    string b = txtCreditUNo.Text;
                    c = b.Substring(0, 1);
                    int    re  = Converter.GetSmallInteger(c);
                    int    dd  = a - 1;
                    string d   = b.Substring(1, dd);
                    int    re1 = Converter.GetSmallInteger(d);

                    Int16 CType = Converter.GetSmallInteger(re);
                    lblCuType.Text = Converter.GetString(CType);
                    int CNo = Converter.GetSmallInteger(re1);
                    lblCuNo.Text = Converter.GetString(CNo);

                    A2ZCUNIONDTO get5DTO = (A2ZCUNIONDTO.GetInformation(CType, CNo));
                    if (get5DTO.NoRecord > 0)
                    {
                        lblCuName.Text    = Converter.GetString(get5DTO.CreditUnionName);
                        lblCuNumber.Text  = lblCuType.Text + lblCuNo.Text;
                        txtCreditUNo.Text = (lblCuType.Text + "-" + lblCuNo.Text);

                        Int16        CUType  = Converter.GetSmallInteger(lblCuType.Text);
                        int          CUNo    = Converter.GetInteger(lblCuNo.Text);
                        int          MNo     = Converter.GetInteger(txtMemNo.Text);
                        A2ZMEMBERDTO get6DTO = (A2ZMEMBERDTO.GetInformation(CUType, CUNo, MNo));
                        if (get6DTO.NoRecord > 0)
                        {
                            lblMemName.Text = Converter.GetString(get6DTO.MemberName);

                            gvDetail();
                            //MoveAccDescription();
                        }
                        else
                        {
                            InvalidMemNo();
                            txtMemNo.Text = string.Empty;
                            txtMemNo.Focus();
                            return;
                        }
                    }
                    else
                    {
                        InvalidCuNo();
                        txtCreditUNo.Text = string.Empty;
                        txtCreditUNo.Focus();
                        return;
                    }
                }

                if (txtOldCuNo.Text != string.Empty)
                {
                    int CN = Converter.GetInteger(txtOldCuNo.Text);

                    hdnCuNumber.Text = Converter.GetString(CN);

                    A2ZCUNIONDTO getDTO = (A2ZCUNIONDTO.GetOldInfo(CN));

                    //A2ZCUNIONDTO getDTO = (A2ZCUNIONDTO.GetInformation(CuType, CNo));

                    if (getDTO.NoRecord > 0)
                    {
                        lblCuType.Text = Converter.GetString(getDTO.CuType);
                        lblCuNo.Text   = Converter.GetString(getDTO.CreditUnionNo);

                        lblCuName.Text    = Converter.GetString(getDTO.CreditUnionName);
                        txtCreditUNo.Text = (lblCuType.Text + "-" + lblCuNo.Text);

                        int          MemNumber = Converter.GetInteger(txtOldMemNo.Text);
                        int          CuNumber  = Converter.GetInteger(hdnCuNumber.Text);
                        A2ZMEMBERDTO get1DTO   = new A2ZMEMBERDTO();
                        get1DTO = (A2ZMEMBERDTO.GetInfoOldMember(CuNumber, MemNumber));

                        if (get1DTO.NoRecord > 0)
                        {
                            txtMemNo.Text   = Converter.GetString(get1DTO.MemberNo);
                            lblMemName.Text = Converter.GetString(get1DTO.MemberName);

                            gvDetail();
                            //MoveAccDescription();
                        }
                        else
                        {
                            InvalidMemNo();
                            txtMemNo.Text = string.Empty;
                            txtMemNo.Focus();
                            return;
                        }
                    }
                    else
                    {
                        InvalidCuNo();
                        txtOldCuNo.Text = string.Empty;
                        txtOldCuNo.Focus();
                        return;
                    }
                }
            }
        }