protected DataRow GetGridRow(object obj) { //this.gridHelper.AddColumn("OPBOMItemCode", "子阶料料号", null); //this.gridHelper.AddColumn("OPBOMItemName", "子阶料名称", null); //this.gridHelper.AddColumn("OPBOMSourceItemCode", "首选料", null); //this.gridHelper.AddColumn("OPBOMItemQty", "单机用量", null); //this.gridHelper.AddColumn("OPBOMItemUOM", "计量单位", null); //this.gridHelper.AddColumn("OPBOMItemEffectiveDate", "生效日期", null); //this.gridHelper.AddColumn("OPBOMItemInvalidDate", "失效日期", null); //this.gridHelper.AddColumn("OPBOMItemECN", "ECN号码", null); //this.gridHelper.AddColumn("ItemControlType", "管控类型", null); //this.gridHelper.AddColumn("OPBOMParseType", "解析方式", null); //this.gridHelper.AddColumn("OPBOMCheckType", "检查类型", null); //this.gridHelper.AddColumn("SNLength", "序列号长度", null); //this.gridHelper.AddColumn("MaterialDesc", "物料描述", null); //this.gridHelper.AddColumn("NeedVendor", "必须有供应商", null); //this.gridHelper.AddDefaultColumn(true, true); //this.gridWebGrid.Columns.FromKey("OPBOMItemECN").Hidden = true; ////多语言 //this.gridHelper.ApplyLanguage(this.languageComponent1); DataRow row = this.DtSource.NewRow(); row["OPBOMItemSeq"] = ((OPBOMDetail)obj).OPBOMItemSeq.ToString(); row["OPBOMItemCode"] = ((OPBOMDetail)obj).OPBOMItemCode.ToString(); row["OPBOMItemName"] = ((OPBOMDetail)obj).OPBOMItemName.ToString(); row["OPBOMSourceItemCode"] = ((OPBOMDetail)obj).OPBOMSourceItemCode.ToString(); row["OPBOMItemQty"] = ((OPBOMDetail)obj).OPBOMItemQty.ToString(); row["OPBOMItemUOM"] = ((OPBOMDetail)obj).OPBOMItemUOM.ToString(); row["OPBOMItemEffectiveDate"] = FormatHelper.ToDateString(((OPBOMDetail)obj).OPBOMItemEffectiveDate); row["OPBOMItemInvalidDate"] = FormatHelper.ToDateString(((OPBOMDetail)obj).OPBOMItemInvalidDate); row["OPBOMItemECN"] = ((OPBOMDetail)obj).OPBOMItemECN.ToString(); row["ItemControlType"] = this.languageComponent1.GetString(((OPBOMDetail)obj).OPBOMItemControlType.ToString()); row["OPBOMParseType"] = MOModelPublic.TranslateParseType(((OPBOMDetail)obj).OPBOMParseType.ToString(), this.languageComponent1); row["OPBOMCheckType"] = MOModelPublic.TranslateCheckType(((OPBOMDetail)obj).OPBOMCheckType.ToString(), this.languageComponent1); row["SNLength"] = ((OPBOMDetail)obj).SerialNoLength.ToString(); row["MaterialDesc"] = ((OPBOMDetail)obj).EAttribute1.ToString(); row["NeedVendor"] = this.languageComponent1.GetString(((OPBOMDetail)obj).NeedVendor.ToString()); return(row); }
protected DataRow GetGridRow(object obj) { DataRow row = this.DtSource.NewRow(); row["MaterialCode"] = ((Domain.MOModel.Material)obj).MaterialCode.ToString(); row["MaterialName"] = ((Domain.MOModel.Material)obj).MaterialName == null ? "" : ((Domain.MOModel.Material)obj).MaterialName; row["MaterialControlType"] = this.languageComponent1.GetString(((Domain.MOModel.Material)obj).MaterialControlType.ToString()); row["ParseType"] = ((Domain.MOModel.Material)obj).MaterialParseType == null ? "" : MOModelPublic.TranslateParseType(((Domain.MOModel.Material)obj).MaterialParseType, this.languageComponent1); row["CheckType"] = ((Domain.MOModel.Material)obj).MaterialCheckType == null ? "" : MOModelPublic.TranslateCheckType(((Domain.MOModel.Material)obj).MaterialCheckType, this.languageComponent1); row["CheckStatus"] = FormatHelper.DisplayBoolean(((Domain.MOModel.Material)obj).CheckStatus, this.languageComponent1); row["SNLength"] = ((Domain.MOModel.Material)obj).SerialNoLength.ToString(); row["MaterialDesc"] = ((Domain.MOModel.Material)obj).MaterialDescription == null ? "" : ((Domain.MOModel.Material)obj).MaterialDescription; row["VerdorCode"] = ((Domain.MOModel.Material)obj).GetDisplayText("VendorCode"); row["NeedVendor"] = this.languageComponent1.GetString(((Domain.MOModel.Material)obj).NeedVendor.ToString()); row["IsSMTMaterial"] = this.languageComponent1.GetString(((Domain.MOModel.Material)obj).IsSMT.ToString()); row["OrganizationID"] = ((Domain.MOModel.Material)obj).OrganizationID.ToString(); return(row); }