Exemplo n.º 1
0
    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();
        string fundCode   = bcContent.FundCode.ToString();
        string branchCode = bcContent.BranchCode.ToString();

        spanFundName.InnerText = opendMFDAO.GetFundName(fundCode.ToString());
        fundCodeTextBox.Text   = fundCode.ToString();
        branchCodeTextBox.Text = branchCode.ToString();



        if (!IsPostBack)
        {
            DataTable dtOccupationList = opendMFDAO.dtOccopationList();
            OccupationDropDownList.DataSource     = dtOccupationList;
            OccupationDropDownList.DataTextField  = "DESCR";
            OccupationDropDownList.DataValueField = "CODE";
            OccupationDropDownList.DataBind();
        }
    }
Exemplo n.º 2
0
    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();
        string fundCode   = bcContent.FundCode.ToString();
        string branchCode = bcContent.BranchCode.ToString();

        spanFundName.InnerText = opendMFDAO.GetFundName(fundCode.ToString());
        fundCodeTextBox.Text   = fundCode.ToString();
        branchCodeTextBox.Text = branchCode.ToString();



        if (!IsPostBack)
        {
            DataTable dtOccupationList = opendMFDAO.dtOccopationList();
            OccupationDropDownList.DataSource     = dtOccupationList;
            OccupationDropDownList.DataTextField  = "DESCR";
            OccupationDropDownList.DataValueField = "CODE";
            OccupationDropDownList.DataBind();


            bankNameDropDownList.DataSource     = opendMFDAO.dtFillBankName(" CATE_CODE=1 ");
            bankNameDropDownList.DataTextField  = "BANK_NAME";
            bankNameDropDownList.DataValueField = "BANK_CODE";
            bankNameDropDownList.DataBind();

            IDbankNameDropDownList.DataSource     = opendMFDAO.dtFillBankName(" CATE_CODE IN (1,2,3) ");
            IDbankNameDropDownList.DataTextField  = "BANK_NAME";
            IDbankNameDropDownList.DataValueField = "BANK_CODE";
            IDbankNameDropDownList.DataBind();

            regTypeDropDownList.DataSource     = unitHolderRegBLObj.dtFillRegType();
            regTypeDropDownList.DataTextField  = "NAME";
            regTypeDropDownList.DataValueField = "CODE";
            regTypeDropDownList.DataBind();
            regTypeDropDownList.SelectedValue = "N";

            regObj.FundCode   = fundCode.ToString();
            regObj.BranchCode = branchCode.ToString();

            regNoTextBox.Text   = unitHolderRegBLObj.GetMaxRegNo(regObj).ToString();
            regObj.RegNumber    = (unitHolderRegBLObj.GetMaxRegNo(regObj) - 1).ToString();
            regDateTextBox.Text = unitHolderRegBLObj.getLastRegDate(regObj).ToString("dd-MMM-yyyy");
            regNoTextBox.Focus();
        }
    }