public ucLemSheetQuery() { InitializeComponent(); Init(); SetData(new List <LemHeader>()); _fileMgr = new ucFileManager(MobileCommon.HMCon, GuiCommon.HMDevXManager, DocumentViewerMode.All, true, "F", true); _fileMgr.Dock = DockStyle.Fill; _fileMgr.Parent = dpAttachment; _fileMgr.ReadOnly = true; }
public ucFieldPO() { InitializeComponent(); btnSubmit.Enabled = false; _fileMgr = new ucFileManager(MobileCommon.HMCon, GuiCommon.HMDevXManager, DocumentViewerMode.All, false, "F", true); _fileMgr.Dock = DockStyle.Fill; _fileMgr.Parent = dpAttachment; _fileMgr.AttachmentsRemoved += AttachmentsRemoved; _fileMgr.AttachmentsAdded += AttachmentsAdded; _fileMgr.AttachmentsEdited += AttachmentsEdited; _fileMgr.Enabled = false; luColSupplier.DataSource = Supplier.ListForCompany().Select(s => new { SupplierCode = s.SupplierCode, SupplierName = s.SupplierName }); luColSupplierName.DataSource = Supplier.ListForCompany().Select(s => new { SupplierCode = s.SupplierCode, SupplierName = s.SupplierName }); luColProjectCode.DataSource = Project.AccessibleList().Select(p => new { MatchId = p.MatchId, Code = p.Code, Project = p.Name }).ToList(); luColProjectName.DataSource = Project.AccessibleList().Select(p => new { MatchId = p.MatchId, Code = p.Code, Project = p.Name }).ToList(); var level1CodeList = LevelOneCode.ListForCompany().Select(code => new { MatchId = code.MatchId, Code = code.Code, Desc = code.Desc, DisplayName = code.DisplayName }).Distinct().ToList(); luDetailLevel1All.DataSource = level1CodeList.OrderBy(x => x.MatchId); var level2CodeList = LevelTwoCode.ListForCompany().Select(code => new { MatchId = code.MatchId, Code = code.Code, Desc = code.Desc, DisplayName = code.DisplayName }).Distinct().ToList(); luDetailLevel2All.DataSource = level2CodeList.OrderBy(x => x.MatchId); var level3CodeList = LevelThreeCode.ListForCompany().Select(code => new { MatchId = code.MatchId, Code = code.Code, Desc = code.Desc, DisplayName = code.DisplayName }).Distinct().ToList(); luDetailLevel3All.DataSource = level3CodeList.OrderBy(x => x.MatchId); var level4CodeList = LevelFourCode.ListForCompany().Select(code => new { MatchId = code.MatchId, Code = code.Code, Desc = code.Desc, DisplayName = code.DisplayName }).Distinct().ToList(); luDetailLevel4All.DataSource = level4CodeList.OrderBy(x => x.MatchId); luDetailComponent.DataSource = Enum.GetValues(typeof(EnumComponentType)).Cast <EnumComponentType>().Select(x => new { Type = Enum.GetName(typeof(EnumComponentType), x), Enum = (char)x }); int maxLevel = Company.GetCurrCompany().MaxLevelCode; var SetColumn = new Action <GridColumn, int, string>((col, level, caption) => { col.Visible = maxLevel >= level; col.OptionsColumn.ShowInCustomizationForm = maxLevel >= level; col.Caption = caption; }); SetColumn(colDetailLevel4Code, 4, Company.GetCurrCompany().Level4CodeDesc); SetColumn(colDetailLevel3Code, 3, Company.GetCurrCompany().Level3CodeDesc); SetColumn(colDetailLevel2Code, 2, Company.GetCurrCompany().Level2CodeDesc); SetColumn(colDetailLevel1Code, 1, Company.GetCurrCompany().Level1CodeDesc); }
public ucLemHeader() { InitializeComponent(); luProject.Properties.DataSource = Project.AccessibleList().Select(p => new { Project = p.Name, Code = p.Code, MatchId = p.MatchId, DisplayName = p.DisplayName }); luStatus.Properties.DataSource = GetEnums <EnumLogStatus>().Select(x => new { Status = GetEnumName(x) }); luColProjectCode.DataSource = Project.AccessibleList().Select(p => new { MatchId = p.MatchId, Code = p.Code, Project = p.Name }).ToList(); luColProjectName.DataSource = Project.AccessibleList().Select(p => new { MatchId = p.MatchId, Code = p.Code, Project = p.Name }).ToList(); luColLogAllStatus.DataSource = GetEnums <EnumLogStatus>().Select(x => new { Status = GetEnumName(x), Enum = (char)x }); luColLogStatus.DataSource = new EnumLogStatus[] { EnumLogStatus.Pending, EnumLogStatus.Approved }.Select(x => new { Status = GetEnumName(x), Enum = (char)x }); _fileMgr = new ucFileManager(HMCon, HMDevXManager, DocumentViewerMode.All, false, "F", true); _fileMgr.Dock = DockStyle.Fill; _fileMgr.Parent = dpAttachment; _fileMgr.AttachmentsRemoved += AttachmentsRemoved; _fileMgr.AttachmentsAdded += AttachmentsAdded; _fileMgr.AttachmentsEdited += AttachmentsEdited; _fileMgr.Enabled = false; ClearAll(); }