public IActionResult Refuse(string id, [FromForm] int ReceiptID)
        {
            try
            {
                AppUser user = _user.Users.Where(u => u.Id == id).Include(u => u.Balance).Include(r => r.Receipts).FirstOrDefault();
                if (user == null)
                {
                    return(StatusCode(StatusCodes.Status500InternalServerError, new Response
                    {
                        Status = "Error",
                        Messages = new Message[] {
                            new Message {
                                Lang_id = 1,
                                MessageLang = "Model state isn't valid!"
                            },
                            new Message {
                                Lang_id = 2,
                                MessageLang = "Состояние модели недействительно!"
                            },
                            new Message {
                                Lang_id = 3,
                                MessageLang = "Model vəziyyəti etibarsızdır!"
                            }
                        }
                    }));
                }

                Receipt receipt = user.Receipts.Where(r => r.Id == ReceiptID).FirstOrDefault();
                if (receipt == null)
                {
                    return(StatusCode(StatusCodes.Status500InternalServerError, new Response
                    {
                        Status = "Error",
                        Messages = new Message[] {
                            new Message {
                                Lang_id = 1,
                                MessageLang = "Model state isn't valid!"
                            },
                            new Message {
                                Lang_id = 2,
                                MessageLang = "Состояние модели недействительно!"
                            },
                            new Message {
                                Lang_id = 3,
                                MessageLang = "Model vəziyyəti etibarsızdır!"
                            }
                        }
                    }));
                }

                user.Balance.UserBalance += receipt.Value;
                user.Balance.ModifiedDate = DateTime.Now;

                user.Receipts.Add(new Receipt
                {
                    Name      = "Refuse",
                    Value     = receipt.Value,
                    IsActived = true
                });;
                _user.Update(user);
                _user.SaveChanges();
                return(Ok());
            }
            catch (Exception e)
            {
                return(StatusCode(StatusCodes.Status500InternalServerError, e.Message));
            }
        }
        public IActionResult Put([FromForm] decimal balance)
        {
            try
            {
                if (!ModelState.IsValid)
                {
                    return(StatusCode(StatusCodes.Status500InternalServerError, new Response
                    {
                        Status = "Error",
                        Messages = new Message[] {
                            new Message {
                                Lang_id = 1,
                                MessageLang = "Model state isn't valid!"
                            },
                            new Message {
                                Lang_id = 2,
                                MessageLang = "Состояние модели недействительно!"
                            },
                            new Message {
                                Lang_id = 3,
                                MessageLang = "Model vəziyyəti etibarsızdır!"
                            }
                        }
                    }));
                }

                AppUser user = _user.Users.Where(u => u.UserName == User.Identity.Name).Include(u => u.Balance).Include(r => r.Receipts).FirstOrDefault();
                if (user == null)
                {
                    return(StatusCode(StatusCodes.Status500InternalServerError, new Response
                    {
                        Status = "Error",
                        Messages = new Message[] {
                            new Message {
                                Lang_id = 1,
                                MessageLang = "Model state isn't valid!"
                            },
                            new Message {
                                Lang_id = 2,
                                MessageLang = "Состояние модели недействительно!"
                            },
                            new Message {
                                Lang_id = 3,
                                MessageLang = "Model vəziyyəti etibarsızdır!"
                            }
                        }
                    }));
                }
                user.Balance.UserBalance += balance;
                user.Balance.ModifiedDate = DateTime.Now;

                user.Receipts.Add(new Receipt {
                    Name      = "plus",
                    Value     = balance,
                    IsActived = true
                });;
                _user.Update(user);
                _user.SaveChanges();
                return(Ok());
            }
            catch (Exception e)
            {
                return(StatusCode(StatusCodes.Status500InternalServerError, e.Message));
            }
        }