コード例 #1
0
        public ActionResult CalTagPartialView(int quoteId)
        {
            _activeQuoteSrv.UserVM = UserVM;
            CalTagViewModel calTagVM = _activeQuoteSrv.GetCalTagInfo(quoteId);

            calTagVM.QuoteID = quoteId;
            return(PartialView("../TCPViews/Partial/Quote/CallTagPartial", calTagVM));
        }
コード例 #2
0
        public ActionResult CalTagInfo(FormCollection calTagCollection)
        {
            CalTagViewModel calTagVM = new CalTagViewModel();

            calTagVM.QuoteID        = Convert.ToInt32(calTagCollection.GetValues("quoteId").ToList().FirstOrDefault());
            calTagVM.LstSendOptions = new List <ComboBase>();
            string optID = calTagCollection.GetValues("LstSendOptions").ToList().FirstOrDefault() != null?calTagCollection.GetValues("LstSendOptions").ToList().FirstOrDefault() : "";

            calTagVM.LstSendOptions.Add(new ComboBase {
                ItemID = optID
            });
            calTagVM.Email = calTagCollection.GetValues("txtEmail") != null?calTagCollection.GetValues("txtEmail").ToList().FirstOrDefault() : "";

            calTagVM.FutureDate   = calTagCollection.GetValues("FutureDate").ToList().FirstOrDefault() != null ? !string.IsNullOrEmpty(calTagCollection.GetValues("FutureDate").ToList().FirstOrDefault().ToString()) ? Convert.ToDateTime(calTagCollection.GetValues("FutureDate").ToList().FirstOrDefault()) : DateTime.UtcNow : DateTime.UtcNow;
            calTagVM.IsCataloging = calTagCollection.GetValues("IsCataloging").ToList().FirstOrDefault() != null?string.IsNullOrEmpty(calTagCollection.GetValues("IsCataloging").ToList().FirstOrDefault()) ? Convert.ToBoolean(calTagCollection.GetValues("IsCataloging").ToList().FirstOrDefault()) : false : false;

            calTagVM.PONo = calTagCollection.GetValues("txtPoNo").ToList().FirstOrDefault() != null?calTagCollection.GetValues("txtPoNo").ToList().FirstOrDefault() : "";

            calTagVM.InvoiceTo = calTagCollection.GetValues("ddlInvoiceTo").ToList().FirstOrDefault() != null?calTagCollection.GetValues("ddlInvoiceTo").ToList().FirstOrDefault() : "";

            _activeQuoteSrv.UserVM = UserVM;
            _activeQuoteSrv.InsertCalTagInfo(calTagVM);
            return(RedirectToAction("ActiveQuote", "ActiveQuote"));
        }