95 lines
3.5 KiB
C#
95 lines
3.5 KiB
C#
using System;
|
|
using System.Drawing;
|
|
using System.Collections;
|
|
using System.ComponentModel;
|
|
using DevExpress.XtraReports.UI;
|
|
using System.Data;
|
|
using WMS.Model.Stock;
|
|
using System.Collections.Generic;
|
|
|
|
|
|
namespace WMS.FrmStock
|
|
{
|
|
public partial class ReportStorageRep : DevExpress.XtraReports.UI.XtraReport
|
|
{
|
|
public ReportStorageRep(StorageRepModel model, List<StorageRepInfoModel> list)
|
|
{
|
|
InitializeComponent();
|
|
if (string.IsNullOrEmpty(model.REMARK))
|
|
{
|
|
this.xrRemark.Text = string.Empty;
|
|
}
|
|
for (int i = 0; i < list.Count; i++)
|
|
{
|
|
list[i].SORT = i + 1;
|
|
}
|
|
bgsStorage.DataSource = model;
|
|
|
|
|
|
|
|
bgsGoods.DataSource = list;
|
|
DetailReport.DataSource = bgsGoods;
|
|
}
|
|
|
|
private static ReportStorageRep reportStorageToStorage;
|
|
public static ReportStorageRep GetInstance(StorageRepModel model, List<StorageRepInfoModel> list)
|
|
{
|
|
reportStorageToStorage = new ReportStorageRep(model, list);
|
|
return reportStorageToStorage;
|
|
}
|
|
|
|
|
|
//public void Print(string name)
|
|
//{
|
|
// this.Print(name);
|
|
//}
|
|
|
|
///// <summary>
|
|
///// 根据传入的仓库调拨单号打印移库单
|
|
///// </summary>
|
|
///// <param name="OrderID"></param>
|
|
//public void SetData(StorageRepModel model)
|
|
//{
|
|
// model.STOREP_ID = "CB2014011810027";
|
|
// if (string.IsNullOrEmpty(model.STOREP_ID))
|
|
// {
|
|
// return;
|
|
// }
|
|
// string str = Newtonsoft.Json.JsonConvert.SerializeObject(model);
|
|
// string MainStr = WebLockConfig.Instance.WebStorageRep.GetStorageRepData(str);
|
|
|
|
// DataTable mainTable = Newtonsoft.Json.JsonConvert.DeserializeObject<DataTable>(MainStr);
|
|
|
|
// string DetStr = WebLockConfig.Instance.WebStorageRep.GetStorageRepInfoData(model.STOREP_ID);
|
|
// DataTable DetTable = Newtonsoft.Json.JsonConvert.DeserializeObject<DataTable>(DetStr);
|
|
|
|
// if (mainTable != null && mainTable.Rows.Count > 0)
|
|
// {
|
|
// this.BindMainTable(mainTable);
|
|
// this.BindDetailsTable(DetTable);
|
|
// }
|
|
//}
|
|
////绑定明细数据
|
|
//private void BindDetailsTable(DataTable DetTable)
|
|
//{
|
|
// this.DetailReport.DataSource = DetTable;
|
|
// cellGoodsID.DataBindings.Add("Text", DetTable, "GOODS_ID");
|
|
// cellGoodsName.DataBindings.Add("Text", DetTable, "GOODS_NAME");
|
|
// cellGoodsPrice.DataBindings.Add("Text", DetTable, "PRICE");
|
|
// cellTotal.DataBindings.Add("Text", DetTable, "SHEVLS_NUM");
|
|
// cellCount.DataBindings.Add("Text", DetTable, "GOODSOUT_COUNT");
|
|
// cellUnit.DataBindings.Add("Text", DetTable, "UNIT");
|
|
// //cellDetailRemark.DataBindings.Add("Text", DetTable, "REMARK");
|
|
//}
|
|
////绑定主表数据
|
|
//private void BindMainTable(DataTable mainTable)
|
|
//{
|
|
// this.xrNo.Text = mainTable.Rows[0]["STOREP_ID"].ToString();
|
|
// this.xrStorageOut.Text = mainTable.Rows[0]["STOSTART_ID"].ToString();
|
|
// this.xrStorageIn.Text = mainTable.Rows[0]["STOEND_ID"].ToString();
|
|
// this.xrPersion.Text = mainTable.Rows[0]["CREATE_MAN"].ToString();
|
|
// this.xrDateTime.Text = mainTable.Rows[0]["CREATE_DATE"].ToString();
|
|
//}
|
|
}
|
|
}
|