protected void Page_Load(object sender, EventArgs e)
    {
        if (BaseContent.IsSessionExpired())
        {
            Response.Redirect("../Default.aspx");
            return;
        }
        bcContent = (BaseClass)Session["BCContent"];

        userObj.UserID = bcContent.LoginID.ToString();
        string fundCode   = bcContent.FundCode.ToString();
        string branchCode = bcContent.BranchCode.ToString();


        if (!IsPostBack)
        {
            fundNameDropDownList.DataSource     = opendMFDAO.dtFundList();
            fundNameDropDownList.DataTextField  = "FUND_NM";
            fundNameDropDownList.DataValueField = "FUND_CD";
            fundNameDropDownList.DataBind();

            DataTable dtChequeData = unitRepBLObj.dtGetChequePaymentData(" AND A.AUDITED_BY IS  NULL");
            SurrenderListGridView.DataSource = dtChequeData;
            SurrenderListGridView.DataBind();
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        UnitHolderRegistration regObj = new UnitHolderRegistration();

        if (BaseContent.IsSessionExpired())
        {
            Response.Redirect("../Default.aspx");
            return;
        }
        bcContent = (BaseClass)Session["BCContent"];

        userObj.UserID = bcContent.LoginID.ToString();



        if (!IsPostBack)
        {
            fundNameDropDownList.DataSource     = opendMFDAO.dtFundList();
            fundNameDropDownList.DataTextField  = "FUND_NM";
            fundNameDropDownList.DataValueField = "FUND_CD";
            fundNameDropDownList.DataBind();

            refixationDateFromDropDownList.DataSource     = reportObj.dtFillFixationDate(" ");
            refixationDateFromDropDownList.DataTextField  = "NAME";
            refixationDateFromDropDownList.DataValueField = "ID";
            refixationDateFromDropDownList.SelectedValue  = "0";
            refixationDateFromDropDownList.DataBind();

            refixationDateToDropDownList.DataSource     = reportObj.dtFillFixationDate(" ");
            refixationDateToDropDownList.DataTextField  = "NAME";
            refixationDateToDropDownList.DataValueField = "ID";
            refixationDateToDropDownList.SelectedValue  = "0";
            refixationDateToDropDownList.DataBind();

            effectiveDateFromDropDownList.DataSource     = reportObj.dtFillFixationDate(" ");
            effectiveDateFromDropDownList.DataTextField  = "NAME";
            effectiveDateFromDropDownList.DataValueField = "ID";
            effectiveDateFromDropDownList.SelectedValue  = "0";
            effectiveDateFromDropDownList.DataBind();

            effectiveDateToDropDownList.DataSource     = reportObj.dtFillFixationDate(" ");
            effectiveDateToDropDownList.DataTextField  = "NAME";
            effectiveDateToDropDownList.DataValueField = "ID";
            effectiveDateToDropDownList.SelectedValue  = "0";
            effectiveDateToDropDownList.DataBind();


            DataTable dtFundInfoDetails = reportObj.dtFundInfoDetails("   ");
            DataTable dtPriceDetails    = dtPriceDetails = reportObj.dtPriceDetails(" AND FUND_CD='" + dtFundInfoDetails.Rows[0]["FUND_CD"].ToString().ToUpper() + "'  AND REFIX_DT=(SELECT MAX (REFIX_DT) FROM PRICE_REFIX WHERE FUND_CD='" + dtFundInfoDetails.Rows[0]["FUND_CD"].ToString().ToUpper() + "') ");
            for (int looper = 1; looper < dtFundInfoDetails.Rows.Count; looper++)
            {
                DataTable dtprice = reportObj.dtPriceDetails(" AND FUND_CD='" + dtFundInfoDetails.Rows[looper]["FUND_CD"].ToString().ToUpper() + "'  AND REFIX_DT=(SELECT MAX (REFIX_DT) FROM PRICE_REFIX WHERE FUND_CD='" + dtFundInfoDetails.Rows[looper]["FUND_CD"].ToString().ToUpper() + "') ");
                dtPriceDetails.Merge(dtprice);
            }
            dvGridSurrender.Visible          = true;
            SurrenderListGridView.DataSource = dtPriceDetails;
            SurrenderListGridView.DataBind();
        }
    }
    protected void findButton_Click(object sender, EventArgs e)
    {
        StringBuilder sbQuery = new StringBuilder();

        sbQuery.Append("SELECT PRICE_REFIX.*,TO_CHAR(REFIX_DT,'DD-MON-YYYY') AS REFIX_DATE,TO_CHAR(EFFECTIVE_DATE,'DD-MON-YYYY') AS EFFECTIVE_DT  FROM PRICE_REFIX WHERE 1=1 ");
        if (fundNameDropDownList.SelectedValue != "0")
        {
            sbQuery.Append(" AND FUND_CD='" + fundNameDropDownList.SelectedValue.ToString() + "'");
        }

        if (refixationDateFromDropDownList.SelectedValue != "0" && refixationDateToDropDownList.SelectedValue == "0")
        {
            sbQuery.Append("AND REFIX_DT>='" + refixationDateFromDropDownList.SelectedItem.Text.ToString() + "'");
        }
        else if (refixationDateFromDropDownList.SelectedValue == "0" && refixationDateToDropDownList.SelectedValue != "0")
        {
            sbQuery.Append("AND REFIX_DT<='" + refixationDateToDropDownList.SelectedItem.Text.ToString() + "'");
        }
        else if (refixationDateFromDropDownList.SelectedValue != "0" && refixationDateToDropDownList.SelectedValue != "0")
        {
            sbQuery.Append("AND REFIX_DT BETWEEN '" + refixationDateFromDropDownList.SelectedItem.Text.ToString() + "' AND  '" + refixationDateToDropDownList.SelectedItem.Text.ToString() + "'");
        }


        if (effectiveDateFromDropDownList.SelectedValue != "0" && effectiveDateToDropDownList.SelectedValue == "0")
        {
            sbQuery.Append("AND REFIX_DT>='" + effectiveDateFromDropDownList.SelectedItem.Text.ToString() + "'");
        }
        else if (effectiveDateFromDropDownList.SelectedValue == "0" && effectiveDateToDropDownList.SelectedValue != "0")
        {
            sbQuery.Append("AND REFIX_DT<='" + effectiveDateToDropDownList.SelectedItem.Text.ToString() + "'");
        }
        else if (effectiveDateFromDropDownList.SelectedValue != "0" && effectiveDateToDropDownList.SelectedValue != "0")
        {
            sbQuery.Append("AND REFIX_DT BETWEEN '" + effectiveDateFromDropDownList.SelectedItem.Text.ToString() + "' AND  '" + effectiveDateToDropDownList.SelectedItem.Text.ToString() + "'");
        }


        sbQuery.Append(" ORDER BY REFIX_DT DESC, EFFECTIVE_DATE DESC");

        DataTable dtPriceInfo = commonGatewayObj.Select(sbQuery.ToString());

        if (dtPriceInfo.Rows.Count > 0)
        {
            dvGridSurrender.Visible          = true;
            SurrenderListGridView.DataSource = dtPriceInfo;
            SurrenderListGridView.DataBind();
        }
        else
        {
            dvGridSurrender.Visible = false;
            ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "Popup", "alert('No Data Found');", true);
        }
    }
