Example #1
0
        private Model.User GetInfoOnUpdate(User info)
        {
            User query = this.Get(info.UserID);

            // 這裡填要塞的資料
            query.UserName         = info.UserName;
            query.TitleID          = info.TitleID;
            query.OnboardDate      = info.OnboardDate;
            query.PermissionID     = info.PermissionID;
            query.SupervisorID     = info.SupervisorID;
            query.DepartmentID     = info.DepartmentID;
            query.Telephone        = info.Telephone;
            query.Address          = info.Address;
            query.Email            = info.Email;
            query.AnnualTarget     = info.AnnualTarget;
            query.QuotationLevelID = info.QuotationLevelID;
            query.Password         = info.Password;
            query.BeginDate        = info.BeginDate;
            query.EndDate          = info.EndDate;
            query.Remarks          = info.Remarks;
            query.Activate         = info.Activate;
            query.LastPerson       = IdentityService.GetUserData().UserID;
            query.LastUpdate       = DateTime.Now;
            return(query);
        }
Example #2
0
        private Quotation GetQuotationOnUpdate(QuotationComplex source)
        {
            // Update 時不是所有欄位都讀出審核的部分沒資料出不能直接用automapper
            //
            Quotation temp = Mapper.Map <Quotation>(source.Quotation);
            Quotation info = this._Repository.Get(x => x.QuotationID == source.Quotation.QuotationID);

            info.QuotationID     = temp.QuotationID;
            info.QuotationDate   = temp.QuotationDate;
            info.WarehouseID     = temp.WarehouseID;
            info.CustomerID      = temp.CustomerID;
            info.TaxID           = temp.TaxID;
            info.ContactPerson   = temp.ContactPerson;
            info.ContactPhone    = temp.ContactPhone;
            info.InvoiceAddress  = temp.InvoiceAddress;
            info.ShippingAddress = temp.ShippingAddress;
            info.ShippingModeID  = temp.ShippingModeID;
            info.ShippingFee     = temp.ShippingFee;
            info.Total           = temp.Total;
            info.Remarks         = temp.Remarks;
            info.QuotePerson     = temp.QuotePerson;
            info.ValidateDate    = temp.ValidateDate;
            info.Activate        = temp.Activate;

            info.LastPerson = IdentityService.GetUserData().UserID;
            info.LastUpdate = DateTime.Now;

            return(info);
        }
Example #3
0
 private Model.Receipt GetInfoOnCreate(Receipt info)
 {
     info.ReceiptID  = GenerateID(info);
     info.LastPerson = IdentityService.GetUserData().UserID;
     info.LastUpdate = DateTime.Now;
     return(info);
 }
Example #4
0
        private Inspection GetTargetOnClose(Inspection model)
        {
            #region 取資料
            Inspection query = this.Get(model.ID_Inspection);
            #endregion

            #region 邏輯驗證
            if (query == null)//沒有資料
            {
                throw new Exception("MessageNoData".ToLocalized());
            }
            #endregion

            query.ID_Status = model.ID_Status;
            query.CX_Modify = IdentityService.GetUserData().UserID;
            query.DT_Modfiy = DateTime.Now;

            // 狀態是結案寫入結案日期
            if (model.ID_Status == Status.Close.Value)
            {
                query.CX_Close = IdentityService.GetUserData().UserID;
                query.DT_Close = DateTime.Now;
            }
            return(query);
        }
Example #5
0
        private Inspection GetTargetOnUpdate(Inspection model)
        {
            #region 取資料
            Inspection query = this.Get(model.ID_Inspection);
            #endregion

            #region 邏輯驗證
            if (query == null)//沒有資料
            {
                throw new Exception("MessageNoData".ToLocalized());
            }
            #endregion

            query.ID_Country     = model.ID_Country;
            query.ID_Store       = model.ID_Store;
            query.ID_Workplace   = model.ID_Workplace;
            query.ID_Feedback    = model.ID_Feedback;
            query.ID_Observation = model.ID_Observation;
            query.ID_Track       = model.ID_Track;
            query.CX_Content     = model.CX_Content;
            query.CX_Date        = model.CX_Date;

            query.ID_Status = model.ID_Status;
            query.CX_Modify = IdentityService.GetUserData().UserID;
            query.DT_Modfiy = DateTime.Now;

            query.Inspection_Image = model.Inspection_Image;

            return(query);
        }
Example #6
0
 private ProductImage GetChildOnDelete(ProductImage info)
 {
     info.Activate   = InvoiceStatus.Invalid.Value;
     info.LastPerson = IdentityService.GetUserData().UserID;
     info.LastUpdate = DateTime.Now;
     return(info);
 }
        private StockChange GetInfoOnUpdate(StockChangeComplex source)
        {
            StockChange info = Mapper.Map <StockChange>(source.StockChange);

            info.LastPerson = IdentityService.GetUserData().UserID;
            info.LastUpdate = DateTime.Now;
            return(info);
        }
