public VendorsEventOrganiser UpdateEventOrganiser(VendorsEventOrganiser vendorsEventOrganiser, Vendormaster vendorMaster, long masterid, long vid)
 {
     //string updateddate = DateTime.UtcNow.ToShortDateString();
     //vendorsDecorator.Status = "InActive";
     vendorsEventOrganiser.UpdatedDate = updateddate;
     vendorsEventOrganiser             = vendorEventOrganiserRepository.UpdateEventOrganiser(vendorsEventOrganiser, masterid, vid);
     return(vendorsEventOrganiser);
 }
예제 #2
0
        public VendorsEventOrganiser UpdateEventOrganiser(VendorsEventOrganiser vendorsEventOrganiser, long id, long vid)
        {
            var GetVendor = _dbContext.VendorsEventOrganiser.SingleOrDefault(m => m.VendorMasterId == id && m.Id == vid);

            vendorsEventOrganiser.Id             = GetVendor.Id;
            vendorsEventOrganiser.VendorMasterId = id;
            _dbContext.Entry(GetVendor).CurrentValues.SetValues(vendorsEventOrganiser);
            _dbContext.SaveChanges();
            return(vendorsEventOrganiser);
        }
예제 #3
0
        public VendorsEventOrganiser AddNewEventOrganiser(VendorsEventOrganiser vendorsEventOrganiser, Vendormaster vendorMaster)
        {
            string updateddate = DateTime.UtcNow.ToShortDateString();

            vendorsEventOrganiser.Status         = "Active";
            vendorsEventOrganiser.UpdatedDate    = Convert.ToDateTime(updateddate);
            vendorsEventOrganiser.VendorMasterId = vendorMaster.Id;
            vendorsEventOrganiser = vendorEventOrganiserRepository.AddEventOrganiser(vendorsEventOrganiser);
            return(vendorsEventOrganiser);
        }
