Example #1
0
        public AcceptedTurnNumberRemainedByLaderTypeCountWithDateReport(string FromDate, string FromTime, string ToTime, 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.SelectRemainedAcceptedTurnNumberByLaderTypeWithDateReport(FromDate, ToDate, FromTime, ToTime, 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";
                Date_nvctxt.DataField      = "Date_nvc";
                Int64?AllcountRecords = (from row in LaderTypeReportTable.AsEnumerable() select(Int64) row["RemainedCount_int"]).Sum();
                AllCounttxt.Text = AllcountRecords.HasValue ? AllcountRecords.ToString() : "0";
            }
            catch (Exception ex)
            {
                Hepsa.Core.Common.MessageBox.ErrorMessage(ex.Message);
            }
        }