// GET api/<controller>/5
        public Can_MealAllowanceToMoneyModel Get(Guid id)
        {
            var service = new Can_MealAllowanceToMoneyServices();
            var model = new Can_MealAllowanceToMoneyModel();
            var result = service.GetData<Can_MealAllowanceToMoneyEntity>(id, ConstantSql.hrm_can_get_MealAllowanceToMoneyById,UserLogin, ref status).FirstOrDefault();

            if (result != null)
            {
                model = result.CopyData<Can_MealAllowanceToMoneyModel>();
            }
            model.ActionStatus = status;
            return model;
            
        }
Exemplo n.º 2
0
 //SonVo - 20140803 - chuyển trạng thái submit màn hình phụ cấp ăn
 public ActionResult SubmitMealAllowance(string selectedIds, string status)
 {
     List<Guid> ids = new List<Guid>();
     if (selectedIds != null)
     {
         ids = selectedIds
            .Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries)
            .Select(x => Guid.Parse(x))
            .ToList();
     }
     var lstMealRecordMissing = new List<Can_MealAllowanceToMoneyEntity>();
     var services = new Can_MealAllowanceToMoneyServices();
     services.SubmitStatus(ids, status);
     return Json("");
 }
 public Can_MealAllowanceToMoneyModel Put(Can_MealAllowanceToMoneyModel model)
 {
     var can_Meal = new Can_MealAllowanceToMoneyEntity
     {
         ID = model.ID,
         DateFrom = model.DateFrom,
         DateTo = model.DateTo,
         ProfileID = model.ProfileID,
         Note = model.Note
     };
     var service = new Can_MealAllowanceToMoneyServices();
     if (model.ID != null)
     {
         can_Meal.ID = model.ID;
         service.Edit<Can_MealAllowanceToMoneyEntity>(can_Meal);
     }
     else
     {
         service.Add<Can_MealAllowanceToMoneyEntity>(can_Meal);
     }
     return model;
 }