Exemplo n.º 1
0
    protected void tferorRegNoTextBox_TextChanged(object sender, EventArgs e)
    {
        UnitHolderRegistration unitRegObj = new UnitHolderRegistration();

        unitRegObj.FundCode   = tferorFundCodeTextBox.Text.Trim();
        unitRegObj.BranchCode = tferorBranchCodeTextBox.Text.Trim();
        unitRegObj.RegNumber  = tferorRegNoTextBox.Text.Trim();


        DataTable dtRegInfo            = opendMFDAO.getDtRegInfo(unitRegObj);
        DataTable dtTotalSaleUnitCerts = opendMFDAO.getDtTotalSaleUnitCerts(unitRegObj);
        decimal   TotalUnitsBalance    = opendMFDAO.getTotalSaleUnitBalance(unitRegObj);

        if (dtRegInfo.Rows.Count > 0)
        {
            tferorHolderNameTextBox.Text  = dtRegInfo.Rows[0]["HNAME"].Equals(DBNull.Value) ? "" : dtRegInfo.Rows[0]["HNAME"].ToString();
            tferorjHolderNameTextBox.Text = dtRegInfo.Rows[0]["JNT_NAME"].Equals(DBNull.Value) ? "" : dtRegInfo.Rows[0]["JNT_NAME"].ToString();

            string[] branchCodeSign    = unitRegObj.BranchCode.Split('/');
            string   imageSignLocation = Path.Combine(ConfigReader.SingLocation + "\\" + unitRegObj.FundCode, unitRegObj.FundCode + "_" + branchCodeSign[0] + "_" + branchCodeSign[1] + "_" + unitRegObj.RegNumber + ".jpg");

            if (File.Exists(Path.Combine(ConfigReader.SingLocation + "\\" + unitRegObj.FundCode, unitRegObj.FundCode.ToString() + "_" + branchCodeSign[0] + "_" + branchCodeSign[1] + "_" + unitRegObj.RegNumber + ".jpg")))
            {
                SignImage.ImageUrl = encrypt.PhotoBase64ImgSrc(imageSignLocation.ToString());
            }
            else
            {
                SignImage.ImageUrl = encrypt.PhotoBase64ImgSrc(Path.Combine(ConfigReader.SingLocation, "Notavailable.JPG").ToString());
            }
            if (dtTotalSaleUnitCerts.Rows.Count > 0)
            {
                TotalLienUnitHoldingTextBox.Text = unitLienBLObj.totalLienAmount(unitRegObj).ToString();
                dvContentBottom.Visible          = true;
                leftDataGrid.DataSource          = dtTotalSaleUnitCerts;
                leftDataGrid.DataBind();
                transferNoTextBox.Text       = unitTransferBLObj.getNextTransferNo(unitRegObj, userObj).ToString();
                TotalUnitHoldingTextBox.Text = TotalUnitsBalance.ToString();
            }
            else
            {
                TotalUnitHoldingTextBox.Text     = "";
                TotalUnitRepurchaseTextBox.Text  = "";
                TotalLienUnitHoldingTextBox.Text = unitLienBLObj.totalLienAmount(unitRegObj).ToString();
                dvContentBottom.Visible          = false;
                transferNoTextBox.Text           = unitTransferBLObj.getNextTransferNo(unitRegObj, userObj).ToString();
                TotalUnitHoldingTextBox.Text     = TotalUnitsBalance.ToString();
                ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "Popup", "alert ('No Units To Transfer');", true);
            }
        }
        else
        {
            TotalUnitHoldingTextBox.Text     = "";
            TotalUnitRepurchaseTextBox.Text  = "";
            TotalLienUnitHoldingTextBox.Text = "";
            tferorHolderNameTextBox.Text     = "";
            tferorjHolderNameTextBox.Text    = "";
            dvContentBottom.Visible          = false;
            ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "Popup", "alert ('Invalid Registration Number');", true);
        }
    }
