protected override Infragistics.WebUI.UltraWebGrid.UltraGridRow GetGridRow(object obj) { InvRCardForQuery inv = obj as InvRCardForQuery; if (inv == null) { return(null); } Infragistics.WebUI.UltraWebGrid.UltraGridRow ur = null; if (this._type == "ship") { ur = new UltraGridRow( new object[] { inv.RunningCard, inv.CartonCode, inv.MOCode, inv.PlanQty, inv.ActQty, inv.RecNO, inv.ShipUser, FormatHelper.ToDateString(inv.ShipDate) } ); } else { ur = new UltraGridRow( new object[] { inv.RunningCard, inv.CartonCode, inv.MOCode, inv.PlanQty, inv.ActQty, RCardStatus.GetName(inv.RCardStatus), inv.ReceiveUser, FormatHelper.ToDateString(inv.ReceiveDate) } ); } return(ur); }
private void _helper_DomainObjectToExportRow(object sender, EventArgs e) { if (!this.chbExpDetail.Checked) { #region 导出二级界面 BenQGuru.eMES.Common.Domain.IDomainDataProvider provider = null; try { provider = base.DataProvider; BenQGuru.eMES.Material.InventoryFacade facade = new InventoryFacade(provider); if ((e as DomainObjectToExportRowEventArgs).DomainObject != null) { BenQGuru.eMES.Domain.Material.InvReceive obj = (e as DomainObjectToExportRowEventArgs).DomainObject as BenQGuru.eMES.Domain.Material.InvReceive; /*int sum = facade.QueryInvReceiveWebSum(obj.RecNo, * obj.RecSeq, * this.drpStatus.SelectedValue, * this.dateInDateFromQuery.Text, * this.dateInDateToQuery.Text, * this.txtModel.Text.Trim(), * this.txtItemCode.Text.Trim(), * this.txtRCardFrom.Text.Trim(), * this.txtRCardTo.Text);*/ (e as DomainObjectToExportRowEventArgs).ExportRow = new string[] { obj.RecNo, obj.RecType, obj.ModelCode, obj.ItemCode, obj.ItemDesc, GetReceiveStausName(obj.RecStatus), obj.PlanQty.ToString(), obj.ActQty.ToString(), obj.Description, string.Empty }; } } finally { if (provider != null) { ((BenQGuru.eMES.Common.DomainDataProvider.SQLDomainDataProvider)provider).PersistBroker.CloseConnection(); } } #endregion } else { #region 导出二级界面 BenQGuru.eMES.Common.Domain.IDomainDataProvider provider = null; try { provider = base.DataProvider; BenQGuru.eMES.Material.InventoryFacade facade = new InventoryFacade(provider); if ((e as DomainObjectToExportRowEventArgs).DomainObject != null) { BenQGuru.eMES.Domain.Material.ReceiveRCard obj = (e as DomainObjectToExportRowEventArgs).DomainObject as BenQGuru.eMES.Domain.Material.ReceiveRCard; (e as DomainObjectToExportRowEventArgs).ExportRow = new string[] { obj.RecNo, obj.RecType, obj.ModelCode, obj.ItemCode, obj.ItemDesc, GetReceiveStausName(obj.RecStatus), obj.ActQty.ToString(), obj.Description, obj.RunningCard, RCardStatus.GetName(obj.RCardStatus), obj.ReceiveUser, FormatHelper.ToDateString(obj.ReceiveDate), obj.CartonCode }; } } finally { if (provider != null) { ((BenQGuru.eMES.Common.DomainDataProvider.SQLDomainDataProvider)provider).PersistBroker.CloseConnection(); } } #endregion } }