public ActionResult vendorreply(string orderid)
        {
            DateTime       indianTime     = TimeZoneInfo.ConvertTimeFromUtc(DateTime.UtcNow, INDIAN_ZONE);
            var            s1             = ViewBag.orderdetails = orderService.allorderslist1().ToList().Where(m => m.orderid == long.Parse(orderid)).FirstOrDefault();
            var            userdata       = userLoginDetailsService.GetUserId((int)s1.cutomerid);
            var            userdetails    = userLoginDetailsService.GetUser((int)s1.cutomerid);
            QuotationsList quotationsList = new QuotationsList();
            var            s12            = ViewBag.orderdetails = orderService.allorderslist1().ToList().Where(m => m.orderid == long.Parse(orderid)).ToList();

            var vendordetails = newmanageuse.getvendor(Convert.ToInt32(s1.vid));
            List <SPGETNpkg_Result> package  = new List <SPGETNpkg_Result>();
            List <SPGETNpkg_Result> package1 = new List <SPGETNpkg_Result>();
            List <SPGETNpkg_Result> package2 = new List <SPGETNpkg_Result>();

            package = viewservicesss.getvendorpkgs(Convert.ToString(s1.vid));



            txtto = vendordetails.EmailId;
            string vname = vendordetails.BusinessName;

            ViewBag.name     = vendordetails.BusinessName;
            ViewBag.Email    = vendordetails.EmailId;
            ViewBag.bookdate = s1.bookdate.ToString();
            ViewBag.orderid  = orderid;
            return(View());
        }
Esempio n. 2
0
        public void  OpenTheQuoteByIdAndReachTheQuotationPage()
        {
            NavigationHelper.NavigateToUrl(ObjectRepository.Config.GetWebSite());
            DropDownListHelper.SelectElementByText(By.Id("cmbCompanies"), "Vered Hasharon");
            LoginPagePOM    veredLog    = new LoginPagePOM(ObjectRepository.Driver);
            WelcomToTcoPage veredWelcom = veredLog.ClickLogin(ObjectRepository.Config.GetVeredUser(), ObjectRepository.Config.GetVeredPassword());
            QuotationsList  verdquote   = veredWelcom.ClickIncoming();

            //  var mainWindow = BrowserHelper.GettheParentPage();

            verdquote.ticTcheckBoxAll();
            verdquote.clickShowButton();

            // make sure that you are in the right page -->assert the title of the page

            Assert.AreEqual("QUOTATION / GROUPS LIST", verdquote.PageTitle, "the titles are not equals");
            var HoverAnElement = ObjectRepository.Driver.FindElement(By.XPath("//td[@id='ctl00_ContentPlaceHolder1_mnuTopn0']//a[contains(text(),'Sheets')]"));
            var ElementClick   = ObjectRepository.Driver.FindElement(By.XPath("//a[contains(text(),'Open Calc.sheet/Group by number')]"));

            MouseActionsHelper.HoverAndClick(ObjectRepository.Driver, HoverAnElement, ElementClick);

            //switch to the new frame by invoking   OpenExistingQuote Method
            GenericHelper.OpenExistingQuote(TestContext.DataRow["QuotationId"].ToString());
            Thread.Sleep(2000);
            //switch to the new window
            BrowserHelper.SwitchToWindow(1);
        }
Esempio n. 3
0
 public static void Test_LoggInVeredHasharon()
 {
     NavigationHelper.NavigateToUrl(ObjectRepository.Config.GetWebSite());
     DropDownListHelper.SelectElementByText(By.Id("cmbCompanies"), "Vered Hasharon");
     LoginPagePOM    veredLog    = new LoginPagePOM(ObjectRepository.Driver);
     WelcomToTcoPage veredWelcom = veredLog.ClickLogin(ObjectRepository.Config.GetVeredUser(), ObjectRepository.Config.GetVeredPassword());
     QuotationsList  verdquote   = veredWelcom.ClickIncoming();
 }
Esempio n. 4
0
        public static void SelectIncoming()
        {
            LoginFromConfigFile();
            LoginPagePOM   LogMe     = new LoginPagePOM(ObjectRepository.Driver);
            QuotationsList quoteList = LogMe.WelcomToTco.ClickIncoming();

            //Assert that you are in the right page
            Assert.AreEqual("QUOTATION / GROUPS LIST", quoteList.PageTitle, "the titles are not equals");
            var HoverAnElement = ObjectRepository.Driver.FindElement(By.XPath("//td[@id='ctl00_ContentPlaceHolder1_mnuTopn0']//a[contains(text(),'Sheets')]"));
            var ElementClick   = ObjectRepository.Driver.FindElement(By.XPath("//a[contains(text(),'New Calc.sheet')]"));

            MouseActionsHelper.HoverAndClick(ObjectRepository.Driver, HoverAnElement, ElementClick);
        }
        public int UpdateQuote(QuotationsList quotationsList)
        {
            var GetMasterRecord = _dbContext.QuotationsList.FirstOrDefault(m => m.Id == quotationsList.Id);

            GetMasterRecord.FirstTime           = quotationsList.FirstTime;
            GetMasterRecord.FirstTimeQuoteDate  = quotationsList.FirstTimeQuoteDate;
            GetMasterRecord.SecondTime          = quotationsList.SecondTime;
            GetMasterRecord.SecondTimeQuoteDate = quotationsList.SecondTimeQuoteDate;
            GetMasterRecord.ThirdTime           = quotationsList.ThirdTime;
            GetMasterRecord.ThirdTimeQuoteDate  = quotationsList.ThirdTimeQuoteDate;
            GetMasterRecord.Status = "Quote Replied";
            _dbContext.Entry(GetMasterRecord).CurrentValues.SetValues(quotationsList);
            int count = _dbContext.SaveChanges();

            return(count);
        }
