protected void LienMarkDropDownList_SelectedIndexChanged(object sender, EventArgs e)
    {
        UnitHolderRegistration unitRegObj = new UnitHolderRegistration();

        unitRegObj.FundCode   = FundCodeTextBox.Text.Trim();
        unitRegObj.BranchCode = BranchCodeTextBox.Text.Trim();
        unitRegObj.RegNumber  = RegNoTextBox.Text.Trim();
        UnitLien unitLienObj = new UnitLien();

        unitLienObj.LienNo = Convert.ToInt32(LienMarkDropDownList.SelectedValue.ToString());
        DataTable dtLienDetails = unitLienBLObj.dtLienDetailsInfo(unitRegObj, unitLienObj);

        if (dtLienDetails.Rows.Count > 0)
        {
            LienbankNameDropDownList.SelectedValue    = dtLienDetails.Rows[0]["LN_BK_CODE"].ToString();
            LienbranchNameDropDownList.DataSource     = opendMFDAO.dtFillBranchName(Convert.ToInt32(dtLienDetails.Rows[0]["LN_BK_CODE"].ToString()));
            LienbranchNameDropDownList.DataTextField  = "BRANCH_NAME";
            LienbranchNameDropDownList.DataValueField = "BRANCH_CODE";
            LienbranchNameDropDownList.DataBind();
            LienbranchNameDropDownList.SelectedValue = dtLienDetails.Rows[0]["LN_BK_BR_CODE"].ToString();
            LienReqDateTextBox.Text = dtLienDetails.Rows[0]["LN_REQ_DT"].Equals(DBNull.Value) ? "" : Convert.ToDateTime(dtLienDetails.Rows[0]["LN_REQ_DT"].ToString()).ToString("dd-MMM-yyyy");
            LienReqRefTextBox.Text  = dtLienDetails.Rows[0]["LN_REQ_REF"].Equals(DBNull.Value) ? "" : dtLienDetails.Rows[0]["LN_REQ_REF"].ToString();
        }
        else
        {
        }
    }
示例#2
0
 protected void LienbankNameDropDownList_SelectedIndexChanged(object sender, EventArgs e)
 {
     LienbranchNameDropDownList.DataSource     = opendMFDAO.dtFillBranchName(Convert.ToInt32(LienbankNameDropDownList.SelectedValue.ToString()));
     LienbranchNameDropDownList.DataTextField  = "BRANCH_NAME";
     LienbranchNameDropDownList.DataValueField = "BRANCH_CODE";
     LienbranchNameDropDownList.DataBind();
 }
    protected void LienMarkDropDownList_SelectedIndexChanged(object sender, EventArgs e)
    {
        UnitHolderRegistration unitRegObj = new UnitHolderRegistration();

        unitRegObj.FundCode   = FundCodeTextBox.Text.Trim();
        unitRegObj.BranchCode = BranchCodeTextBox.Text.Trim();
        unitRegObj.RegNumber  = RegNoTextBox.Text.Trim();
        UnitLien unitLienObj = new UnitLien();

        unitLienObj.LienNo = Convert.ToInt32(LienMarkDropDownList.SelectedValue.ToString());
        DataTable dtLienCerts     = unitLienBLObj.dtTotalLienCert(unitRegObj, unitLienObj);
        long      totalLienAmount = unitLienBLObj.totalLienAmount(unitRegObj, unitLienObj);
        DataTable dtLienDetails   = unitLienBLObj.dtLienDetailsInfo(unitRegObj, unitLienObj);

        if (dtLienDetails.Rows.Count > 0)
        {
            LienbankNameDropDownList.SelectedValue    = dtLienDetails.Rows[0]["LN_BK_CODE"].ToString();
            LienbranchNameDropDownList.DataSource     = opendMFDAO.dtFillBranchName(Convert.ToInt32(dtLienDetails.Rows[0]["LN_BK_CODE"].ToString()));
            LienbranchNameDropDownList.DataTextField  = "BRANCH_NAME";
            LienbranchNameDropDownList.DataValueField = "BRANCH_CODE";
            LienbranchNameDropDownList.DataBind();
            LienbranchNameDropDownList.SelectedValue = dtLienDetails.Rows[0]["LN_BK_BR_CODE"].ToString();

            if (dtLienCerts.Rows.Count > 0)
            {
                dvContentBottom.Visible = true;
                leftDataGrid.DataSource = dtLienCerts;
                leftDataGrid.DataBind();
                TotalLienUnitHoldingTextBox.Text = totalLienAmount.ToString();
            }
            else
            {
                TotalLienUnitHoldingTextBox.Text = "";
                TotalUnitLienCancelTextBox.Text  = "";
                dvContentBottom.Visible          = false;
                ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "Popup", "alert ('No Units To Lien Cancel ');", true);
            }
            LienMarkCancelNoTextBox.Text  = unitLienBLObj.getNextLienCancelNo(unitRegObj, userObj).ToString();
            unitLienObj.LienCancelNo      = unitLienBLObj.getNextLienCancelNo(unitRegObj, userObj) - 1;
            LienCancelReqDateTextBox.Text = unitLienBLObj.getLastLienCancelReqDate(unitRegObj, unitLienObj).ToString("dd-MMM-yyyy");
        }
        else
        {
            TotalLienUnitHoldingTextBox.Text = "";
            TotalUnitLienCancelTextBox.Text  = "";
            dvContentBottom.Visible          = false;
            LienbankNameDropDownList.Focus();
            ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "Popup", "alert ('No Units To Lien Cancel  ');", true);
        }
    }
    protected void LienbankNameDropDownList_SelectedIndexChanged(object sender, EventArgs e)
    {
        LienbranchNameDropDownList.DataSource     = opendMFDAO.dtFillBranchName(Convert.ToInt32(LienbankNameDropDownList.SelectedValue.ToString()));
        LienbranchNameDropDownList.DataTextField  = "BRANCH_NAME";
        LienbranchNameDropDownList.DataValueField = "BRANCH_CODE";
        LienbranchNameDropDownList.DataBind();

        if (NormalRadioButton.Checked)
        {
            divDeath.Style.Add("visibility", "hidden");
            dvChequeIssue.Style.Add("visibility", "hidden");
        }
        if (YesRadioButton.Checked)
        {
            divLienMark.Style.Add("visibility", "visible");
        }
    }