예제 #1
0
        private List <string> CheckOriginNet(FeesInOriginNet oNEt)
        {
            List <string> errors = new List <string>();

            if (oNEt.IsChina)
            {
                if (oNEt.Others.Value == 0 &&
                    oNEt.CIQ.Value == 0 &&
                    oNEt.CO.Value == 0 &&
                    oNEt.Courier.Value == 0 &&
                    oNEt.CustomsClearance.Value == 0 &&
                    oNEt.Insurance.Value == 0 &&
                    oNEt.SealFees.Value == 0 &&
                    oNEt.THC.Value == 0 &&
                    oNEt.Truck.Value == 0)
                {
                    errors.Add("Origin Selling Net amounts Missing");
                }
            }
            else
            {
                if (oNEt.EuropeAllIn.Value == 0)
                {
                    errors.Add("Origin Selling Net amounts Missing");
                }
            }
            return(errors);
        }
예제 #2
0
        // GET: /FeesInOriginNet/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            FeesInOriginNet sub_feesinoriginnet = db.FeesInOriginNet.Find(id);

            if (sub_feesinoriginnet == null)
            {
                return(HttpNotFound());
            }
            ViewBag.CIQCurrencyID              = new SelectList(db.Currency, "CurrencyID", "CurrencyCode", sub_feesinoriginnet.CIQCurrencyID);
            ViewBag.COCurrencyID               = new SelectList(db.Currency, "CurrencyID", "CurrencyCode", sub_feesinoriginnet.COCurrencyID);
            ViewBag.CourierCurrencyID          = new SelectList(db.Currency, "CurrencyID", "CurrencyCode", sub_feesinoriginnet.CourierCurrencyID);
            ViewBag.CustomsClearanceCurrencyID = new SelectList(db.Currency, "CurrencyID", "CurrencyCode", sub_feesinoriginnet.CustomsClearanceCurrencyID);
            ViewBag.EuropeAllInCurrencyID      = new SelectList(db.Currency, "CurrencyID", "CurrencyCode", sub_feesinoriginnet.EuropeAllInCurrencyID);
            ViewBag.InsuranceCurrencyID        = new SelectList(db.Currency, "CurrencyID", "CurrencyCode", sub_feesinoriginnet.InsuranceCurrencyID);
            ViewBag.OthersCurrencyID           = new SelectList(db.Currency, "CurrencyID", "CurrencyCode", sub_feesinoriginnet.OthersCurrencyID);
            ViewBag.SealFeesCurrencyID         = new SelectList(db.Currency, "CurrencyID", "CurrencyCode", sub_feesinoriginnet.SealFeesCurrencyID);
            ViewBag.THCCurrencyID              = new SelectList(db.Currency, "CurrencyID", "CurrencyCode", sub_feesinoriginnet.THCCurrencyID);
            ViewBag.TruckCurrencyID            = new SelectList(db.Currency, "CurrencyID", "CurrencyCode", sub_feesinoriginnet.TruckCurrencyID);
            ViewBag.AdditionalField1CurrencyID = new SelectList(db.Currency, "CurrencyID", "CurrencyCode", sub_feesinoriginnet.AdditionalField1CurrencyID);
            ViewBag.AdditionalField2CurrencyID = new SelectList(db.Currency, "CurrencyID", "CurrencyCode", sub_feesinoriginnet.AdditionalField2CurrencyID);
            return(View(sub_feesinoriginnet));
        }
예제 #3
0
        // GET: /FeesInOriginNet/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            FeesInOriginNet sub_feesinoriginnet = db.FeesInOriginNet.Find(id);

            if (sub_feesinoriginnet == null)
            {
                return(HttpNotFound());
            }
            return(View(sub_feesinoriginnet));
        }
예제 #4
0
 public ActionResult Edit([Bind(Include = "TranID,Updated,Updator,IsChina,THC,THCCurrencyID,Truck,TruckCurrencyID,CIQ,CIQCurrencyID,CO,COCurrencyID,SealFees,SealFeesCurrencyID,Courier,CourierCurrencyID,Insurance,InsuranceCurrencyID,CustomsClearance,CustomsClearanceCurrencyID,Others,OthersCurrencyID,EuropeAllIn,EuropeAllInCurrencyID,AdditionalField1,AdditionalField1CurrencyID,AdditionalField2,AdditionalField2CurrencyID")] FeesInOriginNet sub_feesinoriginnet)
 {
     if (ModelState.IsValid)
     {
         db.Entry(sub_feesinoriginnet).State = EntityState.Modified;
         db.SaveChanges();
         //return RedirectToAction("Index");
         Calculations.CalcTran(sub_feesinoriginnet.TranID, 3);
         return(RedirectToAction("Details", "Tran", new { id = sub_feesinoriginnet.TranID }));
     }
     ViewBag.CIQCurrencyID              = new SelectList(db.Currency, "CurrencyID", "CurrencyCode", sub_feesinoriginnet.CIQCurrencyID);
     ViewBag.COCurrencyID               = new SelectList(db.Currency, "CurrencyID", "CurrencyCode", sub_feesinoriginnet.COCurrencyID);
     ViewBag.CourierCurrencyID          = new SelectList(db.Currency, "CurrencyID", "CurrencyCode", sub_feesinoriginnet.CourierCurrencyID);
     ViewBag.CustomsClearanceCurrencyID = new SelectList(db.Currency, "CurrencyID", "CurrencyCode", sub_feesinoriginnet.CustomsClearanceCurrencyID);
     ViewBag.EuropeAllInCurrencyID      = new SelectList(db.Currency, "CurrencyID", "CurrencyCode", sub_feesinoriginnet.EuropeAllInCurrencyID);
     ViewBag.InsuranceCurrencyID        = new SelectList(db.Currency, "CurrencyID", "CurrencyCode", sub_feesinoriginnet.InsuranceCurrencyID);
     ViewBag.OthersCurrencyID           = new SelectList(db.Currency, "CurrencyID", "CurrencyCode", sub_feesinoriginnet.OthersCurrencyID);
     ViewBag.SealFeesCurrencyID         = new SelectList(db.Currency, "CurrencyID", "CurrencyCode", sub_feesinoriginnet.SealFeesCurrencyID);
     ViewBag.THCCurrencyID              = new SelectList(db.Currency, "CurrencyID", "CurrencyCode", sub_feesinoriginnet.THCCurrencyID);
     ViewBag.TruckCurrencyID            = new SelectList(db.Currency, "CurrencyID", "CurrencyCode", sub_feesinoriginnet.TruckCurrencyID);
     ViewBag.AdditionalField1CurrencyID = new SelectList(db.Currency, "CurrencyID", "CurrencyCode", sub_feesinoriginnet.AdditionalField1CurrencyID);
     ViewBag.AdditionalField2CurrencyID = new SelectList(db.Currency, "CurrencyID", "CurrencyCode", sub_feesinoriginnet.AdditionalField2CurrencyID);
     return(View(sub_feesinoriginnet));
 }