Exemplo n.º 4
0
    protected void findButton_Click(object sender, EventArgs e)
    {
        string[] refixation     = refixationDateTextBox.Text.ToUpper().Split('-');
        string   refixationDate = "01-" + refixation[1].ToUpper();


        DataTable dtFundInfoDetails = unitRepprtObj.dtFundInfoDetails(" AND YEAR_START_MONTH <> '" + refixationDate + "'  ");
        DataTable dtPriceWithNAV    = unitRepprtObj.dtPriceDetails(" ").Clone();


        for (int looper = 0; looper < dtFundInfoDetails.Rows.Count; looper++)
        {
            DataTable dtPriceDetails = unitRepprtObj.dtPriceDetails(" AND FUND_CD='" + dtFundInfoDetails.Rows[looper]["FUND_CD"].ToString().ToUpper() + "'  AND REFIX_DT=(SELECT MAX (REFIX_DT) FROM PRICE_REFIX WHERE FUND_CD='" + dtFundInfoDetails.Rows[looper]["FUND_CD"].ToString().ToUpper() + "') ");
            DataTable dtNAVDetails   = unitRepprtObj.dtPriceDetailsWithNAV(" AND NAVFUNDID=" + Convert.ToInt16(dtFundInfoDetails.Rows[looper]["FUND_CD_INVEST"].ToString().ToUpper()) + "  AND NAVDATE='" + NAVDateTextBox.Text + "' ");

            DataRow drdtPriceWithNAV = dtPriceWithNAV.NewRow();
            if (dtPriceDetails.Rows.Count > 0)
            {
                drdtPriceWithNAV["FUND_CD"]        = dtPriceDetails.Rows[0]["FUND_CD"];
                drdtPriceWithNAV["FUND_NM"]        = dtPriceDetails.Rows[0]["FUND_NM"];
                drdtPriceWithNAV["EFFECTIVE_DATE"] = dtPriceDetails.Rows[0]["EFFECTIVE_DT"];
                drdtPriceWithNAV["REFIX_SL_PR"]    = dtPriceDetails.Rows[0]["REFIX_SL_PR"];
                drdtPriceWithNAV["REFIX_REP_PR"]   = dtPriceDetails.Rows[0]["REFIX_REP_PR"];
            }

            if (dtNAVDetails.Rows.Count > 0)
            {
                drdtPriceWithNAV["NAV_MP"] = dtNAVDetails.Rows[0]["NAV_PU_MP"];
                drdtPriceWithNAV["NAV_CP"] = dtNAVDetails.Rows[0]["NAV_PU_CP"];
            }



            dtPriceWithNAV.Rows.Add(drdtPriceWithNAV);
        }


        if (dtPriceWithNAV.Rows.Count > 0)
        {
            dvGridSurrender.Visible          = true;
            SurrenderListGridView.DataSource = dtPriceWithNAV;
            SurrenderListGridView.DataBind();
        }
        else
        {
            dvGridSurrender.Visible = false;
            ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "Popup", "alert('No Data Found');", true);
        }
    }
 protected void fundNameDropDownList_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (fundNameDropDownList.SelectedValue.ToString() != "0")
     {
         DataTable dtChequeData = unitRepBLObj.dtGetChequePaymentData("AND A.AUDITED_BY IS  NULL AND FUND_INFO.FUND_CD='" + fundNameDropDownList.SelectedValue.ToString() + "'");
         SurrenderListGridView.DataSource = dtChequeData;
         SurrenderListGridView.DataBind();
     }
     else
     {
         DataTable dtChequeData = unitRepBLObj.dtGetChequePaymentData("AND A.AUDITED_BY IS  NULL ");
         SurrenderListGridView.DataSource = dtChequeData;
         SurrenderListGridView.DataBind();
     }
 }
    protected void AuditButton_Click(object sender, EventArgs e)
    {
        int       countCheck = 0;
        Hashtable htUpdate   = new Hashtable();

        try
        {
            commonGatewayObj.BeginTransaction();
            foreach (GridViewRow Drv in SurrenderListGridView.Rows)
            {
                CheckBox leftCheckBox = (CheckBox)SurrenderListGridView.Rows[countCheck].FindControl("leftCheckBox");

                if (leftCheckBox.Checked)
                {
                    htUpdate = new Hashtable();
                    htUpdate.Add("AUDITED_BY", userObj.UserID.ToString());
                    htUpdate.Add("AUDITED_DATE", DateTime.Now);
                    commonGatewayObj.Update(htUpdate, "REPURCHASE ", "REG_BK='" + Drv.Cells[2].Text.ToUpper().ToString() + "' AND REG_BR='" + Drv.Cells[3].Text.ToUpper().ToString() + "' AND REG_NO=" + Convert.ToInt32(Drv.Cells[4].Text.ToString()) + " AND REP_NO=" + Convert.ToInt32(Drv.Cells[5].Text.ToString()));
                }

                countCheck++;
            }
            commonGatewayObj.CommitTransaction();
            if (fundNameDropDownList.SelectedValue.ToString() != "0")
            {
                DataTable dtChequeData = unitRepBLObj.dtGetChequePaymentData("AND A.AUDITED_BY IS  NULL AND FUND_INFO.FUND_CD='" + fundNameDropDownList.SelectedValue.ToString() + "'");
                SurrenderListGridView.DataSource = dtChequeData;
                SurrenderListGridView.DataBind();
            }
            else
            {
                DataTable dtChequeData = unitRepBLObj.dtGetChequePaymentData("AND A.AUDITED_BY IS  NULL ");

                SurrenderListGridView.DataSource = dtChequeData;
                SurrenderListGridView.DataBind();
            }
            ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "Popup", "alert('Save Successfully');", true);
        }
        catch (Exception ex)
        {
            commonGatewayObj.RollbackTransaction();

            ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "Popup", "alert ('Save Failed');", true);
        }
    }
