public static HighChartsBarGraphInfo GetReportProjectFundsAtLocation()//crosstab for grade mix { HighChartsBarGraphInfo data = new HighChartsBarGraphInfo(); data = ReportDal.GetReportProjectFundsAtLocation(); return(data); }
public static IList <PieUtility> GetReportProjectsFunds() { IList <PieUtility> listOfPieUtility = new List <PieUtility>(); listOfPieUtility = ReportDal.GetReportProjectsFunds(); return(listOfPieUtility); }
public override void DataBind() { using (ReportDal DataAccess = new ReportDal()) { String YearMonth = txtYearMonth.Text; //if (!string.IsNullOrEmpty(YearMonth)&&(YearMonth.Length>6)) YearMonth = YearMonth.Substring(0, 4) + YearMonth.Substring(5, 2); PlantBonusRepeater.DataSource = DataAccess.GetPlantBonus(YearMonth); } base.DataBind(); }
public override void DataBind() { using (ReportDal DataAccess = new ReportDal()) { String YearMonth = txtYearMonth.Text; String SpecialField = Request.Params["SpecialField"]; //if (!string.IsNullOrEmpty(YearMonth)&&(YearMonth.Length>6)) YearMonth = YearMonth.Substring(0, 4) + YearMonth.Substring(5, 2); ShiftBonusRepeater.DataSource = DataAccess.GetShiftScoreAndBonus(YearMonth, SpecialField); } base.DataBind(); ColSpan(); }
public override void DataBind() { using (ReportDal DataAccess = new ReportDal()) { String YearMonth = ""; // txtYearMonth.Text; String SpecialField = Request.Params["SpecialField"]; if (!string.IsNullOrEmpty(YearMonth) && (YearMonth.Length > 6)) { YearMonth = YearMonth.Substring(0, 4) + YearMonth.Substring(5, 2); } DateTime StartDate = Convert.ToDateTime(txtStartDate.Text); DateTime EndDate = Convert.ToDateTime(txtEndDate.Text); ScoreRepeater.DataSource = DataAccess.GetShiftScore(StartDate, EndDate, SpecialField); } base.DataBind(); ColSpan(); }
private void barButtonItem2_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { try { DateTime dateBegin = this.itemDateBegin.EditValue == null ? DateTime.Now : ConvertUtil.ToDatetime(this.itemDateBegin.EditValue); DateTime dateEnd = this.itemDateEnd.EditValue == null ? DateTime.Now : ConvertUtil.ToDatetime(this.itemDateEnd.EditValue); using (WaitDialogForm form = new WaitDialogForm("查询时间可能需要几分钟,请耐心等待。")) { Stopwatch sw = new Stopwatch(); sw.Start(); this.gridControl1.DataSource = ReportDal.SummaryByPersonnel(dateBegin, dateEnd);//SummaryByPersonnel(dateBegin, dateEnd); sw.Stop(); Console.WriteLine(sw.Elapsed.TotalSeconds); } } catch (Exception ex) { MsgBox.Err(ex.Message); } }
public override void DataBind() { using (ReportDal DataAccess = new ReportDal()) { String YearMonth = txtYearMonth.Text; String SpecialField = Request.Params["SpecialField"]; string position = ddlPosition.SelectedValue; if (!string.IsNullOrEmpty(YearMonth) && (YearMonth.Length > 6)) { YearMonth = YearMonth.Substring(0, 4) + YearMonth.Substring(5, 2); } List <PersonScoreEntity> resultDataList = DataAccess.GetPersonScore(YearMonth, SpecialField); if (position != "ALL") { resultDataList = resultDataList.Where(r => r.PositionID == position).ToList(); } PersonScoreRepeater.DataSource = resultDataList; } base.DataBind(); ColSpan(); }
public static Int64 CheckReportSnapMonitoringExist(string datefrom, string dateto) { int countrows = ReportDal.Report_SP_RPT_SNAP_MONITORING_Exist(datefrom, dateto); return(countrows); }
public static Int64 CheckReportStaffWorkingExist(string datefrom, string dateto) { int countrows = ReportDal.Report_SP_RPT_STAFF_WORKING_Exist(datefrom, dateto); return(countrows); }
public static Int64 CheckReportWorkDetailExist(string datefrom, string dateto) { int countrows = ReportDal.Report_SP_RPT_WORKDETAIL_Exist(datefrom, dateto); return(countrows); }
private void bar_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { DateTime dateStart = ConvertUtil.ToDatetime(this.deStartTime.EditValue); DateTime dateEnd = ConvertUtil.ToDatetime(this.deEndTime.EditValue); this.gridView1.Columns.Clear(); this.gridControl1.RefreshDataSource(); using (WaitDialogForm dialog = new WaitDialogForm()) { switch (e.Item.Tag.ToString()) { case "配货率": this.bindingSource1.DataSource = ReportDal.GetDistribution(dateStart.Date, dateEnd.Date); this.groupControl1.Text = string.Format("{0} - {1} 配货率", dateStart.ToString("yyyy-MM-dd"), dateEnd.ToString("yyyy-MM-dd")); break; case "发货率": this.bindingSource1.DataSource = ReportDal.GetDelivery(dateStart.Date, dateEnd.Date); this.groupControl1.Text = string.Format("{0} - {1} 发货率", dateStart.ToString("yyyy-MM-dd"), dateEnd.ToString("yyyy-MM-dd")); break; case "回款率": this.bindingSource1.DataSource = ReportDal.GetReturnedMoney(dateStart.Date, dateEnd.Date); this.groupControl1.Text = string.Format("{0} - {1} 回款率", dateStart.ToString("yyyy-MM-dd"), dateEnd.ToString("yyyy-MM-dd")); break; case "销售单配货单量": this.bindingSource1.DataSource = ReportDal.GetAllocationCargo(dateStart, dateEnd, 1); this.groupControl1.Text = string.Format("{0} - {1} 销售单 配货单量", dateStart, dateEnd); break; case "调拨单配货单量": this.bindingSource1.DataSource = ReportDal.GetAllocationCargo(dateStart, dateEnd, 2); this.groupControl1.Text = string.Format("{0} - {1} 调拨单 配货单量", dateStart, dateEnd); break; case "配货件数": this.bindingSource1.DataSource = ReportDal.GetPickedCount(dateStart, dateEnd); this.groupControl1.Text = string.Format("{0} - {1} 配货件数", dateStart, dateEnd); break; case "配货金额": this.bindingSource1.DataSource = ReportDal.GetPickedAmount(dateStart, dateEnd); this.groupControl1.Text = string.Format("{0} - {1} 配货金额", dateStart, dateEnd); break; case "配货平均件数": this.bindingSource1.DataSource = ReportDal.GetCountAvg(dateStart, dateEnd); this.groupControl1.Text = string.Format("{0} - {1} 配货平均件数", dateStart, dateEnd); break; case "销售单验货单量": this.bindingSource1.DataSource = ReportDal.GetExamineCargoCrop(dateStart, dateEnd, 1); this.groupControl1.Text = string.Format("{0} - {1} 销售单 验货单量", dateStart, dateEnd); break; case "调拨单验货单量": this.bindingSource1.DataSource = ReportDal.GetExamineCargoCrop(dateStart, dateEnd, 2); this.groupControl1.Text = string.Format("{0} - {1} 调拨单 验货单量", dateStart, dateEnd); break; case "销售单装车单量": this.bindingSource1.DataSource = ReportDal.GetTruckCropD(dateStart, dateEnd, 1); this.groupControl1.Text = string.Format("{0} - {1} 销售单 装车单量", dateStart, dateEnd); break; case "调拨单装车单量": this.bindingSource1.DataSource = ReportDal.GetTruckCropD(dateStart, dateEnd, 2); this.groupControl1.Text = string.Format("{0} - {1} 调拨单 装车单量", dateStart, dateEnd); break; case "销售单装车金额": this.bindingSource1.DataSource = ReportDal.GetTruckPriceD(dateStart, dateEnd, 1); this.groupControl1.Text = string.Format("{0} - {1} 销售单 装车金额", dateStart.ToString("yyyy-MM-dd"), dateEnd.ToString("yyyy-MM-dd")); break; case "调拨单装车金额": this.bindingSource1.DataSource = ReportDal.GetTruckPriceD(dateStart, dateEnd, 2); this.groupControl1.Text = string.Format("{0} - {1} 调拨单 装车金额", dateStart, dateEnd); break; case "送货总金额": this.bindingSource1.DataSource = ReportDal.GetDeliverGoodsPrice(dateStart.Date, dateEnd.Date); this.groupControl1.Text = string.Format("{0} - {1} 送货总金额", dateStart.ToString("yyyy-MM-dd"), dateEnd.ToString("yyyy-MM-dd")); break; case "配送完成单量": this.bindingSource1.DataSource = ReportDal.GetTruckCrop(dateStart, dateEnd); this.groupControl1.Text = string.Format("{0} - {1} 配送完成单量", dateStart.ToString("yyyy-MM-dd"), dateEnd.ToString("yyyy-MM-dd")); break; case "配送完成件数": this.bindingSource1.DataSource = ReportDal.GetTruckCount(dateStart, dateEnd); this.groupControl1.Text = string.Format("{0} - {1} 配送完成件数", dateStart.ToString("yyyy-MM-dd"), dateEnd.ToString("yyyy-MM-dd")); break; case "验收单量": this.bindingSource1.DataSource = ReportDal.GetCheckCrop(dateStart.Date, dateEnd.Date); this.groupControl1.Text = string.Format("{0} - {1} 验收单量", dateStart.ToString("yyyy-MM-dd"), dateEnd.ToString("yyyy-MM-dd")); break; case "验收金额": this.bindingSource1.DataSource = ReportDal.GetCheckPrice(dateStart.Date, dateEnd.Date); this.groupControl1.Text = string.Format("{0} - {1} 验收金额", dateStart.ToString("yyyy-MM-dd"), dateEnd.ToString("yyyy-MM-dd")); break; case "打印发货单量": this.bindingSource1.DataSource = ReportDal.GetPrintDeliverGoodsCrop(dateStart.Date, dateEnd.Date); this.groupControl1.Text = string.Format("{0} - {1} 打印发货单量", dateStart.ToString("yyyy-MM-dd"), dateEnd.ToString("yyyy-MM-dd")); break; case "收货单量与件数": DataTable table = ReportDal.GetAsnBillCountAndTotalPiece(dateStart, dateEnd); this.bindingSource1.DataSource = table; this.groupControl1.Text = string.Format("{0} - {1} 收货单量与件数", dateStart.ToString("yyyy-MM-dd"), dateEnd.ToString("yyyy-MM-dd")); this.gridView1.Columns[0].SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Count; this.gridView1.Columns[0].SummaryItem.DisplayFormat = "共计:{0:f0} 单"; this.gridView1.Columns[0].SummaryItem.FieldName = "订单编号"; this.gridView1.Columns[1].SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Sum; this.gridView1.Columns[1].SummaryItem.DisplayFormat = "共计: {0:f0} 件"; this.gridView1.Columns[1].SummaryItem.FieldName = "总件数"; break; case "退货统计": table = ReportDal.GetCrnReport(dateStart, dateEnd); this.bindingSource1.DataSource = table; this.groupControl1.Text = string.Format("{0} - {1} 退货单统计", dateStart.ToString("yyyy-MM-dd"), dateEnd.ToString("yyyy-MM-dd")); this.gridView1.Columns[0].SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Count; this.gridView1.Columns[0].SummaryItem.DisplayFormat = "共计:{0:f0} 单"; this.gridView1.Columns[0].SummaryItem.FieldName = "订单编号"; this.gridView1.Columns[2].SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Sum; this.gridView1.Columns[2].SummaryItem.DisplayFormat = "共计:{0:f0}"; this.gridView1.Columns[2].SummaryItem.FieldName = "件数"; this.gridView1.Columns[3].SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Sum; this.gridView1.Columns[3].SummaryItem.DisplayFormat = "共计:{0:f0}"; this.gridView1.Columns[3].SummaryItem.FieldName = "上架数"; break; } } }
private string ProcessData(string data) { context context = JsonConvert.DeserializeObject <context>(data); if (context.Mode == "Post") { if (context.Function == "Insertreport") { DataModel dm = JsonConvert.DeserializeObject <DataModel>(context.Content.ToString()); //var dm = context.Content as DataModel; bool res = false; try { ReportDal rd = new ReportDal(); res = rd.Insertreport(dm.name, dm.content, dm.path, dm.timeCreate, dm.timeModify, dm.timeAccess); } catch (Exception e) { File.AppendAllLines(path, new string[] { $"{DateTime.Now.ToLongTimeString()}:操作数据库 Insertreport 异常:{e.ToString()} ." }); //throw; } context.Content = res ? "Success" : "Failure"; string restr = JsonConvert.SerializeObject(context); return(restr); } return(""); } if (context.Mode == "Get") { if (context.Function == "GetReportSingleContent") { var name = context.Content as string; //object res = null; byte[] bytes = null; try { ReportDal rd = new ReportDal(); var res = rd.GetReportSingleContent(name); bytes = res as byte[]; } catch (Exception e) { File.AppendAllLines(path, new string[] { $"{DateTime.Now.ToLongTimeString()}:操作数据库 GetReportSingleContent 异常:{e.ToString()} ." }); //throw; } string restr2 = JsonConvert.SerializeObject(bytes); context.Content = restr2; string restr = JsonConvert.SerializeObject(context); return(restr); } else if (context.Function == "GetReportSingle") { var name = context.Content as string; DataSet res = null; try { ReportDal rd = new ReportDal(); res = rd.GetReportSingle(name); } catch (Exception e) { File.AppendAllLines(path, new string[] { $"{DateTime.Now.ToLongTimeString()}:操作数据库 GetReportSingle 异常:{e.ToString()} ." }); //throw; } string restr2 = JsonConvert.SerializeObject(res); context.Content = restr2; string restr = JsonConvert.SerializeObject(context); return(restr); } else if (context.Function == "GetreportLimitN") { var dm = Convert.ToInt32(context.Content); DataSet res = null; try { ReportDal rd = new ReportDal(); res = rd.GetreportLimitN(dm); } catch (Exception e) { File.AppendAllLines(path, new string[] { $"{DateTime.Now.ToLongTimeString()}:操作数据库 GetreportLimitN 异常:{e.ToString()} ." }); //throw; } string restr2 = JsonConvert.SerializeObject(res); context.Content = restr2; string restr = JsonConvert.SerializeObject(context); return(restr); } return(""); } throw new NotImplementedException(); }