private void GetRecordCount() { int count = Dbhelper.Db.GetCount <CbManageLog>("ID"); PageCount = FormComm.GetPage(count, 30, l_PageTitle); CurrentPage = 1; }
private void GetDeviceInfoCount() { int count = Dbhelper.Db.GetCount <CbDeviceInfo>(); PageCount = FormComm.GetPage(count, 30, l_Description); CurrentPage = 1; }
private void GetRecordCount() { string where = GetSearchCountent(); int count = Dbhelper.Db.GetCount <CbIoRecord>("ID", where); PageCount = FormComm.GetPage(count, 30, l_PageTitle); CurrentPage = 1; }
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); } }
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); } }