Beispiel #1
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);
        }
Beispiel #2
0
 private Model.BankDeposit GetInfoOnCreate(BankDeposit info)
 {
     info.LastPerson = IdentityService.GetUserData().UserID;
     info.LastUpdate = DateTime.Now;
     return(info);
 }
Beispiel #3
0
 private Model.Receivable GetInfoOnCreate(Receivable info)
 {
     info.LastPerson = IdentityService.GetUserData().UserID;
     info.LastUpdate = DateTime.Now;
     return(info);
 }
Beispiel #4
0
        //private void ProcessPayment(string accountMonth)
        //{
        //    // 付款資料
        //    var query = from u in this._Payment.GetAll()
        //                 .Where(x => x.Activate == YesNo.Yes.Value && x.AccountMonth == accountMonth)
        //                 select new
        //                 {
        //                     VoucherID = u.PaymentID,
        //                     CompanyID = u.SupplierID,
        //                     AccountMonth = u.AccountMonth,
        //                     DealDate = u.PayDate,
        //                     DealItem = DealItem.Payment.Text,
        //                     PaymentAmountTotal = u.CheckAmount + u.CashAmount,
        //                     PaymentDiscount = u.DiscountAmount,
        //                     PaymentDeduct = u.ReturnAmount,
        //                 };

        //    query.ToList().ForEach(x =>
        //    {
        //        var info = new Receivable()
        //        {
        //            VoucherID = x.VoucherID,
        //            CompanyID = x.CompanyID,
        //            AccountMonth = x.AccountMonth,
        //            DealDate = x.DealDate,
        //            DealItem = x.DealItem,
        //            PaymentAmountTotal = x.PaymentAmountTotal,
        //            PaymentDiscount = x.PaymentDiscount,
        //            PaymentDeduct = x.PaymentDeduct
        //        };

        //        info = ProcessReceivable(info);
        //        this._Repository.Create(info);
        //    });
        //}
        #endregion

        #region ProcessReceipt
        //private void ProcessReceipt(string accountMonth)
        //{
        //    // 付款資料
        //    var query = from u in this._Receipt.GetAll()
        //                 .Where(x => x.Activate == YesNo.Yes.Value && x.AccountMonth == accountMonth)
        //                select new
        //                {
        //                    VoucherID = u.ReceiptID,
        //                    CompanyID = u.CustomerID,
        //                    AccountMonth = u.AccountMonth,
        //                    DealDate = u.ReceiptDate,
        //                    DealItem = DealItem.Receipt.Text,
        //                    ReceiptAmountTotal = u.CheckAmount + u.CashAmount,
        //                    SalesDiscountTotal = u.DiscountAmount,
        //                    SalesDeductTotal = u.ReturnAmount,
        //                };

        //    query.ToList().ForEach(x =>
        //    {
        //        var info = new Receivable()
        //        {
        //            VoucherID = x.VoucherID,
        //            CompanyID = x.CompanyID,
        //            AccountMonth =x.AccountMonth,
        //            DealDate = x.DealDate,
        //            DealItem = x.DealItem,
        //            ReceiptAmountTotal = x.ReceiptAmountTotal,
        //            SalesDiscountTotal = x.SalesDiscountTotal,
        //            SalesDeductTotal = x.SalesDeductTotal,
        //        };

        //        info = ProcessReceivable(info);
        //        this._Repository.Create(info);
        //    });
        //}
        #endregion

        private Receivable ProcessReceivable(Receivable info)
        {
            info.LastPerson = IdentityService.GetUserData().UserID;
            info.LastUpdate = DateTime.Now;
            return(info);
        }
Beispiel #5
0
 private Model.Alternative GetInfoOnCreate(Alternative info)
 {
     info.LastPerson = IdentityService.GetUserData().UserID;
     info.LastUpdate = DateTime.Now;
     return(info);
 }
Beispiel #6
0
 private Inspection GetTargetOnCreate(Inspection model)
 {
     model.DT_Create = DateTime.Now;
     model.CX_Create = IdentityService.GetUserData().UserID;
     return(model);
 }