Esempio n. 6
0
        public static void SelectIncomingToursAndOpenById()
        {
            LoginFromConfigFile();
            LoginPagePOM   LogMe     = new LoginPagePOM(ObjectRepository.Driver);
            QuotationsList quoteList = LogMe.WelcomToTco.ClickIncoming();
            string         FilePath  = @"E:\Users\Bassam\Documents\Training\DataDriven\ExcelTestData\TcoData.xlsx";

            //Assert that you are in the right page
            Assert.AreEqual("QUOTATION / GROUPS LIST", quoteList.PageTitle, "the titles are not equals");
            var HoverAnElement = ObjectRepository.Driver.FindElement(By.XPath("//td[@id='ctl00_ContentPlaceHolder1_mnuTopn0']//a[contains(text(),'Sheets')]"));
            var ElementClick   = ObjectRepository.Driver.FindElement(By.XPath("//a[contains(text(),'Open Calc.sheet/Group by number')]"));

            MouseActionsHelper.HoverAndClick(ObjectRepository.Driver, HoverAnElement, ElementClick);

            //switch to the new frame by invoking   OpenExistingQuote Method
            GenericHelper.OpenExistingQuote(ExcelReaderHelper.GetCelldata(FilePath, "Quotations", 1, 0).ToString());
        }
 public int AddQuotationList(QuotationsList quotationsList)
 {
     _dbContext.QuotationsList.Add(quotationsList);
     _dbContext.SaveChanges();
     return(1);
 }
 public int UpdateQuote(QuotationsList quotationsList)
 {
     return(quotationListsRepository.UpdateQuote(quotationsList));
 }
 public int AddQuotationList(QuotationsList quotationsList)
 {
     return(quotationListsRepository.AddQuotationList(quotationsList));
 }
        public JsonResult ParticularQuoteReply(QuotationsList quoteResponse, string id, HttpPostedFileBase data1, string message, string replyto, string messagetype, string ext)
        {
            DateTime           indianTime     = TimeZoneInfo.ConvertTimeFromUtc(DateTime.UtcNow, INDIAN_ZONE);
            var                s1             = orderService.allorderslist1().ToList().Where(m => m.orderid == long.Parse(quoteResponse.OrderID)).FirstOrDefault();
            var                userdata       = userLoginDetailsService.GetUserId((int)s1.cutomerid);
            var                userdetails    = userLoginDetailsService.GetUser((int)s1.cutomerid);
            QuotationsList     quotationsList = new QuotationsList();
            var                s12            = ViewBag.orderdetails = orderService.allorderslist1().ToList().Where(m => m.orderid == long.Parse(quoteResponse.OrderID)).ToList();
            HttpPostedFileBase image1;

            if (ext != null || ext != "" || ext != "undefined")
            {
                image1 = Request.Files["/Quotefile/" + ext + ""];
            }
            else
            {
                image1 = null;
            }
            if (replyto == "Vendor")
            {
                //  quotationsList.EmailId = userdata.UserName; quotationsList.Name = userdetails.FirstName;
                var vendordetails = newmanageuse.getvendor(Convert.ToInt32(s1.vid));

                string txtto1 = vendordetails.EmailId;
                string vname  = vendordetails.BusinessName;
                //  vname = home.Capitalise(vname);
            }
            else if (replyto == "Customer")
            {
                quotationsList.EmailId = s1.username; quotationsList.Name = s1.fname;
            }
            quotationsList.ServiceType    = s1.servicetype;
            quotationsList.PhoneNo        = s1.customerphoneno;
            quotationsList.EventStartDate = Convert.ToDateTime(s1.bookdate);
            quotationsList.EventStartTime = DateTime.UtcNow;
            quotationsList.EventEnddate   = DateTime.UtcNow;
            quotationsList.EventEndtime   = DateTime.UtcNow;
            quotationsList.VendorId       = ""; quotationsList.OrderID = quoteResponse.OrderID;

            quotationsList.VendorMasterId = s1.vid.ToString();
            quotationsList.Persons        = s1.guestno.ToString();
            string ip = HttpContext.Request.UserHostAddress;

            quotationsList.IPaddress   = ip;
            quotationsList.UpdatedTime = DateTime.UtcNow;
            quotationsList.Status      = "Active";
            quotationsList.Reply_Type  = messagetype;
            quotationsList.ReplyToType = replyto;
            quotationsList.Description = message;

            quotationListsService.AddQuotationList(quotationsList);

            if (replyto == "Vendor")
            {
                mail = "/mailtemplate/kansiris1.html";
            }
            else if (replyto == "Customer")
            {
                mail = "/mailtemplate/kansiris.html";
            }
            FileInfo File = new FileInfo(Server.MapPath(mail));

            //  FileInfo File = new FileInfo(Server.MapPath("/mailtemplate/QuoteReply.html"));
            string        readFile = File.OpenText().ReadToEnd();
            StringBuilder cds      = new StringBuilder();
            StringBuilder cds1     = new StringBuilder();

            if (replyto == "Vendor")
            {
                var vendordetails = newmanageuse.getvendor(Convert.ToInt32(s1.vid));
                txtto = vendordetails.EmailId;
                string vname = vendordetails.BusinessName;
                readFile = readFile.Replace("[name]", vendordetails.BusinessName);
                readFile = readFile.Replace("[Email]", vendordetails.EmailId);
                // readFile = readFile.Replace("[bookdate]", s1.bookdate.ToString());
                cds1.Append("<table style='width: 70 %;border: 1px solid #fffff;'><tbody style='width: 70 %;border: 1px solid #fffff;'>");
                // cds1.Append("<tr><td style='width: 70 %;border: 1px solid #fffff;'></td><td style='width: 70 %;border: 1px solid #fffff;'><strong> Event Type</strong> </td></tr>");
                cds1.Append("<tr><td style='width: 70 %;border: 1px solid #fffff;'>  <p>" + "<strong>No. of Guests:</strong> " + s1.guestno + "</p> <p><strong>Event Type:</strong> " + s1.eventtype + "</p> <p><strong>Event Date:</strong> " + s1.bookdate + " </td> </tr>");
                cds1.Append("</tbody></table>");
                cds.Append("<table class='example - table'><tbody>");
                // cds.Append("<tr><td ><strong>Packgename</strong></td><td ><strong> Ahwanam Price</strong> </td><td ><strong> Market Price </strong> </td><td><strong>Availablity(Yes/No)</strong> </td></tr>");
                foreach (var item in s12)
                {
                    string image;
                    if (item.logo != null)
                    {
                        image = "/vendorimages/" + item.logo.Trim(',') + "";
                    }
                    else
                    {
                        image = "/noimages.png";
                    }
                    cds.Append("<tr><td style='width: 70 %;border: 1px solid #000;'>  <p>" + "<strong>Packgename:</strong>" + item.packagename + "</p><strong><p>Please provide the information for booking :</p><p>Date Available: Y / N(if no pls give alternate available date)</p><p>Package Price for Customer incl GST:</p><p>Package Price for Ahwanam incl GST:</p> </strong> </td></tr></tr>");
                }
                cds.Append("</tbody></table>");
            }
            else if (replyto == "Customer")
            {
                readFile = readFile.Replace("[name]", s1.fname);
                readFile = readFile.Replace("[Email]", s1.username);
                txtto    = s1.username;
                cds.Append("<table style='width:70%;'><tbody>");
                cds.Append("<tr><td style = 'width:20%;'></td><td><strong> Details</strong> </td><td> <strong>Event Type</strong> </td><td><strong>Total Amount</strong></td></tr>");
                foreach (var item in s12)
                {
                    string image;
                    if (item.logo != null)
                    {
                        image = "/vendorimages/" + item.logo.Trim(',') + "";
                    }
                    else
                    {
                        image = "/noimages.png";
                    }
                    cds.Append("<tr><td style = 'width:20%;'>  <img src = " + image + " style='height: 182px;width: 132px;'/></td><td style = '' > <p>" + "<strong>Business Name: </strong>" + item.BusinessName + "</p><p>" + "<strong>Packgename: </strong>" + item.packagename + "</p><p>" + "<strong>Price/person:</strong> " + '₹' + item.perunitprice.ToString().Replace(".00", "") + "</p><p>" + "<strong>No. of Guests:</strong> " + item.guestno + "</p> </td><td > " + item.eventtype + " </td><td style = ''><p>" + '₹' + item.totalprice.ToString().Replace(".00", "") + "</p> </td> </tr>");
                }
                cds.Append("</tbody></table>");
            }
            if (message == "")
            {
                message = null;
            }
            readFile = readFile.Replace("[message]", message);
            string url = Request.Url.Scheme + "://" + Request.Url.Authority;

            readFile = readFile.Replace("[ActivationLink]", url);
            readFile = readFile.Replace("[name]", name);
            readFile = readFile.Replace("[orderid]", quoteResponse.OrderID);
            readFile = readFile.Replace("[table]", cds.ToString());
            readFile = readFile.Replace("[table1]", cds1.ToString());
            string txtmessage = readFile;
            string subj       = "Response to your Quote #" + s1.orderid + "";
            EmailSendingUtility emailSendingUtility = new EmailSendingUtility();

            emailSendingUtility.Email_maaaahwanam(txtto, txtmessage, subj, image1);
            return(Json("Success"));
        }