コード例 #1
0
ファイル: ManageLog_Form.cs プロジェクト: wpmyj/CbznSystem
        private void GetRecordCount()
        {
            int count = Dbhelper.Db.GetCount <CbManageLog>("ID");

            PageCount   = FormComm.GetPage(count, 30, l_PageTitle);
            CurrentPage = 1;
        }
コード例 #2
0
ファイル: Tab2_Form.cs プロジェクト: wpmyj/CbznSystem
        private void GetDeviceInfoCount()
        {
            int count = Dbhelper.Db.GetCount <CbDeviceInfo>();

            PageCount   = FormComm.GetPage(count, 30, l_Description);
            CurrentPage = 1;
        }
コード例 #3
0
        private void GetRecordCount()
        {
            string where = GetSearchCountent();
            int count = Dbhelper.Db.GetCount <CbIoRecord>("ID", where);

            PageCount   = FormComm.GetPage(count, 30, l_PageTitle);
            CurrentPage = 1;
        }
コード例 #4
0
 private void GetRecordCount()
 {
     try
     {
         string strwhere = GetSearchWhere();
         int    count    = Dbhelper.Db.GetCount <CbCardInfo>("ID", strwhere);
         PageCount   = FormComm.GetPage(count, 30, l_PageTile);
         CurrentPage = 1;
     }
     catch (Exception ex)
     {
         CustomExceptionHandler.GetExceptionMessage(ex);
         MessageBox.Show(ex.Message, "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
コード例 #5
0
ファイル: ChargeRecord_Form.cs プロジェクト: wpmyj/CbznSystem
 private void GetRecordCount()
 {
     try
     {
         string where = GetSearchWhere();
         DataTable dt = Dbhelper.Db.GetAggregate <CbTempChargeRecord>(new AggregateFuncion[] {
             new AggregateFuncion()
             {
                 AggregateType = AggregateTypes.COUNT, Column = "ID", ColumnAlias = "RecordCount"
             },
             new AggregateFuncion()
             {
                 AggregateType = AggregateTypes.SUM, Column = "ChargeAmount", ColumnAlias = "Charges"
             },
             new AggregateFuncion()
             {
                 AggregateType = AggregateTypes.SUM, Column = "ActualAmount", ColumnAlias = "PaidInAmount"
             },
         }, where);
         int    count = 0;
         double charges = 0, paidinamount = 0;
         object obj = dt.Rows[0]["RecordCount"];
         if (obj != DBNull.Value)
         {
             count = Convert.ToInt32(obj);
         }
         obj = dt.Rows[0]["Charges"];
         if (obj != DBNull.Value)
         {
             charges = Convert.ToDouble(obj);
         }
         obj = dt.Rows[0]["PaidInAmount"];
         if (obj != DBNull.Value)
         {
             paidinamount = Convert.ToDouble(obj);
         }
         l_StatisticsAll.Text = string.Format("总计金额    应收:{0}元      实收:{1}元", charges, paidinamount);
         PageCount            = FormComm.GetPage(count, 30, l_PageTitle);
         CurrentPage          = 1;
     }
     catch (Exception ex)
     {
         CustomExceptionHandler.GetExceptionMessage(ex);
         MessageBox.Show(ex.Message, "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }