public Vendormaster Updatevendordetailsnew(Vendormaster vendor, string email)
        {
            // Query the database for the row to be updated.
            var query =
                from ord in _dbContext.Vendormaster
                where ord.EmailId == email
                select ord;

            // Execute the query, and change the column values
            // you want to change.
            foreach (Vendormaster ord in query)
            {
                ord.BusinessName  = vendor.BusinessName;
                ord.Address       = vendor.Address;
                ord.City          = vendor.City;
                ord.State         = vendor.State;
                ord.Landmark      = vendor.Landmark;
                ord.ContactPerson = vendor.ContactPerson;
                ord.ContactNumber = vendor.ContactNumber;
                //ord.Description = vendor.Description;
                ord.LandlineNumber = vendor.LandlineNumber;
                ord.ZipCode        = vendor.ZipCode;
                // Insert any additional changes to column values.
            }

            // Submit the changes to the database.
            try
            {
                _dbContext.SaveChanges();
            }
            catch (Exception ex)
            {
            }
            return(vendor);
        }
Пример #2
0
        public Vendormaster getvendor(int vendorid)
        {
            string       response = string.Empty;
            Vendormaster list     = userDetailsRepository.getvendor(vendorid);

            return(list);
        }
 public Vendormaster AddvendorMaster(Vendormaster vendormaster)
 {
     vendormaster.Status      = "InActive";
     vendormaster.UpdatedDate = updateddate;
     //vendormaster.ServicType = "Venue";
     return(vendorVenueSignUpRepository.AddVendormaster(vendormaster));
 }
Пример #4
0
        public Vendormaster getvendor(int vendorid)
        {
            string       response = string.Empty;
            Vendormaster list     = newusermanager.getvendor(vendorid);

            return(list);
        }
 public VendorsOther UpdateOther(VendorsOther vendorsOther, Vendormaster vendorMaster, long masterid, long vid)
 {
     //string updateddate = DateTime.UtcNow.ToShortDateString();
     //vendorsDecorator.Status = "InActive";
     vendorsOther.UpdatedDate = updateddate;
     vendorsOther             = vendorOthersRepository.UpdateOthers(vendorsOther, masterid, vid);
     return(vendorsOther);
 }
Пример #6
0
        public Vendormaster UpdateVendorDetails(Vendormaster vendorMaster, long id)
        {
            var GetMasterRecord = _dbContext.Vendormaster.SingleOrDefault(m => m.Id == id);

            _dbContext.Entry(GetMasterRecord).CurrentValues.SetValues(vendorMaster);
            _dbContext.SaveChanges();
            return(vendorMaster);
        }
        //To Show the login user details in all pages at the top

        public Vendormaster getvendor(int vendorid)
        {
            Vendormaster list = new Vendormaster();

            if (vendorid != 0)
            {
                list = _dbContext.Vendormaster.SingleOrDefault(p => p.Id == vendorid);
            }
            return(list);
        }
Пример #8
0
        public VendorsOther AddNewOther(VendorsOther vendorsOther, Vendormaster vendorMaster)
        {
            string updateddate = DateTime.UtcNow.ToShortDateString();

            vendorsOther.Status         = "Active";
            vendorsOther.UpdatedDate    = Convert.ToDateTime(updateddate);
            vendorsOther.VendorMasterId = vendorMaster.Id;
            vendorsOther = vendorOthersRepository.AddOthers(vendorsOther);
            return(vendorsOther);
        }
Пример #9
0
        public VendorImage AddVendorImage(VendorImage vendorImage, Vendormaster vendorMaster)
        {
            DateTime updateddate = TimeZoneInfo.ConvertTimeFromUtc(DateTime.UtcNow, INDIAN_ZONE);

            vendorImage.Status         = "Active";
            vendorImage.UpdatedDate    = updateddate;
            vendorImage.VendorMasterId = vendorMaster.Id;
            vendorImage = vendorImageRepository.AddVendorImage(vendorImage);
            return(vendorImage);
        }
        public VendorsDecorator AddNewDecorator(VendorsDecorator vendorsDecorator, Vendormaster vendorMaster)
        {
            DateTime updateddate = TimeZoneInfo.ConvertTimeFromUtc(DateTime.UtcNow, INDIAN_ZONE);

            vendorsDecorator.Status         = "Active";
            vendorsDecorator.UpdatedDate    = updateddate;
            vendorsDecorator.VendorMasterId = vendorMaster.Id;
            vendorsDecorator = vendorsDecoratorRepository.AddDecorator(vendorsDecorator);
            return(vendorsDecorator);
        }
 public VendorsCatering UpdateCatering(VendorsCatering vendorsCatering, Vendormaster vendorMaster, long masterid, long vid)
 {
     //vendorsCatering.Status = "InActive";
     vendorsCatering.UpdatedDate = updateddate;
     //vendorMaster.Status = "InActive";
     vendorMaster.UpdatedDate = updateddate;
     //vendorMaster.ServicType = "Venue";
     vendorsCatering = vendorCateringRepository.UpdatesCatering(vendorsCatering, masterid, vid);
     return(vendorsCatering);
 }
Пример #12
0
        public VendorsGift AddNewGift(VendorsGift vendorsGift, Vendormaster vendorMaster)
        {
            string updateddate = DateTime.UtcNow.ToShortDateString();

            vendorsGift.Status         = "Active";
            vendorsGift.UpdatedDate    = Convert.ToDateTime(updateddate);
            vendorsGift.VendorMasterId = vendorMaster.Id;
            vendorsGift = vendorGiftsRepository.AddGifts(vendorsGift);
            return(vendorsGift);
        }
        public VendorsCatering AddNewCatering(VendorsCatering vendorsCatering, Vendormaster vendorMaster)
        {
            DateTime updateddate = TimeZoneInfo.ConvertTimeFromUtc(DateTime.UtcNow, INDIAN_ZONE);

            vendorsCatering.Status         = "Active";
            vendorsCatering.UpdatedDate    = updateddate;
            vendorsCatering.VendorMasterId = vendorMaster.Id;
            vendorsCatering = vendorCateringRespository.AddCatering(vendorsCatering);
            return(vendorsCatering);
        }
 public VendorVenue UpdateVenue(VendorVenue vendorVenue, Vendormaster vendorMaster, long masterid, long vid)
 {
     //vendorVenue.Status = "InActive";
     vendorVenue.UpdatedDate = updateddate;
     //vendorMaster.Status = "InActive";
     vendorMaster.UpdatedDate = updateddate;
     //vendorMaster.ServicType = "Venue";
     vendorVenue = vendorVenueRepository.UpdateVenue(vendorVenue, masterid, vid);
     return(vendorVenue);
 }
Пример #15
0
        public VendorVenue AddVenue(VendorVenue vendorVenue, Vendormaster vendorMaster)
        {
            DateTime updateddate = TimeZoneInfo.ConvertTimeFromUtc(DateTime.UtcNow, INDIAN_ZONE);

            vendorVenue.Status         = "Active";
            vendorVenue.UpdatedDate    = updateddate;
            vendorMaster.Status        = "Active";
            vendorMaster.UpdatedDate   = updateddate;
            vendorMaster.ServicType    = "Venue";
            vendorMaster               = vendorMasterRepository.AddVendorMaster(vendorMaster);
            vendorVenue.VendorMasterId = vendorMaster.Id;
            if (vendorVenue.Food == "Veg")
            {
                vendorVenue.NonVegLunchCost  = 0;
                vendorVenue.NonVegDinnerCost = 0;
            }
            else if (vendorVenue.Food == "Non-Veg")
            {
                vendorVenue.VegLunchCost  = 0;
                vendorVenue.VegDinnerCost = 0;
            }
            vendorVenue                   = vendorVenueRepository.AddVenue(vendorVenue);
            userLogin.UserName            = vendorMaster.EmailId;
            userLogin.Password            = randomPassword.GenerateString();
            userLogin.UserType            = "Vendor";
            userLogin.UpdatedBy           = 2;
            userLogin.Status              = "Active";
            userLogin.RegDate             = updateddate;
            userLogin.UpdatedDate         = updateddate;
            userLogin                     = userLoginRepository.AddVendorUserLogin(userLogin);
            userDetail.UserLoginId        = userLogin.UserLoginId;
            userDetail.FirstName          = vendorMaster.BusinessName;
            userDetail.UserPhone          = vendorMaster.ContactNumber;
            userDetail.Url                = vendorMaster.Url;
            userDetail.Address            = vendorMaster.Address;
            userDetail.City               = vendorMaster.City;
            userDetail.State              = vendorMaster.State;
            userDetail.ZipCode            = vendorMaster.ZipCode;
            userDetail.Status             = "Active";
            userDetail.UpdatedBy          = ValidUserUtility.ValidUser();
            userDetail.UpdatedDate        = updateddate;
            userDetail.AlternativeEmailID = vendorMaster.EmailId;
            userDetail.Landmark           = vendorMaster.Landmark;
            userDetail                    = userDetailsRepository.AddUserDetails(userDetail);
            if (vendorMaster.Id != 0 && vendorVenue.Id != 0 && userLogin.UserLoginId != 0 && userDetail.UserDetailId != 0)
            {
                return(vendorVenue);
            }
            else
            {
                vendorVenue.Id = 0;
                return(vendorVenue);
            }
        }
        public VendorsDecorator activeDecorator(VendorsDecorator vendorsDecorator, Vendormaster vendorMaster, long masterid, long vid)
        {
            DateTime updateddate = TimeZoneInfo.ConvertTimeFromUtc(DateTime.UtcNow, INDIAN_ZONE);

            vendorsDecorator.Status      = "Active";
            vendorsDecorator.UpdatedDate = updateddate;
            vendorMaster.Status          = "Active";
            vendorMaster.UpdatedDate     = updateddate;
            vendorMaster.ServicType      = "Decorators";
            vendorMaster     = vendorMasterRepository.UpdateVendorMaster(vendorMaster, masterid);
            vendorsDecorator = vendorsDecoratorRepository.UpdateDecorator(vendorsDecorator, masterid, vid);
            return(vendorsDecorator);
        }
        public VendorsCatering UpdatesCatering(VendorsCatering vendorsCatering, Vendormaster vendorMaster, long masterid, long vid)
        {
            DateTime updateddate = TimeZoneInfo.ConvertTimeFromUtc(DateTime.UtcNow, INDIAN_ZONE);

            vendorsCatering.Status      = "Active";
            vendorsCatering.UpdatedDate = updateddate;
            vendorMaster.Status         = "Active";
            vendorMaster.UpdatedDate    = updateddate;
            vendorMaster.ServicType     = "Catering";
            vendorMaster    = vendorMasterRepository.UpdateVendorMaster(vendorMaster, masterid);
            vendorsCatering = vendorCateringRespository.UpdatesCatering(vendorsCatering, masterid, vid);
            return(vendorsCatering);
        }
Пример #18
0
        public VendorsOther activationOther(VendorsOther vendorOther, Vendormaster vendorMaster, long masterid, long vid)
        {
            string updateddate = DateTime.UtcNow.ToShortDateString();

            //vendorOther.Status = "Active";
            vendorOther.UpdatedDate = Convert.ToDateTime(updateddate);
            //vendorMaster.Status = "Active";
            vendorMaster.UpdatedDate = Convert.ToDateTime(updateddate);
            vendorMaster.ServicType  = "Other";
            vendorMaster             = vendorMasterRepository.UpdateVendorMaster(vendorMaster, masterid);
            vendorOther = vendorOthersRepository.UpdateOthers(vendorOther, masterid, vid);
            return(vendorOther);
        }
Пример #19
0
        public VendorsGift activationGift(VendorsGift vendorsGift, Vendormaster vendorMaster, long masterid, long vid)
        {
            string updateddate = DateTime.UtcNow.ToShortDateString();

            //vendorsGift.Status = "Active";
            vendorsGift.UpdatedDate = Convert.ToDateTime(updateddate);
            //vendorMaster.Status = "Active";
            vendorMaster.UpdatedDate = Convert.ToDateTime(updateddate);
            vendorMaster.ServicType  = "Gifts";
            vendorMaster             = vendorMasterRepository.UpdateVendorMaster(vendorMaster, masterid);
            vendorsGift = vendorGiftsRepository.UpdatesGift(vendorsGift, masterid, vid);
            return(vendorsGift);
        }
