예제 #1
0
        public JsonResult OnCreate(string pTitle, int?pGroupId, string pLink, string pKichHoat, int?pValue, string pSummary, string pImageUrl)
        {
            var mFile = new File()
            {
                Date     = DateTime.Now,
                LinkFile = pImageUrl,
                Status   = ConverterUlti.ConvertStringToLogic2(pKichHoat),
                FileName = pTitle,
                Summary  = pSummary,
                TypeID   = pGroupId,
                Value    = pValue
            };

            MpStartEntities.AddToFile(mFile);
            MpStartEntities.SaveChanges();
            return(Json(new { code = 1, message = "Lưu  File thành công." }));
        }