Exemplo n.º 2
0
    protected void RegNoTextBox_TextChanged(object sender, EventArgs e)
    {
        UnitHolderRegistration unitRegObj = new UnitHolderRegistration();

        unitRegObj.FundCode   = FundCodeTextBox.Text.Trim();
        unitRegObj.BranchCode = BranchCodeTextBox.Text.Trim();
        unitRegObj.RegNumber  = RegNoTextBox.Text.Trim();
        UnitRepurchase unitRepObj = new UnitRepurchase();

        if (opendMFDAO.IsValidRegistration(unitRegObj))
        {
            DataTable dtRegInfo            = opendMFDAO.getDtRegInfo(unitRegObj);
            DataTable dtTotalSaleUnitCerts = opendMFDAO.getDtTotalSaleUnitCerts(unitRegObj);
            decimal   TotalUnitsBalance    = opendMFDAO.getTotalSaleUnitBalance(unitRegObj);
            if (dtRegInfo.Rows.Count > 0)
            {
                HolderNameTextBox.Text = dtRegInfo.Rows[0]["HNAME"].Equals(DBNull.Value) ? "" : dtRegInfo.Rows[0]["HNAME"].ToString();

                HolderJNameTextBox.Text = dtRegInfo.Rows[0]["JNT_NAME"].Equals(DBNull.Value) ? "" : dtRegInfo.Rows[0]["JNT_NAME"].ToString();

                string[] BranchCodeSign     = unitRegObj.BranchCode.Split('/');
                string   imageSignLocation  = Path.Combine(ConfigReader.SingLocation + "\\" + unitRegObj.FundCode, unitRegObj.FundCode + "_" + BranchCodeSign[0] + "_" + BranchCodeSign[1] + "_" + unitRegObj.RegNumber + ".jpg");//"../../Image/IAMCL/Sign/"+ fundCode + "_" + branchCode + "_" + regNo + ".jpg";
                string   imagePhotoLocation = Path.Combine(ConfigReader.PhotoLocation + "\\" + unitRegObj.FundCode, unitRegObj.FundCode + "_" + "_" + BranchCodeSign[0] + BranchCodeSign[1] + "_" + unitRegObj.RegNumber + ".jpg");

                if (File.Exists(Path.Combine(ConfigReader.SingLocation + "\\" + unitRegObj.FundCode, unitRegObj.FundCode + "_" + BranchCodeSign[0] + "_" + BranchCodeSign[1] + "_" + unitRegObj.RegNumber + ".jpg")))
                {
                    SignImage.ImageUrl = encrypt.PhotoBase64ImgSrc(imageSignLocation.ToString());
                }
                else
                {
                    SignImage.ImageUrl = encrypt.PhotoBase64ImgSrc(Path.Combine(ConfigReader.SingLocation, "Notavailable.JPG").ToString());
                }
                if (dtTotalSaleUnitCerts.Rows.Count > 0)
                {
                    dvContentBottom.Visible = true;
                    leftDataGrid.DataSource = dtTotalSaleUnitCerts;
                    leftDataGrid.DataBind();
                    TotalUnitHoldingTextBox.Text     = TotalUnitsBalance.ToString();
                    TotalLienUnitHoldingTextBox.Text = unitLienBLObj.totalLienAmount(unitRegObj).ToString();
                    TotalUnitRepurchaseTextBox.Text  = "";
                }
                else
                {
                    TotalUnitHoldingTextBox.Text     = "";
                    TotalUnitRepurchaseTextBox.Text  = "";
                    TotalLienUnitHoldingTextBox.Text = unitLienBLObj.totalLienAmount(unitRegObj).ToString();
                    dvContentBottom.Visible          = false;
                    //NormalRadioButton.Checked = true;
                    //DeathRadioButton.Checked = false;
                    ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "Popup", "alert ('No Units To Repurchase');", true);
                }

                RepNoTextBox.Text       = unitRepBLObj.getNextRepurchaseNo(unitRegObj, userObj).ToString();
                unitRepObj.RepurchaseNo = unitRepBLObj.getNextRepurchaseNo(unitRegObj, userObj) - 1;
                RepDateTextBox.Text     = unitRepBLObj.getLastRepDate(unitRegObj, unitRepObj).ToString("dd-MMM-yyyy");
                RepRateTextBox.Text     = unitRepBLObj.getLastRepRate(unitRegObj, unitRepObj).ToString();
            }
            else
            {
                TotalUnitHoldingTextBox.Text     = "";
                TotalUnitRepurchaseTextBox.Text  = "";
                TotalLienUnitHoldingTextBox.Text = "";
                dvContentBottom.Visible          = false;
                //NormalRadioButton.Checked = true;
                //DeathRadioButton.Checked = false;
                ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "Popup", "alert ('No Units To Repurchase');", true);
            }
        }
        else
        {
            ClearText();
            TotalUnitHoldingTextBox.Text     = "";
            TotalUnitRepurchaseTextBox.Text  = "";
            TotalLienUnitHoldingTextBox.Text = "";
            dvContentBottom.Visible          = false;
            //NormalRadioButton.Checked = true;
            //DeathRadioButton.Checked = false;
            ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "Popup", "alert ('Invalid Registration Number');", true);
        }
    }
