Exemple #1
0
 public override void PopulateData()
 {
     try
     {
         using (TaxiDataContext db = new TaxiDataContext())
         {
             var list = db.stp_DriverRentLastStatement().ToList();
             grdDriverRentLastStatement.BeginUpdate();
             grdDriverRentLastStatement.RowCount = list.Count;
             for (int i = 0; i < list.Count; i++)
             {
                 grdDriverRentLastStatement.Rows[i].Cells[COLS.Id].Value         = list[i].Id;
                 grdDriverRentLastStatement.Rows[i].Cells[COLS.DriverId].Value   = list[i].DriverId;
                 grdDriverRentLastStatement.Rows[i].Cells[COLS.DriverNo].Value   = list[i].DriverNo;
                 grdDriverRentLastStatement.Rows[i].Cells[COLS.DriverName].Value = list[i].DriverName;
                 grdDriverRentLastStatement.Rows[i].Cells[COLS.TransDate].Value  = list[i].TransDate;
                 grdDriverRentLastStatement.Rows[i].Cells[COLS.TransNo].Value    = list[i].TransNo;
                 grdDriverRentLastStatement.Rows[i].Cells[COLS.JobsTotal].Value  = list[i].JobsTotal;
                 grdDriverRentLastStatement.Rows[i].Cells[COLS.OldBalance].Value = list[i].OldBalance;
                 grdDriverRentLastStatement.Rows[i].Cells[COLS.FromDate].Value   = list[i].FromDate;
                 grdDriverRentLastStatement.Rows[i].Cells[COLS.ToDate].Value     = list[i].ToDate;
                 grdDriverRentLastStatement.Rows[i].Cells[COLS.Balance].Value    = list[i].Balance;
                 //grdDriverRentLastStatement.Rows[i].Cells[COLS.JobsTotal].Value = list[i].Id;
             }
             grdDriverRentLastStatement.EndUpdate();
         }
     }
     catch (Exception ex)
     {
         ENUtils.ShowMessage(ex.Message);
     }
 }