protected void Page_Load(object sender, EventArgs e) { if (Session["UserID"] == null) { Session.RemoveAll(); Response.Redirect("../Default.aspx"); } DataTable dtFundNameDropDownList = dropDownListObj.FundNameDropDownList(); DataTable dtPortfolioAsOnDropDownList = BalanceDateDropDownList(); DataTable dtCompanyNameDropDownList = dropDownListObj.FillCompanyNameDropDownList(); if (!IsPostBack) { companyNameDropDownList.DataSource = dtCompanyNameDropDownList; companyNameDropDownList.DataTextField = "COMP_NM"; companyNameDropDownList.DataValueField = "COMP_CD"; companyNameDropDownList.DataBind(); fundNameDropDownList.DataSource = dtFundNameDropDownList; fundNameDropDownList.DataTextField = "F_NAME"; fundNameDropDownList.DataValueField = "F_CD"; fundNameDropDownList.DataBind(); PortfolioAsOnDropDownList.DataSource = dtPortfolioAsOnDropDownList; PortfolioAsOnDropDownList.DataTextField = "Balance_Date"; PortfolioAsOnDropDownList.DataValueField = "bal_dt_ctrl"; PortfolioAsOnDropDownList.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { if (Session["UserID"] == null) { Session.RemoveAll(); Response.Redirect("../Default.aspx"); } DataTable dtPortfolioAsOnDropDownList = dropDownListObj.HowlaDateDropDownList(); if (!IsPostBack) { PortfolioAsOnDropDownList.DataSource = dtPortfolioAsOnDropDownList; PortfolioAsOnDropDownList.DataTextField = "Howla_Date"; PortfolioAsOnDropDownList.DataValueField = "VCH_DT"; PortfolioAsOnDropDownList.DataBind(); DataTable dtNoOfFunds = GetFundName(); // DataTable dtFund = obj.GetFundGridTable(); if (dtNoOfFunds.Rows.Count > 0) { chkFunds.DataSource = dtNoOfFunds; chkFunds.DataValueField = "F_CD"; chkFunds.DataTextField = "F_NAME"; chkFunds.DataBind(); dvGridFund.Visible = true; } } else { dvGridFund.Visible = false; } }
protected void Page_Load(object sender, EventArgs e) { if (Session["UserID"] == null) { Session.RemoveAll(); Response.Redirect("../Default.aspx"); } DataTable dtPortfolioAsOnDropDownList = dropDownListObj.HowlaDateDropDownList(); if (!IsPostBack) { PortfolioAsOnDropDownList.DataSource = dtPortfolioAsOnDropDownList; PortfolioAsOnDropDownList.DataTextField = "Howla_Date"; PortfolioAsOnDropDownList.DataValueField = "VCH_DT"; PortfolioAsOnDropDownList.DataBind(); DataTable dtNoOfFunds = GetFundName(); // DataTable dtFund = obj.GetFundGridTable(); if (dtNoOfFunds.Rows.Count > 0) { //foreach (DataRow dr in dtNoOfFunds.Rows) //{ // ListItem newItem = new ListItem(dr["F_CD"].ToString()+ dr["F_NAME"].ToString()); // chkFruits.Items.Add(newItem); //} chkFunds.DataSource = dtNoOfFunds; chkFunds.DataValueField = "F_CD"; chkFunds.DataTextField = "F_NAME"; chkFunds.DataBind(); //int fundSerial = 1; dvGridFund.Visible = true; //DataRow drdtGridFund; //for (int looper = 0; looper < dtNoOfFunds.Rows.Count; looper++) //{ // drdtGridFund = dtFund.NewRow(); // drdtGridFund["SI"] = fundSerial; // drdtGridFund["FUND_CODE"] = dtNoOfFunds.Rows[looper]["F_CD"].ToString().ToUpper(); // drdtGridFund["FUND_NAME"] = dtNoOfFunds.Rows[looper]["F_NAME"].ToString().ToUpper(); // dtFund.Rows.Add(drdtGridFund); // fundSerial++; //chkFruits.DataSource = dtNoOfFunds; //chkFruits.DataBind(); } } else { dvGridFund.Visible = false; } }