Exemplo n.º 3
0
    protected void moneyReceipDropDownList_SelectedIndexChanged(object sender, EventArgs e)
    {
        DataTable dtMoneyReceitInfoDetails = unitSaleBLObj.dtMoneyRecieptInfoDetails(Convert.ToInt64(moneyReceipDropDownList.SelectedValue.ToString()));

        if (dtMoneyReceitInfoDetails.Rows.Count > 0)
        {
            regObj.FundCode     = FundCodeTextBox.Text.ToString();
            regObj.BranchCode   = BranchCodeTextBox.Text.ToString();
            regObj.RegNumber    = dtMoneyReceitInfoDetails.Rows[0]["REG_NO"].ToString();
            RegNoTextBox.Text   = dtMoneyReceitInfoDetails.Rows[0]["REG_NO"].ToString();
            QtyTextBox.Text     = dtMoneyReceitInfoDetails.Rows[0]["UNIT_QTY"].ToString();
            RepDateTextBox.Text = Convert.ToDateTime(dtMoneyReceitInfoDetails.Rows[0]["RECEIPT_DATE"].ToString()).ToString("dd-MMM-yyyy");
            RepRateTextBox.Text = dtMoneyReceitInfoDetails.Rows[0]["RATE"].ToString();
            if (!dtMoneyReceitInfoDetails.Rows[0]["REP_PAY_TYPE"].Equals(DBNull.Value))
            {
                payTypeLabel.Text = dtMoneyReceitInfoDetails.Rows[0]["REP_PAY_TYPE"].ToString().ToUpper();
            }
            DataTable dtRegInfo            = opendMFDAO.getDtRegInfo(regObj);
            DataTable dtTotalSaleUnitCerts = opendMFDAO.getDtTotalSaleUnitCerts(regObj);
            decimal   TotalUnitsBalance    = opendMFDAO.getTotalSaleUnitBalance(regObj);

            if (dtRegInfo.Rows.Count > 0)
            {
                HolderNameTextBox.Text  = dtRegInfo.Rows[0]["HNAME"].Equals(DBNull.Value) ? "" : dtRegInfo.Rows[0]["HNAME"].ToString();
                HolderJNameTextBox.Text = dtRegInfo.Rows[0]["JNT_NAME"].Equals(DBNull.Value) ? "" : dtRegInfo.Rows[0]["JNT_NAME"].ToString();
                string[] BranchCodeSign     = regObj.BranchCode.Split('/');
                string   imageSignLocation  = Path.Combine(ConfigReader.SingLocation + "\\" + regObj.FundCode, regObj.FundCode + "_" + BranchCodeSign[0] + "_" + BranchCodeSign[1] + "_" + regObj.RegNumber + ".jpg");//"../../Image/IAMCL/Sign/"+ fundCode + "_" + branchCode + "_" + regNo + ".jpg";
                string   imagePhotoLocation = Path.Combine(ConfigReader.PhotoLocation + "\\" + regObj.FundCode, regObj.FundCode + "_" + "_" + BranchCodeSign[0] + BranchCodeSign[1] + "_" + regObj.RegNumber + ".jpg");

                if (File.Exists(Path.Combine(ConfigReader.SingLocation + "\\" + regObj.FundCode, regObj.FundCode + "_" + BranchCodeSign[0] + "_" + BranchCodeSign[1] + "_" + regObj.RegNumber + ".jpg")))
                {
                    SignImage.ImageUrl = encrypt.PhotoBase64ImgSrc(imageSignLocation.ToString());
                }
                else
                {
                    SignImage.ImageUrl = encrypt.PhotoBase64ImgSrc(Path.Combine(ConfigReader.SingLocation, "Notavailable.JPG").ToString());
                }
                if (dtTotalSaleUnitCerts.Rows.Count > 0)
                {
                    dvContentBottom.Visible = true;
                    leftDataGrid.DataSource = dtTotalSaleUnitCerts;
                    leftDataGrid.DataBind();
                    TotalUnitHoldingTextBox.Text     = TotalUnitsBalance.ToString();
                    TotalLienUnitHoldingTextBox.Text = unitLienBLObj.totalLienAmount(regObj).ToString();
                }
                else
                {
                    TotalUnitHoldingTextBox.Text     = "";
                    TotalUnitRepurchaseTextBox.Text  = "";
                    TotalLienUnitHoldingTextBox.Text = unitLienBLObj.totalLienAmount(regObj).ToString();
                    dvContentBottom.Visible          = false;
                    ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "Popup", "alert ('No Units To Repurchase');", true);
                }
            }
            else
            {
                ClearText();
                TotalUnitHoldingTextBox.Text     = "";
                TotalUnitRepurchaseTextBox.Text  = "";
                TotalLienUnitHoldingTextBox.Text = "";
                dvContentBottom.Visible          = false;
                ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "Popup", "alert ('No Units To Repurchase');", true);
            }
        }
        else
        {
            ClearText();
            TotalUnitHoldingTextBox.Text     = "";
            TotalUnitRepurchaseTextBox.Text  = "";
            TotalLienUnitHoldingTextBox.Text = "";
            dvContentBottom.Visible          = false;
            ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "Popup", "alert ('No Data Found');", true);
        }
    }
    public void displayRegInfo()
    {
        UnitHolderRegistration unitRegObj = new UnitHolderRegistration();

        unitRegObj.FundCode   = fundCodeTextBox.Text.Trim();
        unitRegObj.BranchCode = branchCodeTextBox.Text.Trim();
        unitRegObj.RegNumber  = regNoTextBox.Text.Trim();

        if (opendMFDAO.IsValidRegistration(unitRegObj))
        {
            DataTable dtRegInfo            = opendMFDAO.getDtRegInfo(unitRegObj);
            DataTable dtTotalSaleUnitCerts = opendMFDAO.getDtTotalSaleUnitCerts(unitRegObj);
            decimal   TotalUnitsBalance    = opendMFDAO.getTotalSaleUnitBalance(unitRegObj);
            if (dtRegInfo.Rows.Count > 0)
            {
                holderNameTextBox.Text     = dtRegInfo.Rows[0]["HNAME"].Equals(DBNull.Value) ? "" : dtRegInfo.Rows[0]["HNAME"].ToString();
                jHolderTextBox.Text        = dtRegInfo.Rows[0]["JNT_NAME"].Equals(DBNull.Value) ? "" : dtRegInfo.Rows[0]["JNT_NAME"].ToString();
                holderAddress1TextBox.Text = dtRegInfo.Rows[0]["ADDRS1"].Equals(DBNull.Value) ? "" : dtRegInfo.Rows[0]["ADDRS1"].ToString();
                holderAddress2TextBox.Text = dtRegInfo.Rows[0]["ADDRS2"].Equals(DBNull.Value) ? "" : dtRegInfo.Rows[0]["ADDRS2"].ToString();
                holderTelphoneTextBox.Text = dtRegInfo.Rows[0]["TEL_NO"].Equals(DBNull.Value) ? "" : dtRegInfo.Rows[0]["TEL_NO"].ToString();
                string CIP = dtRegInfo.Rows[0]["CIP"].Equals(DBNull.Value) ? "" : dtRegInfo.Rows[0]["CIP"].ToString();
                if (string.Compare(CIP, "Y", true) == 0)
                {
                    tdCIP.InnerHtml = "YES";
                }
                else if (string.Compare(CIP, "N", true) == 0)
                {
                    tdCIP.InnerHtml = "NO";
                }

                displaySign();

                if (dtTotalSaleUnitCerts.Rows.Count > 0)
                {
                    renewalUnitsTextBox.Text = "";
                    leftDataGrid.Visible     = true;
                    dvContentBottom.Visible  = true;
                    dinoGridView.Visible     = false;
                    leftDataGrid.DataSource  = dtTotalSaleUnitCerts;
                    leftDataGrid.DataBind();
                    totalUnitsTextBox.Text = TotalUnitsBalance.ToString();
                }
                else
                {
                    dinoGridView.DataSource = opendMFDAO.getTableDinomination();
                    dinoGridView.DataBind();
                    dinoGridView.Visible     = false;
                    leftDataGrid.Visible     = false;
                    totalUnitsTextBox.Text   = "";
                    renewalUnitsTextBox.Text = "";
                    ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "Popup", "alert ('No Units To Renewal');", true);
                }

                renewalNumberTextBox.Text = renewalBLObj.getNextRenNo(unitRegObj, userObj).ToString();

                // saleObj.SaleNo = unitSaleBLObj.getNextSaleNo(unitRegObj, userObj) - 1;
                // renewalDateTextBox.Text = opendMFDAO.getLastSaleDate(unitRegObj, saleObj).ToString("dd-MMM-yyyy");
                // saleRateTextBox.Text = opendMFDAO.getLastSaleRate(unitRegObj, saleObj).ToString();
                // saleTypeDropDownList.SelectedValue = unitSaleBLObj.GetNextSaleType(unitRegObj, userObj).ToString();
            }
            else
            {
                SignImage.ImageUrl      = Path.Combine(ConfigReader.SingLocation, "Notavailable.JPG").ToString();
                tdCIP.InnerHtml         = "";
                leftDataGrid.Visible    = false;
                dvContentBottom.Visible = false;
                //  PhotoImage.ImageUrl = Path.Combine(ConfigReader.PhotoLocation, "Notavailable.JPG").ToString();
                ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "Popup", " window.fnResetAll();", true);
            }
        }
        else
        {
            totalUnitsTextBox.Text   = "";
            renewalUnitsTextBox.Text = "";
            dvContentBottom.Visible  = false;
            leftDataGrid.Visible     = false;
            ClearText();
            SignImage.ImageUrl = Path.Combine(ConfigReader.SingLocation, "Notavailable.JPG").ToString();
            ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "Popup", "alert ('Invalid Registration Number');", true);
        }
    }