Пример #20
0
        public VendorVenue activeVenue(VendorVenue vendorVenue, Vendormaster vendorMaster, long masterid, long vid)
        {
            DateTime updateddate = TimeZoneInfo.ConvertTimeFromUtc(DateTime.UtcNow, INDIAN_ZONE);

            // vendorVenue.Status = "Active";
            vendorVenue.UpdatedDate = updateddate;
            // vendorMaster.Status = "Active";
            vendorMaster.UpdatedDate = updateddate;
            vendorMaster.ServicType  = "Venue";
            vendorMaster             = vendorMasterRepository.UpdateVendorMaster(vendorMaster, masterid);
            vendorVenue = vendorVenueRepository.UpdateVenue(vendorVenue, masterid, vid);
            return(vendorVenue);
        }
 public UserDetail AddUserDetail(UserDetail userDetail, Vendormaster vendormaster)
 {
     userDetail.FirstName          = vendormaster.ContactPerson;
     userDetail.UserPhone          = vendormaster.ContactNumber;
     userDetail.Url                = vendormaster.Url;
     userDetail.Address            = vendormaster.Address;
     userDetail.City               = vendormaster.City;
     userDetail.State              = vendormaster.State;
     userDetail.ZipCode            = vendormaster.ZipCode;
     userDetail.Status             = "InActive";
     userDetail.UpdatedBy          = 2;
     userDetail.UpdatedDate        = updateddate;
     userDetail.AlternativeEmailID = vendormaster.EmailId;
     userDetail.Landmark           = vendormaster.Landmark;
     return(vendorVenueSignUpRepository.AddUserDetail(userDetail));
 }
Пример #22
0
        public Vendormaster UpdateVendorMaster(Vendormaster vendorMaster, long id)
        {
            var GetMasterRecord = _dbContext.Vendormaster.SingleOrDefault(m => m.Id == id);

            vendorMaster.Id            = GetMasterRecord.Id;
            vendorMaster.ContactPerson = GetMasterRecord.ContactPerson;
            vendorMaster.Status        = GetMasterRecord.Status;
            vendorMaster.UpdatedDate   = GetMasterRecord.UpdatedDate;
            if (GetMasterRecord.ServicType.Split(',').Contains(vendorMaster.ServicType) == false)
            {
                vendorMaster.ServicType = string.Join(",", (GetMasterRecord.ServicType + "," + vendorMaster.ServicType).Split(',').Distinct()).TrimEnd(',');
            }
            _dbContext.Entry(GetMasterRecord).CurrentValues.SetValues(vendorMaster);
            _dbContext.SaveChanges();
            return(vendorMaster);
        }
