Exemple #1
0
        public JsonResult UpdatePersonnel(UpdateExpenseVM vm)
        {
            try
            {
                Expense personnel = _es.GetById(vm.Id);
                personnel.Modified   = DateTime.Now;
                personnel.ModifiedBy = SessionManager.ActiveUser.Id;

                personnel.CompanyName = vm.CompanyName;
                personnel.ProcessDate = vm.ProcessDate;
                personnel.Process     = vm.Process;
                personnel.CompanyName = vm.CompanyName;
                personnel.PayDate     = vm.PayDate;
                personnel.Price       = Math.Round(vm.Price, 2);
                personnel.Description = vm.Description;

                _es.Update(personnel);

                return(Json(new { Result = true, Message = "Personel Gideri Başarıyla Güncellendi" }));
            }
            catch (Exception ex)
            {
                return(Json(new { Result = false, ex.Message }));
            }
        }
Exemple #2
0
        public JsonResult UpdateMachine(UpdateExpenseVM vm)
        {
            try
            {
                Expense expense = _es.GetById(vm.Id);
                expense.Modified   = DateTime.Now;
                expense.ModifiedBy = SessionManager.ActiveUser.Id;

                expense.CompanyName = vm.CompanyName;
                expense.ProcessDate = vm.ProcessDate;
                expense.Process     = vm.Process;
                expense.CompanyName = vm.CompanyName;
                expense.PayDate     = vm.PayDate;
                expense.Price       = Math.Round(vm.Price, 2);
                expense.Description = vm.Description;

                _es.Update(expense);

                return(Json(new { Result = true, Message = "Makina Gideri Başarıyla Güncellendi" }));
            }
            catch (Exception ex)
            {
                return(Json(new { Result = false, ex.Message }));
            }
        }