Exemplo n.º 1
0
        protected void GetControlDetails(int scheme, string folio)
        {
            DataSet   ds = new DataSet();
            DataTable dtSchemeAmcCategory;

            ds = onlineMforderBo.GetControlDetails(scheme, folio, 1);
            dtSchemeAmcCategory = commonLookupBo.GetMFSchemeAMCCategory(scheme);

            DataTable dt = ds.Tables[0];

            if (dt.Rows.Count > -1)
            {
                foreach (DataRow dr in dt.Rows)
                {
                    if (!string.IsNullOrEmpty(dr["PSLV_LookupValue"].ToString()))
                    {
                        lblDividendType.Text = dr["PSLV_LookupValue"].ToString();
                    }
                    if (!string.IsNullOrEmpty(dr["MinAmt"].ToString()))
                    {
                        lblMintxt.Text = dr["MinAmt"].ToString();
                    }
                    if (!string.IsNullOrEmpty(dr["MultiAmt"].ToString()))
                    {
                        lblMulti.Text = dr["MultiAmt"].ToString();
                    }
                    if (!string.IsNullOrEmpty(dr["CutOffTime"].ToString()))
                    {
                        lbltime.Text = dr["CutOffTime"].ToString();
                    }

                    if (!string.IsNullOrEmpty(dr["divFrequency"].ToString()))
                    {
                        lbldftext.Text = dr["divFrequency"].ToString();
                    }
                    if (!string.IsNullOrEmpty(dr["url"].ToString()))
                    {
                        lnkFactSheet.PostBackUrl = dr["url"].ToString();
                    }

                    if (!string.IsNullOrEmpty(dr["PASP_NFOStartDate"].ToString()))
                    {
                        NFOStartDate.Text = Convert.ToDateTime(dr["PASP_NFOStartDate"].ToString()).ToShortDateString().ToString();
                    }
                    if (!string.IsNullOrEmpty(dr["PASP_NFOEndDate"].ToString()))
                    {
                        NFOEndDate.Text = Convert.ToDateTime(dr["PASP_NFOEndDate"].ToString()).ToShortDateString().ToString();
                    }
                }
                //DataSet dsNav = commonLookupBo.GetLatestNav(int.Parse(ddlScheme.SelectedValue));
                //if (dsNav.Tables[0].Rows.Count > 0)
                //{
                //    string date = Convert.ToDateTime(dsNav.Tables[0].Rows[0][0]).ToString("dd-MMM-yyyy");
                //    lblNavDisplay.Text = dsNav.Tables[0].Rows[0][1] + " " + "As On " + " " + date;
                //}
            }
            if (dtSchemeAmcCategory.Rows.Count > 0)
            {
                lblNFOSchemeAMC.Text   = dtSchemeAmcCategory.Rows[0]["PA_AMCName"].ToString();
                lblSchemeCategory.Text = dtSchemeAmcCategory.Rows[0]["PAIC_AssetInstrumentCategoryName"].ToString();
                BindFolioNumber(Convert.ToInt32(dtSchemeAmcCategory.Rows[0]["PA_AMCCode"].ToString()));
            }
        }
        protected void GetControlDetails(int scheme, string folio)
        {
            DataSet   ds = new DataSet();
            DataTable dtSchemeAmcCategory;

            ds = onlineMforderBo.GetControlDetails(scheme, folio, exchangeType == "Online" ? 1 : 0);
            dtSchemeAmcCategory = commonLookupBo.GetMFSchemeAMCCategory(scheme);
            if (ds.Tables[0].Rows.Count > 0 && !string.IsNullOrEmpty(ds.Tables[0].Rows[0]["PASP_Status"].ToString()))
            {
                if (ds.Tables[0].Rows[0]["PASP_Status"].ToString() != "NFO")
                {
                    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "pageloadscript", "alert('Scheme Is not Available as NFO');", true); return;
                }
            }
            DataTable dt = ds.Tables[0];

            if (dt.Rows.Count > -1)
            {
                foreach (DataRow dr in dt.Rows)
                {
                    if (!string.IsNullOrEmpty(dr["PSLV_LookupValue"].ToString()))
                    {
                        lblDividendType.Text = dr["PSLV_LookupValue"].ToString();
                    }
                    if (!string.IsNullOrEmpty(dr["MinAmt"].ToString()))
                    {
                        lblMintxt.Text = dr["MinAmt"].ToString();
                    }
                    if (!string.IsNullOrEmpty(dr["MultiAmt"].ToString()))
                    {
                        lblMulti.Text = dr["MultiAmt"].ToString();
                    }
                    if (!string.IsNullOrEmpty(dr["CutOffTime"].ToString()))
                    {
                        lbltime.Text = dr["CutOffTime"].ToString();
                    }

                    if (!string.IsNullOrEmpty(dr["divFrequency"].ToString()))
                    {
                        lbldftext.Text = dr["divFrequency"].ToString();
                    }
                    if (!string.IsNullOrEmpty(dr["url"].ToString()))
                    {
                        lnkFactSheet.PostBackUrl = dr["url"].ToString();
                    }

                    if (!string.IsNullOrEmpty(dr["PASP_NFOStartDate"].ToString()))
                    {
                        NFOStartDate.Text = Convert.ToDateTime(dr["PASP_NFOStartDate"].ToString()).ToShortDateString().ToString();
                    }
                    if (!string.IsNullOrEmpty(dr["PASP_NFOEndDate"].ToString()))
                    {
                        NFOEndDate.Text = Convert.ToDateTime(dr["PASP_NFOEndDate"].ToString()).ToShortDateString().ToString();
                    }
                }
            }
            if (dtSchemeAmcCategory.Rows.Count > 0)
            {
                lblNFOSchemeAMC.Text   = dtSchemeAmcCategory.Rows[0]["PA_AMCName"].ToString();
                lblSchemeCategory.Text = dtSchemeAmcCategory.Rows[0]["PAIC_AssetInstrumentCategoryName"].ToString();
                BindFolioNumber(Convert.ToInt32(dtSchemeAmcCategory.Rows[0]["PA_AMCCode"].ToString()));
            }
            if (ds.Tables[4].Rows.Count > 0)
            {
                lblDemate.Text = ds.Tables[4].Rows[0][0].ToString();
                onlinemforderVo.BSESchemeCode = ds.Tables[4].Rows[0][0].ToString();
            }
        }