Пример #23
0
        public VendorsGift AddGift(VendorsGift vendorGift, Vendormaster vendorMaster)
        {
            string updateddate = DateTime.UtcNow.ToShortDateString();

            vendorGift.Status         = "Active";
            vendorGift.UpdatedDate    = Convert.ToDateTime(updateddate);
            vendorMaster.Status       = "Active";
            vendorMaster.UpdatedDate  = Convert.ToDateTime(updateddate);
            vendorMaster.ServicType   = "Gifts";
            vendorMaster              = vendorMasterRepository.AddVendorMaster(vendorMaster);
            vendorGift.VendorMasterId = vendorMaster.Id;
            vendorGift                    = vendorGiftsRepository.AddGifts(vendorGift);
            userLogin.UserName            = vendorMaster.EmailId;
            userLogin.Password            = randomPassword.GenerateString();
            userLogin.UserType            = "Vendor";
            userLogin.UpdatedBy           = 2;
            userLogin.RegDate             = Convert.ToDateTime(updateddate);
            userLogin.UpdatedDate         = Convert.ToDateTime(updateddate);
            userLogin.Status              = "Active";
            userLogin                     = userLoginRepository.AddVendorUserLogin(userLogin);
            userDetail.UserLoginId        = userLogin.UserLoginId;
            userDetail.FirstName          = vendorMaster.BusinessName;
            userDetail.UserPhone          = vendorMaster.ContactNumber;
            userDetail.Url                = vendorMaster.Url;
            userDetail.Address            = vendorMaster.Address;
            userDetail.City               = vendorMaster.City;
            userDetail.State              = vendorMaster.State;
            userDetail.ZipCode            = vendorMaster.ZipCode;
            userDetail.Status             = "Active";
            userDetail.UpdatedBy          = ValidUserUtility.ValidUser();
            userDetail.UpdatedDate        = Convert.ToDateTime(updateddate);
            userDetail.AlternativeEmailID = vendorMaster.EmailId;
            userDetail.Landmark           = vendorMaster.Landmark;
            userDetail                    = userDetailsRepository.AddUserDetails(userDetail);
            if (vendorMaster.Id != 0 && vendorGift.Id != 0 && userLogin.UserLoginId != 0 && userDetail.UserDetailId != 0)
            {
                return(vendorGift);
            }
            else
            {
                vendorGift.Id = 0;
                return(vendorGift);
            }
        }
        public VendorsDecorator AddDecorator(VendorsDecorator vendorsdecorator, Vendormaster vendorMaster)
        {
            DateTime updateddate = TimeZoneInfo.ConvertTimeFromUtc(DateTime.UtcNow, INDIAN_ZONE);

            vendorMaster.ServicType      = "Decorators";
            vendorMaster.Status          = "Active";
            vendorMaster.UpdatedDate     = updateddate;
            vendorsdecorator.Status      = "Active";
            vendorsdecorator.UpdatedDate = updateddate;
            vendorMaster = vendorMasterRepository.AddVendorMaster(vendorMaster);
            vendorsdecorator.VendorMasterId = vendorMaster.Id;
            vendorsdecorator              = vendorsDecoratorRepository.AddDecorator(vendorsdecorator);
            userLogin.UserName            = vendorMaster.EmailId;
            userLogin.Password            = randomPassword.GenerateString();
            userLogin.UserType            = "Vendor";
            userLogin.UpdatedBy           = 2;
            userLogin.RegDate             = Convert.ToDateTime(updateddate);
            userLogin.UpdatedDate         = Convert.ToDateTime(updateddate);
            userLogin.Status              = "Active";
            userLogin                     = userLoginRepository.AddVendorUserLogin(userLogin);
            userDetail.UserLoginId        = userLogin.UserLoginId;
            userDetail.FirstName          = vendorMaster.BusinessName;
            userDetail.UserPhone          = vendorMaster.ContactNumber;
            userDetail.Url                = vendorMaster.Url;
            userDetail.Address            = vendorMaster.Address;
            userDetail.City               = vendorMaster.City;
            userDetail.State              = vendorMaster.State;
            userDetail.ZipCode            = vendorMaster.ZipCode;
            userDetail.Status             = "Active";
            userDetail.UpdatedBy          = ValidUserUtility.ValidUser();
            userDetail.UpdatedDate        = updateddate;
            userDetail.AlternativeEmailID = vendorMaster.EmailId;
            userDetail.Landmark           = vendorMaster.Landmark;
            userDetail                    = userDetailsRepository.AddUserDetails(userDetail);
            if (vendorMaster.Id != 0 && vendorsdecorator.Id != 0 && userLogin.UserLoginId != 0 && userDetail.UserDetailId != 0)
            {
                return(vendorsdecorator);
            }
            else
            {
                vendorsdecorator.Id = 0;
                return(vendorsdecorator);
            }
        }
