Ejemplo n.º 1
0
        /// <summary>
        ///  //Added By : Pradip pawar
        ///  Date:30-3-13
        ///  Description: Bind  Loan Type On Condition created date of customer
        ///  
        ///  Sadhe Karj:From 6 month 
        ///  prasangik:2 months
        ///  vishesh:4 months
        ///  aakasmik:1 month
        ///  
        /// </summary>
        public void BindLoanType(Int64 CustomerId)
        {
            DataTable dtLoanType;
            try
            {
                if (CustomerId > 0)
                {
                    ObjCust = new clsCustomer();
                    dtLoanType = new DataTable();
                    ObjCust.CustomerId = CustomerId;
                    dtLoanType = ObjCust.General_BindLoanTypeByCustomerId();

                    ddlLoanType.Items.Clear();
                    if (dtLoanType.Rows.Count > 0)
                    {
                        ddlLoanType.Items.Clear();
                        ddlLoanType.DataSource = null;
                        ddlLoanType.DataSource = dtLoanType;
                        ddlLoanType.DataTextField = "LoanTypeName";
                        ddlLoanType.DataValueField = "LoanTypeID";
                        ddlLoanType.DataBind();
                        ddlLoanType.Items.Insert(0, new ListItem("fuoMk", string.Empty));
                    }
                    else
                    {
                        ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('"+(String)GetGlobalResourceObject("SharedResource", "NewCustomerLoanNotAllowed")+"')", true);
                        lblMessage.CssClass = "FailureMessage";
                        lblMessage.Text = (String)GetGlobalResourceObject("SharedResource", "NewCustomerLoanNotAllowed");

                    }

                }
            }
            catch
            { }
            finally
            {
                ObjCust = new clsCustomer();
                dtLoanType = new DataTable();
            }
        }