Example #1
0
 public void createRateView(BPS.BLL.Clients.DataSets.dsClients.ClientsRow rwC)
 {
     this.dsInterestRate1.InterestRate.Clear();
     for (int i = 0; i < this.dsReqTypes1.ClientsRequestTypes.Count; i++)
     {
         BPS.BLL.ClientRequest.DataSets.dsReqTypes.ClientsRequestTypesRow rw = DSReqTypes.ClientsRequestTypes[i];
         BLL.Clients.DataSets.dsInterestRate.InterestRateRow dr = this.dsInterestRate1.InterestRate.NewInterestRateRow();
         dr.ReqType     = rw.RequestTypeID;
         dr.ReqTypeName = rw.RequestTypeName;
         DataRow [] drCharge = this.dsInterestRateList1.InterestRates.Select("ClientID=" + rwC.ClientID.ToString() +
                                                                             " and RequestTypeID=" + rw.RequestTypeID.ToString() + " and IsNormal=false");
         if (drCharge.Length == 0)
         {
             dr.SetRateBlackNull();
         }
         else
         {
             dr.RateBlack = (double)drCharge[0]["ServiceCharge"] * 100;
         }
         DataRow [] drChargeN = this.dsInterestRateList1.InterestRates.Select("ClientID=" + rwC.ClientID.ToString() +
                                                                              " and RequestTypeID=" + rw.RequestTypeID.ToString() + " and IsNormal=true");
         if (drChargeN.Length == 0)
         {
             dr.SetRateNormalNull();
         }
         else
         {
             dr.RateNormal = (double)drChargeN[0]["ServiceCharge"] * 100;
         }
         this.dsInterestRate1.InterestRate.AddInterestRateRow(dr);
     }
     this.dsInterestRate1.InterestRate.AcceptChanges();
 }
Example #2
0
        public void CreateRateView()
        {
            this.dsInterestRate1.InterestRate.Clear();

            for (int i = 0; i < this.dsReqTypes1.ClientsRequestTypes.Count; i++)
            {
                BPS.BLL.ClientRequest.DataSets.dsReqTypes.ClientsRequestTypesRow rw = this.dsReqTypes1.ClientsRequestTypes[i];
                BLL.Clients.DataSets.dsInterestRate.InterestRateRow dr = this.dsInterestRate1.InterestRate.NewInterestRateRow();
                dr.ReqType     = rw.RequestTypeID;
                dr.ReqTypeName = rw.RequestTypeName;
                dr.SetRateBlackNull();
                dr.SetRateNormalNull();                                   // = Convert.DBNull;
                this.dsInterestRate1.InterestRate.AddInterestRateRow(dr); //.dtRate.Rows.Add(dr);
            }
            this.dsInterestRate1.InterestRate.AcceptChanges();
        }