public DTO.ClientPaymentMng.EditSupportList GetEditSupportData() { DAL.Support.DataFactory factory = new Support.DataFactory(); DTO.ClientPaymentMng.EditSupportList dtoSupport = new DTO.ClientPaymentMng.EditSupportList(); dtoSupport.Users = factory.GetUser().ToList(); return(dtoSupport); }
public DTO.WarehouseTransportMng.EditSupportList GetEditSupportData() { DAL.Support.DataFactory factory = new Support.DataFactory(); DTO.WarehouseTransportMng.EditSupportList dtoSupport = new DTO.WarehouseTransportMng.EditSupportList(); dtoSupport.Users = factory.GetUser().ToList(); dtoSupport.FromWarehouseAreas = GetPhysicalStockByWarehouseArea(); dtoSupport.ToWarehouseAreas = factory.GetAllWarehouseArea().ToList(); dtoSupport.Seasons = factory.GetSeason().ToList(); return(dtoSupport); }
public DTO.DocumentMonitoringMng.EditSupportList GetEditSupportData() { DAL.Support.DataFactory support_factory = new Support.DataFactory(); DTO.DocumentMonitoringMng.EditSupportList dtoSupport = new DTO.DocumentMonitoringMng.EditSupportList(); using (DocumentMonitoringMngEntities context = CreateContext()) { dtoSupport.DefaultRemarks = converter.DB2DTO_DefaultRemark(context.List_DocumentMonitoringRemark_View.ToList()); dtoSupport.Users = support_factory.GetUser().ToList(); } return(dtoSupport); }
public override DTO.ShowroomReceiptMng.EditFormData GetData(int id, out Library.DTO.Notification notification) { DTO.ShowroomReceiptMng.EditFormData editFormData = new DTO.ShowroomReceiptMng.EditFormData(); notification = new Library.DTO.Notification() { Type = Library.DTO.NotificationType.Success }; try { using (ShowroomReceiptMngEntities context = CreateContext()) { if (id > 0) { ShowroomReceiptMng_ShowroomReceipt_View dbItem; dbItem = context.ShowroomReceiptMng_ShowroomReceipt_View .Include("ShowroomReceiptMng_ShowroomReceiptDetail_View") .FirstOrDefault(o => o.ShowroomReceiptID == id); editFormData.Data = converter.DB2DTO_ShowroomReceipt(dbItem); } else { editFormData.Data = new DTO.ShowroomReceiptMng.ShowroomReceipt(); editFormData.Data.ShowroomReceiptDetails = new List <DTO.ShowroomReceiptMng.ShowroomReceiptDetail>(); editFormData.Data.Season = DALBase.Helper.GetCurrentSeason(); editFormData.Data.ReceiptDate = DateTime.Now.ToString("dd/MM/yyyy");; } //get support list DAL.Support.DataFactory support_factory = new Support.DataFactory(); editFormData.Users = support_factory.GetUser().ToList(); editFormData.Showrooms = support_factory.GetShowroom(); editFormData.Seasons = support_factory.GetSeason().ToList(); return(editFormData); } } catch (Exception ex) { notification.Type = Library.DTO.NotificationType.Error; notification.Message = ex.Message; if (ex.InnerException != null && !string.IsNullOrEmpty(ex.InnerException.Message)) { notification.DetailMessage.Add(ex.InnerException.Message); } return(editFormData); } }