Exemplo n.º 7
0
    protected void findButton_Click(object sender, EventArgs e)
    {
        DataTable dtUnitFundPosition      = dtFundPosition();
        DataTable dtUnitFundPositionTotal = dtFundPositionTotal();

        dtUnitFundPosition.Merge(dtUnitFundPositionTotal);
        if (dtUnitFundPosition.Rows.Count > 0)
        {
            dvLedger.Visible = true;
            SurrenderListGridView.DataSource = dtUnitFundPosition;
            SurrenderListGridView.DataBind();
        }
        else
        {
            dvLedger.Visible = false;
            ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "Popup", "alert('No Data Found');", true);
        }
    }
Exemplo n.º 8
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (BaseContent.IsSessionExpired())
        {
            Response.Redirect("../Default.aspx");
            return;
        }
        bcContent = (BaseClass)Session["BCContent"];

        userObj.UserID = bcContent.LoginID.ToString();
        string fundCode   = bcContent.FundCode.ToString();
        string branchCode = bcContent.BranchCode.ToString();

        //spanFundName.InnerText = opendMFDAO.GetFundName(fundCode.ToString());

        if (!IsPostBack)
        {
            fundNameDropDownList.DataSource     = opendMFDAO.dtFundList();
            fundNameDropDownList.DataTextField  = "FUND_NM";
            fundNameDropDownList.DataValueField = "FUND_CD";
            fundNameDropDownList.DataBind();

            Signatory1DropDownList.DataSource     = unitRepBLObj.dtGetSigantoryList();
            Signatory1DropDownList.DataTextField  = "NAME";
            Signatory1DropDownList.DataValueField = "ID";
            Signatory1DropDownList.SelectedValue  = "IAMCL309";
            Signatory1DropDownList.DataBind();

            Signatory2DropDownList.DataSource     = unitRepBLObj.dtGetSigantoryList();
            Signatory2DropDownList.DataTextField  = "NAME";
            Signatory2DropDownList.DataValueField = "ID";
            Signatory2DropDownList.SelectedValue  = "IAMCL535";
            Signatory2DropDownList.DataBind();

            TranDateTextBox.Text = DateTime.Today.ToString("dd-MMM-yyyy");

            DataTable dtChequeData = unitRepBLObj.dtGetChequePaymentDataWithVoucherNo(" AND A.AUDITED_BY IS NOT NULL AND A.VOUCHER_NO IS NULL  ");
            if (dtChequeData.Rows.Count > 0)
            {
                SurrenderListGridView.DataSource = dtChequeData;
                SurrenderListGridView.DataBind();
            }
        }
    }