Example #8
0
        private Inquiry GetInquiryOnUpdate(InquiryComplex source)
        {
            Inquiry info = Mapper.Map <Inquiry>(source.Inquiry);

            info.LastPerson = IdentityService.GetUserData().UserID;
            info.LastUpdate = DateTime.Now;
            return(info);
        }
Example #9
0
        private Model.Purchase GetInfoOnUpdate(Purchase info)
        {
            Purchase query = this.Get(info.PurchaseID);

            query.LastPerson = IdentityService.GetUserData().UserID;
            query.LastUpdate = DateTime.Now;
            return(query);
        }
        private SalesInvoice GetSalesInvoiceOnUpdate(SalesInvoiceComplex source)
        {
            SalesInvoice info = Mapper.Map <SalesInvoice>(source.Invoice);

            info.LastPerson = IdentityService.GetUserData().UserID;
            info.LastUpdate = DateTime.Now;
            return(info);
        }
Example #11
0
        private Sales GetSalesOnUpdate(SalesComplex source)
        {
            Sales info = Mapper.Map <Sales>(source.Sales);

            info.LastPerson = IdentityService.GetUserData().UserID;
            info.LastUpdate = DateTime.Now;
            return(info);
        }
Example #12
0
        private BankDeposit GetInfoOnUpdate(BankDeposit source)
        {
            BankDeposit info = Mapper.Map <BankDeposit>(source);

            info.LastPerson = IdentityService.GetUserData().UserID;
            info.LastUpdate = DateTime.Now;
            return(info);
        }
Example #13
0
        private Receipt GetInfoOnUpdate(Receipt source)
        {
            Receipt info = Mapper.Map <Receipt>(source);

            info.LastPerson = IdentityService.GetUserData().UserID;
            info.LastUpdate = DateTime.Now;
            return(info);
        }
Example #14
0
        private Payment GetInfoOnUpdate(Payment source)
        {
            Payment info = Mapper.Map <Payment>(source);

            info.LastPerson = IdentityService.GetUserData().UserID;
            info.LastUpdate = DateTime.Now;
            return(info);
        }
Example #15
0
        private Purchase GetPurchaseOnUpdate(PurchaseComplex source)
        {
            Purchase info = Mapper.Map <Purchase>(source.Purchase);

            info.LastPerson = IdentityService.GetUserData().UserID;
            info.LastUpdate = DateTime.Now;
            return(info);
        }
Example #16
0
 private Model.Purchase GetInfoOnCreate(Purchase info)
 {
     // 取得產品號;目前由使用者自型輸入
     info.PurchaseID = GenerateInquiryID(info);
     info.LastPerson = IdentityService.GetUserData().UserID;
     info.LastUpdate = DateTime.Now;
     return(info);
 }
Example #17
0
        private Quotation GetQuotationOnAudit(QuotationComplex source)
        {
            Quotation info = Mapper.Map <Quotation>(source.Quotation);

            info.LastPerson = IdentityService.GetUserData().UserID;
            info.LastUpdate = DateTime.Now;

            return(info);
        }
        private PurchaseInvoice GetPurchaseInvoiceOnCreate(PurchaseInvoiceComplex source)
        {
            PurchaseInvoice info = Mapper.Map <PurchaseInvoice>(source.Invoice);

            // 取得詢價單號;目前由使用者自型輸入
            info.InvoiceID  = GenerateInvoiceID(info);
            info.LastPerson = IdentityService.GetUserData().UserID;
            info.LastUpdate = DateTime.Now;
            return(info);
        }
Example #19
0
        private Quotation GetQuotationOnCreate(QuotationComplex source)
        {
            Quotation info = Mapper.Map <Quotation>(source.Quotation);

            // 取得詢價單號;目前由使用者自型輸入
            info.QuotationID = GenerateQuotationID(info);
            info.LastPerson  = IdentityService.GetUserData().UserID;
            info.LastUpdate  = DateTime.Now;
            return(info);
        }
Example #20
0
        private Inquiry GetInquiryOnCreate(InquiryComplex source)
        {
            Inquiry info = Mapper.Map <Inquiry>(source.Inquiry);

            // 取得詢價單號;目前由使用者自型輸入
            info.InquiryID  = GenerateInquiryID(info);
            info.Activate   = YesNo.Yes.Value;
            info.LastPerson = IdentityService.GetUserData().UserID;
            info.LastUpdate = DateTime.Now;
            return(info);
        }
Example #21
0
        private Sales GetSalesOnCreate(SalesComplex source)
        {
            Sales info = Mapper.Map <Sales>(source.Sales);

            // 取得詢價單號;目前由使用者自型輸入
            info.SalesID = GenerateSalesID(info);
            //info.PostingTime = DateTime.Today;
            info.LastPerson = IdentityService.GetUserData().UserID;
            info.LastUpdate = DateTime.Now;
            return(info);
        }
