Ejemplo n.º 1
0
 public bool UpdateExtendType(ExtendTypeCreateDTO req)
 {
     using (var db = new SqlSugarClient(Connection))
     {
         bool result = true;
         R_ProjectExtendType model = new R_ProjectExtendType()
         {
             Name = req.Name,
             Id   = req.Id
         };
         result = db.Update(model);
         return(result);
     }
 }
Ejemplo n.º 2
0
        public bool CreateExtendType(ExtendTypeCreateDTO req)
        {
            using (var db = new SqlSugarClient(Connection))
            {
                bool result = true;
                R_ProjectExtendType model = new R_ProjectExtendType()
                {
                    Name         = req.Name,
                    R_Company_Id = req.R_Company_Id
                };

                if (db.Insert(model) == null)
                {
                    result = false;
                }

                return(result);
            }
        }