Пример #25
0
 public ActionResult AllVendors(string dropstatus, string vid, string command, string id, string type, [Bind(Prefix = "Item2")] VendorVenue vendorVenue, [Bind(Prefix = "Item1")] Vendormaster vendorMaster)
 {
     ViewBag.type = dropstatus;
     if (dropstatus != null && dropstatus != "")
     {
         ViewBag.VendorList = vendorSetupService.AllVendorList(dropstatus);
     }
     if (command == "Edit")
     {
         return(RedirectToAction(dropstatus, "CreateVendor", new { id = id, vid = vid }));
     }
     if (command == "View")
     {
         return(RedirectToAction(dropstatus, "CreateVendor", new { id = id, vid = vid, op = "display" }));
     }
     if (command == "Add New")
     {
         return(RedirectToAction(dropstatus, "CreateVendor", new { id = id, vid = vid, op = "add" }));
     }
     if (command == "confirm")
     {
         TempData["confirm"] = 1;
         return(RedirectToAction(dropstatus, "CreateVendor", new { id = id, vid = vid, op = "confirm" }));
     }
     return(View());
 }
 public VendorsPhotography UpdatePhotography(VendorsPhotography vendorsPhotography, Vendormaster vendorMaster, long masterid, long vid)
 {
     //vendorsPhotography.Status = "InActive";
     vendorsPhotography.UpdatedDate = updateddate;
     //vendorMaster.Status = "InActive";
     vendorMaster.UpdatedDate = updateddate;
     vendorsPhotography       = vendorsPhotographyRepository.UpdatesPhotography(vendorsPhotography, masterid, vid);
     return(vendorsPhotography);
 }
