Ejemplo n.º 1
0
 public AcceptedTurnNumberRemainedByLaderTypeCountReport(string FromDate, string ToDate)
 {
     //
     // Required for Windows Form Designer support
     //
     InitializeComponent();
     try
     {
         HPS.BLL.TrafficBLL.BLLTraffic_TFactory TrafficFactory = new HPS.BLL.TrafficBLL.BLLTraffic_TFactory();
         DataTable LaderTypeReportTable = new DataTable();
         TrafficFactory.SelectRemainedAcceptedTurnNumberByLaderTypeReport(FromDate, ToDate, LaderTypeReportTable);
         this.DataSource            = LaderTypeReportTable;
         FromDatetxt.Text           = FromDate;
         ToDatetxt.Text             = ToDate;
         UserNametxt.Text           = HPS.Common.CurrentUser.user.UserName_nvc;
         Datetxt.Text               = TrafficFactory.ServerJalaliDate;
         Timetxt.Text               = TrafficFactory.ServerTime;
         LaderType_nvctxt.DataField = "LaderType_nvc";
         Counttxt.DataField         = "RemainedCount_int";
         Int64?AllcountRecords = (from row in LaderTypeReportTable.AsEnumerable() select(Int32) row["RemainedCount_int"]).Sum();
         AllCounttxt.Text = AllcountRecords.HasValue ? AllcountRecords.ToString() : "0";
     }
     catch (Exception ex)
     {
         Hepsa.Core.Common.MessageBox.ErrorMessage(ex.Message);
     }
 }