Beispiel #1
0
        public JsonResult Update([Bind(Include = "Id,CodeName,Description,Type,Unit,Status")] TM_MeasureParam param)
        {
            bool   result   = new MeasureParamDao().Update(param);
            string TypeName = new ParamTypeDao().FindName(param.Type);

            if (result)
            {
                return(Json(new
                {
                    isNewRecord = false,
                    Id = param.Id,
                    CodeName = param.CodeName,
                    Description = param.Description,
                    Unit = param.Unit,
                    Status = param.Status,
                    Type = param.Type,
                    TypeName = TypeName
                }));
            }
            else
            {
                return(NotifyError("Sửa"));
            }
        }
        // List all paramtype
        public JsonResult ListAll()
        {
            var entity = new ParamTypeDao().ListAll();

            return(Json(entity, JsonRequestBehavior.AllowGet));
        }