Пример #27
0
        public ActionResult SearchVendor(string searchvendor, string command, Vendormaster vendormaster, string pemail, string id)
        {
            UserLogin  userlogin   = new UserLogin();
            UserDetail userdetails = new UserDetail();
            //var details = vendorMasterService.SearchVendors();
            //var particularvendor = details.Where(m => m.BusinessName.Contains(searchvendor)).FirstOrDefault();
            //var VendorList = vendorMasterService.SearchVendors().Where(m => m.BusinessName.ToLower() == searchvendor.TrimEnd()).FirstOrDefault();
            var VendorList = vendorMasterService.SearchVendors().Where(m => m.BusinessName.ToLower().Contains(searchvendor.ToLower().TrimEnd())).FirstOrDefault();

            ViewBag.VendorList = VendorList;
            if (command == "Update")
            {
                if (pemail != vendormaster.EmailId)
                {
                    int query = vendorMasterService.checkemail(vendormaster.EmailId);
                    if (query != 0)
                    {
                        return(Content("<script language='javascript' type='text/javascript'>alert('Email ID Already Taken');location.href='/admin/Vendors/SearchVendor'</script>"));
                    }
                }
                var updatedetails = vendormaster;
                VenorVenueSignUpService venorVenueSignUpService = new VenorVenueSignUpService();
                vendormaster               = vendorMasterService.GetVendor(long.Parse(id));
                vendormaster.EmailId       = updatedetails.EmailId;
                vendormaster.ContactNumber = updatedetails.ContactNumber;
                vendormaster.ContactPerson = updatedetails.ContactPerson;
                vendormaster               = vendorMasterService.UpdateVendorDetails(vendormaster, long.Parse(id)); // Updating Email ID in Vendor Master Table
                //userlogin.UserName = pemail;
                //userlogin = venorVenueSignUpService.GetUserLogdetails(userlogin);
                userlogin          = venorVenueSignUpService.GetParticularUserdetails(pemail);
                userlogin.UserName = vendormaster.EmailId;
                userlogin          = userLoginDetailsService.UpdateUserName(userlogin, pemail); // Updating Email ID in User Login Table
                //userdetails = userLoginDetailsService.GetUserDetailsByEmail(pemail);
                userdetails = userLoginDetailsService.GetUser(int.Parse(userlogin.UserLoginId.ToString()));
                userdetails.AlternativeEmailID = vendormaster.EmailId;
                userdetails.FirstName          = vendormaster.ContactPerson;
                userdetails.UserPhone          = vendormaster.ContactNumber;
                //userdetails = userLoginDetailsService.UpdateUserDetailEmail(userdetails, pemail); // Updating Email ID in User Detail Table
                userdetails = userLoginDetailsService.UpdateUserdetails(userdetails, userlogin.UserLoginId);
                return(Content("<script language='javascript' type='text/javascript'>alert('Info Updated');location.href='/admin/Vendors/SearchVendor'</script>"));
            }
            if (command == "Email")
            {
                VenorVenueSignUpService venorVenueSignUpService = new VenorVenueSignUpService();
                userlogin.UserName = vendormaster.EmailId;
                var userResponse = venorVenueSignUpService.GetParticularUserdetails(pemail);
                if (userResponse != null)
                {
                    string emailid = userlogin.UserName;
                    if (userResponse.ActivationCode == null)
                    {
                        userlogin = userResponse;
                        userlogin.ActivationCode = Guid.NewGuid().ToString();
                        userlogin = userLoginDetailsService.UpdateUserName(userlogin, emailid);
                        userResponse.ActivationCode = userlogin.ActivationCode;
                    }

                    string activationcode = userResponse.ActivationCode;
                    int    userid         = Convert.ToInt32(userResponse.UserLoginId);
                    var    userdetail     = userLoginDetailsService.GetUser(userid);
                    string name           = userdetail.FirstName;

                    // vendor mail activation  begin

                    string   mailid   = userlogin.UserName;
                    var      userR    = userResponse;//venorVenueSignUpService.GetUserdetails(mailid);
                    string   pas1     = userR.Password;
                    string   url      = Request.Url.Scheme + "://" + Request.Url.Authority + "/NUserRegistration/ActivateEmail1?ActivationCode=" + activationcode + "&&Email=" + emailid;
                    FileInfo File     = new FileInfo(Server.MapPath("/mailtemplate/WelcomeMessage.html"));
                    string   readFile = File.OpenText().ReadToEnd();
                    readFile = readFile.Replace("[ActivationLink]", url);
                    readFile = readFile.Replace("[name]", name);
                    readFile = readFile.Replace("[username]", mailid);
                    readFile = readFile.Replace("[pass1]", pas1);
                    string txtto      = userlogin.UserName;
                    string txtmessage = readFile;//readFile + body;
                    string subj       = "Welcome to Ahwanam";

                    // vendor mail activation  end

                    EmailSendingUtility emailSendingUtility = new EmailSendingUtility();
                    emailSendingUtility.Email_maaaahwanam(txtto, txtmessage, subj, null);
                    return(Content("<script language='javascript' type='text/javascript'>alert('Invitation Sent to " + txtto + "');location.href='/admin/Vendors/SearchVendor'</script>"));
                }
            }
            return(View());
        }
        public VendorsEntertainment activationEntertainment(VendorsEntertainment vendorsEntertainment, Vendormaster vendorMaster, long masterid, long vid)
        {
            string updateddate = DateTime.UtcNow.ToShortDateString();

            vendorsEntertainment.UpdatedDate = Convert.ToDateTime(updateddate);
            //vendorMaster.Status = "Active";
            vendorMaster.UpdatedDate = Convert.ToDateTime(updateddate);
            vendorMaster.ServicType  = "Entertainment";
            vendorMaster             = vendorMasterRepository.UpdateVendorMaster(vendorMaster, masterid);
            vendorsEntertainment     = vendorEntertainmentRespository.UpdateEntertainment(vendorsEntertainment, masterid, vid);
            return(vendorsEntertainment);
        }
        public VendorsEntertainment AddNewEntertainment(VendorsEntertainment vendorsEntertainment, Vendormaster vendorMaster)
        {
            string updateddate = DateTime.UtcNow.ToShortDateString();

            vendorsEntertainment.Status         = "Active";
            vendorsEntertainment.UpdatedDate    = Convert.ToDateTime(updateddate);
            vendorsEntertainment.VendorMasterId = vendorMaster.Id;
            vendorsEntertainment = vendorEntertainmentRespository.AddEntertainment(vendorsEntertainment);
            return(vendorsEntertainment);
        }
Пример #30
0
 public ActionResult VendorDetails(string id, [Bind(Prefix = "Item2")] VendorVenue vendorVenue, [Bind(Prefix = "Item1")] Vendormaster vendorMaster)
 {
     return(View());
 }