Exemplo n.º 9
0
    protected void ChequeVoucherButton_Click(object sender, EventArgs e)
    {
        if (fundNameDropDownList.SelectedValue.ToString() != "0")
        {
            try
            {
                SaveAccountVoucherWithChequePayment(unitRepBLObj.GetaccountSchema(fundNameDropDownList.SelectedValue.ToString()));

                DataTable dtChequeData = unitRepBLObj.dtGetChequePaymentDataWithVoucherNo(" AND A.VOUCHER_NO IS NULL AND A.AUDITED_BY IS NOT NULL AND FUND_INFO.FUND_CD='" + fundNameDropDownList.SelectedValue.ToString() + "'");
                SurrenderListGridView.DataSource = dtChequeData;
                SurrenderListGridView.DataBind();
                VoucherNoTexBox.Text = "";
                ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "Popup", "alert('Save Successfully');", true);
            }
            catch (Exception ex)
            {
                ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "Popup", "alert ('Save Failed');", true);
            }
        }
    }
Exemplo n.º 10
0
 protected void fundNameDropDownList_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (fundNameDropDownList.SelectedValue.ToString() != "0")
     {
         DataTable dtChequeData = unitRepBLObj.dtGetChequePaymentDataWithVoucherNo("AND A.VOUCHER_NO IS NULL AND A.AUDITED_BY IS NOT NULL AND FUND_INFO.FUND_CD='" + fundNameDropDownList.SelectedValue.ToString() + "'");
         SurrenderListGridView.DataSource = dtChequeData;
         SurrenderListGridView.DataBind();
         VoucherNoTexBox.Text = unitRepBLObj.getNexAccountVoucherNo(unitRepBLObj.GetaccountSchema(fundNameDropDownList.SelectedValue.ToString()));
     }
     else
     {
         DataTable dtChequeData = unitRepBLObj.dtGetChequePaymentDataWithVoucherNo("AND A.VOUCHER_NO IS NULL AND A.AUDITED_BY IS NOT NULL ");
         if (dtChequeData.Rows.Count > 0)
         {
             SurrenderListGridView.DataSource = dtChequeData;
             SurrenderListGridView.DataBind();
             VoucherNoTexBox.Text = "";
         }
     }
 }