예제 #4
0
        public VendorsEventOrganiser activationOrganiser(VendorsEventOrganiser vendorsEventOrganiser, Vendormaster vendorMaster, long masterid, long vid)
        {
            string updateddate = DateTime.UtcNow.ToShortDateString();

            //vendorsEventOrganiser.Status = "Active";
            vendorsEventOrganiser.UpdatedDate = Convert.ToDateTime(updateddate);
            //vendorMaster.Status = "Active";
            vendorMaster.UpdatedDate = Convert.ToDateTime(updateddate);
            vendorMaster.ServicType  = "EventOrganiser";
            vendorMaster             = vendorMasterRepository.UpdateVendorMaster(vendorMaster, masterid);
            vendorsEventOrganiser    = vendorEventOrganiserRepository.UpdateEventOrganiser(vendorsEventOrganiser, masterid, vid);
            return(vendorsEventOrganiser);
        }
        //updating vendor Service Record
        public long UpdateVendorService(string id, string vid, string type)
        {
            long masterid = 0;

            if (type == "Venue")
            {
                VendorVenue vendorVenue = vendorVenueRepository.GetVendorVenue(long.Parse(id), long.Parse(vid));
                vendorVenue.VenueType = "";
                vendorVenue           = vendorVenueRepository.UpdateVenue(vendorVenue, long.Parse(id), long.Parse(vid));
                masterid = vendorVenue.Id;
            }
            if (type == "Catering")
            {
                VendorsCatering vendorsCatering = vendorCateringRepository.GetVendorsCatering(long.Parse(id), long.Parse(vid));
                vendorsCatering.CuisineType = "";
                vendorsCatering             = vendorCateringRepository.UpdatesCatering(vendorsCatering, long.Parse(id), long.Parse(vid));
                masterid = vendorsCatering.Id;
            }
            if (type == "Decorator")
            {
                VendorsDecorator vendorsDecorator = vendorsDecoratorRepository.GetVendorDecorator(long.Parse(id), long.Parse(vid));
                vendorsDecorator.DecorationType = "";
                vendorsDecorator = vendorsDecoratorRepository.UpdateDecorator(vendorsDecorator, long.Parse(id), long.Parse(vid));
                masterid         = vendorsDecorator.Id;
            }
            if (type == "Photography")
            {
                VendorsPhotography vendorsPhotography = vendorsPhotographyRepository.GetVendorsPhotography(long.Parse(id), long.Parse(vid));
                vendorsPhotography.PhotographyType = "";
                vendorsPhotography = vendorsPhotographyRepository.UpdatesPhotography(vendorsPhotography, long.Parse(id), long.Parse(vid));
                masterid           = vendorsPhotography.Id;
            }
            if (type == "Event")
            {
                VendorsEventOrganiser vendorsEventOrganiser = vendorEventOrganiserRepository.GetVendorEventOrganiser(long.Parse(id), long.Parse(vid));
                vendorsEventOrganiser.type = "";
                vendorsEventOrganiser      = vendorEventOrganiserRepository.UpdateEventOrganiser(vendorsEventOrganiser, long.Parse(id), long.Parse(vid));
                masterid = vendorsEventOrganiser.Id;
            }
            if (type == "Other")
            {
                VendorsOther vendorsOther = vendorOthersRepository.GetVendorOthers(long.Parse(id), long.Parse(vid));
                vendorsOther.type = "";
                vendorsOther      = vendorOthersRepository.UpdateOthers(vendorsOther, long.Parse(id), long.Parse(vid));
                masterid          = vendorsOther.Id;
            }
            return(masterid);
        }
        // Discount% updation in every service
        public long DiscountUpdate(string type, string id, string vid, string discount)
        {
            long masterid = 0;

            if (type == "Venue")
            {
                VendorVenue vendorVenue = vendorVenueRepository.GetVendorVenue(long.Parse(id), long.Parse(vid));
                vendorVenue.discount = discount;
                vendorVenue          = vendorVenueRepository.UpdateVenue(vendorVenue, long.Parse(id), long.Parse(vid));
                masterid             = vendorVenue.Id;
            }
            if (type == "Catering")
            {
                VendorsCatering vendorsCatering = vendorCateringRepository.GetVendorsCatering(long.Parse(id), long.Parse(vid));
                vendorsCatering.discount = discount;
                vendorsCatering          = vendorCateringRepository.UpdatesCatering(vendorsCatering, long.Parse(id), long.Parse(vid));
                masterid = vendorsCatering.Id;
            }
            if (type == "Decorator")
            {
                VendorsDecorator vendorsDecorator = vendorsDecoratorRepository.GetVendorDecorator(long.Parse(id), long.Parse(vid));
                vendorsDecorator.discount = discount;
                vendorsDecorator          = vendorsDecoratorRepository.UpdateDecorator(vendorsDecorator, long.Parse(id), long.Parse(vid));
                masterid = vendorsDecorator.Id;
            }
            if (type == "Photography")
            {
                VendorsPhotography vendorsPhotography = vendorsPhotographyRepository.GetVendorsPhotography(long.Parse(id), long.Parse(vid));
                vendorsPhotography.discount = discount;
                vendorsPhotography          = vendorsPhotographyRepository.UpdatesPhotography(vendorsPhotography, long.Parse(id), long.Parse(vid));
                masterid = vendorsPhotography.Id;
            }
            if (type == "Event")
            {
                VendorsEventOrganiser vendorsEventOrganiser = vendorEventOrganiserRepository.GetVendorEventOrganiser(long.Parse(id), long.Parse(vid));
                vendorsEventOrganiser.discount = discount;
                vendorsEventOrganiser          = vendorEventOrganiserRepository.UpdateEventOrganiser(vendorsEventOrganiser, long.Parse(id), long.Parse(vid));
                masterid = vendorsEventOrganiser.Id;
            }
            if (type == "Other")
            {
                VendorsOther vendorsOther = vendorOthersRepository.GetVendorOthers(long.Parse(id), long.Parse(vid));
                vendorsOther.discount = discount;
                vendorsOther          = vendorOthersRepository.UpdateOthers(vendorsOther, long.Parse(id), long.Parse(vid));
                masterid = vendorsOther.Id;
            }
            return(masterid);
        }
예제 #7
0
        public VendorsEventOrganiser AddEventOrganiser(VendorsEventOrganiser vendorEventOrganiser, Vendormaster vendorMaster)
        {
            string updateddate = DateTime.UtcNow.ToShortDateString();

            vendorEventOrganiser.Status      = "Active";
            vendorEventOrganiser.UpdatedDate = Convert.ToDateTime(updateddate);
            vendorMaster.Status                 = "Active";
            vendorMaster.UpdatedDate            = Convert.ToDateTime(updateddate);
            vendorMaster.ServicType             = "EventOrganiser";
            vendorMaster                        = vendorMasterRepository.AddVendorMaster(vendorMaster);
            vendorEventOrganiser.VendorMasterId = vendorMaster.Id;
            vendorEventOrganiser                = vendorEventOrganiserRepository.AddEventOrganiser(vendorEventOrganiser);
            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 && vendorEventOrganiser.Id != 0 && userLogin.UserLoginId != 0 && userDetail.UserDetailId != 0)
            {
                return(vendorEventOrganiser);
            }
            else
            {
                vendorEventOrganiser.Id = 0;
                return(vendorEventOrganiser);
            }
        }
        //Event Organiser Area

        public VendorsEventOrganiser AddVendorEventOrganiser(VendorsEventOrganiser vendorsEventOrganiser)
        {
            vendorsEventOrganiser.UpdatedDate = updateddate;
            return(vendorEventOrganiserRepository.AddEventOrganiser(vendorsEventOrganiser));
        }
예제 #9
0
 public VendorsEventOrganiser AddEventOrganiser(VendorsEventOrganiser vendorsEventOrganiser)
 {
     _dbContext.VendorsEventOrganiser.Add(vendorsEventOrganiser);
     _dbContext.SaveChanges();
     return(vendorsEventOrganiser);
 }