Ejemplo n.º 1
0
        public async Task DeleteAsync(Registered parameters)
        {
            var register = Uow.Repository <Registered>().FindByKey(parameters.Id);
            await Uow.RegisterDeletedAsync(register);

            await Uow.CommitAsync();
        }
        public async Task DeleteAsync(SellerProduct parameters)
        {
            var SellerProduct = Uow.Repository <SellerProduct>().FindByKey(parameters.SellerProductId);
            await Uow.RegisterDeletedAsync(SellerProduct);

            await Uow.CommitAsync();
        }
Ejemplo n.º 3
0
        public async Task DeleteAsync(AppUser parameters)
        {
            var user = Uow.Repository <AppUser>().FirstOrDefault(t => t.AppUserId == parameters.AppUserId);
            await Uow.RegisterDeletedAsync(user);

            await Uow.CommitAsync();
        }
Ejemplo n.º 4
0
        public async Task DeleteAsync(UserDetail parameters)
        {
            var user = Uow.Repository <UserDetail>().FindByKey(parameters.PaytmUserId);
            await Uow.RegisterDeletedAsync(user);

            await Uow.CommitAsync();
        }
        public async Task DeleteAsync(FashionSubCategory parameters)
        {
            var FashionSubCategory = Uow.Repository <FashionSubCategory>().FindByKey(parameters.FashionSubCategoryId);
            await Uow.RegisterDeletedAsync(FashionSubCategory);

            await Uow.CommitAsync();
        }
Ejemplo n.º 6
0
        public async Task DeleteAsync(Seller parameters)
        {
            var Seller = Uow.Repository <Seller>().FindBy(t => t.SellerId == parameters.SellerId);
            await Uow.RegisterDeletedAsync(Seller);

            await Uow.CommitAsync();
        }
Ejemplo n.º 7
0
        public async Task DeleteAsync(vNotice parameters)
        {
            Notice notice = await this.Uow.Repository <Notice>().SingleOrDefaultAsync(t => t.NoticeId == parameters.NoticeId);

            await Uow.RegisterDeletedAsync <Notice>(notice);

            await Uow.CommitAsync();
        }
Ejemplo n.º 8
0
        public async Task DeleteAsync(vEmployeeRec parameters)
        {
            Employee employee = await Uow.Repository <Employee>().SingleOrDefaultAsync(t => t.EmployeeId == parameters.EmployeeId);

            await Uow.RegisterDeletedAsync <Employee>(employee);

            await Uow.CommitAsync();
        }
Ejemplo n.º 9
0
        public async Task DeleteAsync(UserAddress parameters)
        {
            var user = await Uow.Repository <AppUser>().FindByAsync(t => t.AppUserId == parameters.AppUserId);

            await Uow.RegisterDeletedAsync(user);

            await Uow.CommitAsync();
        }
Ejemplo n.º 10
0
        public async Task DeleteAsync(EducationDetail parameters)
        {
            //  throw new NotImplementedException();
            var del = await Uow.Repository <EducationDetail>().FindByAsync(r => r.EducationId == parameters.EducationId);

            await Uow.RegisterDeletedAsync(del);

            await Uow.CommitAsync();
        }
Ejemplo n.º 11
0
        public async Task DeleteAsync(PostComment parameters)
        {
            var UserComment = Uow.Repository <PostComment>().FindByKey(parameters.PostCommentId);
            await Uow.RegisterDeletedAsync(UserComment);

            await Uow.CommitAsync();

            // throw new NotImplementedException();
        }
Ejemplo n.º 12
0
        public async Task DeleteAsync(LInkedInUserAuth parameters)
        {
            //var LinkedInUser = Uow.Repository<LinkedInUser>().FindByAsync(t=> t.LIUserId==parameters.LIUserId);
            await Uow.RegisterDeletedAsync(parameters);

            await Uow.CommitAsync();

            //throw new NotImplementedException();
        }
Ejemplo n.º 13
0
        public async Task DeleteAsync(FacebookUserWork parameters)
        {
            // throw new NotImplementedException();
            var delete = await Uow.Repository <FacebookUserWork>().FindByAsync(m => m.UserWorkId == parameters.UserWorkId);

            await Uow.RegisterDeletedAsync(delete);

            await Uow.CommitAsync();
        }