Example #22
0
        private Model.Brand GetInfoOnUpdate(Brand info)
        {
            Brand query = this.Get(info.BrandID);

            // 這裡填要塞的資料
            query.BrandName  = info.BrandName;
            query.Activate   = info.Activate;
            query.LastPerson = IdentityService.GetUserData().UserID;
            query.LastUpdate = DateTime.Now;
            return(query);
        }
        private StockChange GetInfoOnCreate(StockChangeComplex source)
        {
            StockChange info = Mapper.Map <StockChange>(source.StockChange);

            // 取得詢價單號;目前由使用者自型輸入
            info.StockChangeID = GenerateKey(info);
            //info.PostingTime = DateTime.Today;
            info.LastPerson = IdentityService.GetUserData().UserID;
            info.LastUpdate = DateTime.Now;
            return(info);
        }
Example #24
0
        private Purchase GetPurchaseOnCreate(PurchaseComplex source)
        {
            Purchase info = Mapper.Map <Purchase>(source.Purchase);

            // 取得詢價單號;目前由使用者自型輸入
            info.PurchaseID = GeneratePurchaseID(info);
            //info.PostingTime = DateTime.Today;
            info.LastPerson = IdentityService.GetUserData().UserID;
            info.LastUpdate = DateTime.Now;
            return(info);
        }
Example #25
0
        private Model.Alternative GetInfoOnUpdate(Alternative info)
        {
            Alternative query = this.Get(info.SeqNo);

            // 這裡填要塞的資料
            query.AlternativeID    = info.AlternativeID;
            query.Remarks          = info.Remarks;
            query.AlternativeCount = info.AlternativeCount;
            query.LastPerson       = IdentityService.GetUserData().UserID;
            query.LastUpdate       = DateTime.Now;
            return(query);
        }
Example #26
0
        private List <ProductImage> GetChildOnCreate(ProductImageComplex source)
        {
            List <ProductImage> infos = new List <ProductImage>();

            foreach (var item in source.ChildList)
            {
                ProductImage temp = Mapper.Map <ProductImage>(item);
                temp.LastPerson = IdentityService.GetUserData().UserID;
                temp.LastUpdate = DateTime.Now;
                infos.Add(temp);
            }
            return(infos);
        }
Example #27
0
        private List <PurchaseDetail> GetChildOnCreate(Purchase master, PurchaseComplex source)
        {
            List <PurchaseDetail> infos = new List <PurchaseDetail>();
            var wanted = source.ChildList.Where(x => x.IsDirty == true);

            foreach (var item in wanted)
            {
                PurchaseDetail temp = Mapper.Map <PurchaseDetail>(item);
                temp.PurchaseID = master.PurchaseID;
                temp.LastPerson = IdentityService.GetUserData().UserID;
                temp.LastUpdate = DateTime.Now;
                infos.Add(temp);
            }
            return(infos);
        }
Example #28
0
        private Model.News GetInfoOnUpdate(News info)
        {
            News query = this.Get(info.NewsID);

            // 這裡填要塞的資料
            query.DepartmentID = info.DepartmentID;
            query.NewsTypeID   = info.NewsTypeID;
            query.ReleaseDate  = info.ReleaseDate;
            query.OffDate      = info.OffDate;
            query.SetTop       = info.SetTop;
            query.Content      = info.Content;
            query.Remarks      = info.Remarks;
            query.Activate     = info.Activate;
            query.LastPerson   = IdentityService.GetUserData().UserID;
            query.LastUpdate   = DateTime.Now;
            return(query);
        }
Example #29
0
        private Model.BankAccount GetInfoOnUpdate(BankAccount info)
        {
            BankAccount query = this.Get(info.SeqNo);

            // 這裡填要塞的資料
            query.BankID        = info.BankID;
            query.AccountID     = info.AccountID;
            query.BankName      = info.BankName;
            query.AccountName   = info.AccountName;
            query.InitialAmount = info.InitialAmount;
            query.InitialDate   = info.InitialDate;
            query.LastNumber    = info.LastNumber;
            query.LastDate      = info.LastDate;
            query.Remarks       = info.Remarks;
            query.LastPerson    = IdentityService.GetUserData().UserID;
            query.LastUpdate    = DateTime.Now;
            return(query);
        }
Example #30
0
        private Inspection GetTaget(Inspection model)
        {
            #region 取資料
            Inspection query = this.Get(model.ID_Inspection);
            #endregion

            #region 邏輯驗證
            if (query == null)//沒有資料
            {
                throw new Exception("MessageNoData".ToLocalized());
            }
            #endregion

            #region 變為Models需要之型別及邏輯資料
            query.CX_DealWith      = model.CX_DealWith;
            query.ID_Status        = model.ID_Status;
            query.Inspection_Image = model.Inspection_Image;

            query.CX_Process = IdentityService.GetUserData().UserID;
            query.DT_Process = DateTime.Now;
            #endregion

            return(query);
        }