Пример #1
0
        public string saveAttachInfo(IFormCollection fileinfo, string randomName)
        {
            string attid       = Guid.NewGuid().ToString();
            var    com_Attachs = new ComAttachs
            {
                Id            = attid,
                UploadUserId  = fileinfo["UploadUserId"],
                HrDeptId      = Convert.ToInt32(fileinfo["HrDeptId"].ToString()),
                Filename      = fileinfo["FileName"],
                FileType      = fileinfo["FileType"],
                Employeeid    = fileinfo["userid"],
                Physicsname   = randomName,
                Createdate    = DateTime.Now,
                Isdelete      = "0",
                Formtablename = fileinfo["tablename"],
                //Filesize = fileinfo["filesize"],
                //Remark = fileinfo["Remark"]
            };

            _IFoodInfoRepository.Add2(com_Attachs);
            _IFoodInfoRepository.SaveChanges();
            return(attid);
        }
Пример #2
0
 public virtual void Add2(ComAttachs obj)
 {
     DbSet2.Add(obj);
 }