Beispiel #1
0
        public ActionResult QuotationApprovalStatus(int id, int status)
        {
            var pqvm = new PurchaseQuotationViewModel();

            pqvm.quoteApproval = _repPurchaseQuotation.ChangeQuotationApprovalStatus(id, status);
            pqvm.approveId     = id;

            //Quotation Details
            pqvm.quotationDetails = _repPurchaseQuotation.GetQuotationDetails(id);

            if (pqvm.quoteApproval == 1)
            {
                var userMailer = new UserMailer();

                var msg = userMailer.PurchaseQuotationEmail(new PurchaseQuotationEmailViewModel
                {
                    To = "*****@*****.**",
                    //To = "*****@*****.**",
                    AssetName         = pqvm.quotationDetails.AssetName,
                    ModelNo           = pqvm.quotationDetails.Model,
                    Category          = pqvm.quotationDetails.AssetCategoryName,
                    Manufacturer      = pqvm.quotationDetails.Manufacturer,
                    ConfigurationInfo = pqvm.quotationDetails.ConfigurationInfo,
                    QuotedDate        = pqvm.quotationDetails.QuotedDate.ToString(),
                    PurchaseType      = pqvm.quotationDetails.PurchaseType,
                    TotalCost         = pqvm.quotationDetails.TotalCost,
                }).SendAsync();
            }

            return(Content(pqvm.quoteApproval.ToString()));
            //return PartialView(pqvm);
            //return pqvm;
        }