Ejemplo n.º 14
0
        public async Task DeleteAsync(Post parameters)
        {
            var UserPost = Uow.Repository <Post>().FindByKey(parameters.PostId);
            await Uow.RegisterDeletedAsync(UserPost);

            await Uow.CommitAsync();

            parameters.Status = "Deactivated";
            // throw new NotImplementedException();
        }
        public async Task DeleteAsync(BookEntery parameters)
        {
            BookDetail bookDetail = new BookDetail();
            var        candidate  = Uow.Repository <BookEntery>().FindByKey(parameters.BookEnteryId);
            await Uow.RegisterDeletedAsync(candidate);

            await Uow.CommitAsync();

            //throw new NotImplementedException();
        }
Ejemplo n.º 16
0
        public async Task DeleteAsync(PostTag parameters)
        {
            var PostTagged = Uow.Repository <PostTag>().FindByKey(parameters.PostTagId);
            await Uow.RegisterDeletedAsync(PostTagged);

            await Uow.CommitAsync();

            parameters.TagStatus = "Off";
            //throw new NotImplementedException();
        }
        public async Task DeleteAsync(CreateBookBed parameters)
        {
            var candidate = Uow.Repository <BookBed>().FindByKey(parameters.BookBedId);
            await Uow.RegisterDeletedAsync(candidate);

            await Uow.CommitAsync();

            //await Uow.Repository<CreateBookBed>().FindByAsync(a => a.BedId == parameters.BedId);
            //throw new NotImplementedException();
        }
Ejemplo n.º 18
0
        public async Task DeleteAsync(OTP parameters)
        {
            var currenttime = System.DateTime.Now;

            if (parameters.DeactivateTime < currenttime)
            {
                var deactivateotp = Uow.Repository <OTP>().FindByKey(parameters.OTPId);
                await Uow.RegisterDeletedAsync(deactivateotp);

                await Uow.CommitAsync();
            }
        }
        public async Task <object> GetBy(EWallet parameters)
        {
            var x = await Uow.Repository <PNRGeneration>().SingleOrDefaultAsync(t => t.PNRId == parameters.PNRId);

            if (x != null)
            {
                var pnrDetails = await Uow.Repository <PassengerInvoice>().SingleOrDefaultAsync(r => r.passengerInvoiceId == x.PassengerInvoiceId);

                var z           = pnrDetails.TotalPrice / pnrDetails.NumberOfPassengers;
                var currentDate = DateTime.Now;
                var time        = await Uow.Repository <Payment>().SingleOrDefaultAsync(r => r.UserId == x.UserId);

                TimeSpan t = currentDate - time.PaymentDate;
                float    d;

                if (t.TotalHours <= 12)
                {
                    d = (50 * z) / 100;
                }
                else
                {
                    d = (70 * z) / 100;
                }
                parameters.PaymentId = x.PaymentId;
                parameters.UserId    = x.UserId;
                parameters.Refund    = d;
                await Uow.RegisterNewAsync(parameters);

                var deletePNR = Uow.Repository <PNRGeneration>().FindByKey(x.PNRId);
                await Uow.RegisterDeletedAsync(deletePNR);

                await Uow.CommitAsync();

                return("REFUND SUCCESSFUL");
            }
            else
            {
                return("PNR INVALID");
            }
        }
Ejemplo n.º 20
0
        public async Task AddAsync(Otp entity)
        {
            //Generate Otp
            var temp = Uow.Repository <Otp>().Count(t => t.UserId == entity.UserId);

            if (temp != 0)
            {
                var candidate = Uow.Repository <Otp>().FindBy(t => t.UserId == entity.UserId);
                await Uow.RegisterDeletedAsync(candidate);

                await Uow.CommitAsync();
            }
            Random rnd          = new Random();
            string randomNumber = (rnd.Next(100000, 999999)).ToString();

            entity.OtpCode = Int32.Parse(randomNumber);
            //Otp send via msg


            await Uow.RegisterNewAsync(entity);

            await Uow.CommitAsync();
        }