コード例 #1
0
 public ServiceResponse <HeadstoneUserRole> Update(HeadstoneUserRole model)
 {
     using (var bo = new UserRoleDAO())
     {
         int result = bo.Update(model as HeadstoneUserRole);
         if (result > 0)
         {
             return(new ServiceResponse <HeadstoneUserRole>()
             {
                 Type = ServiceResponseTypes.Success,
                 Source = ServiceResponseSources.MsSQL,
                 Result = new List <HeadstoneUserRole>()
                 {
                     model
                 }
             });
         }
         else
         {
             return(new ServiceResponse <HeadstoneUserRole>()
             {
                 Type = ServiceResponseTypes.Error,
                 Source = ServiceResponseSources.MsSQL,
                 Result = new List <HeadstoneUserRole>()
                 {
                     model
                 }
             });
         }
     }
 }
コード例 #2
0
 public void Save(Connection connection, MySqlTransaction transaction = null)
 {
     using (var dao = new UserRoleDAO(connection))
     {
         if (Id == 0)
         {
             dao.Insert(this, transaction);
         }
         else
         {
             dao.Update(this, transaction);
         }
     }
 }
コード例 #3
0
ファイル: UserRoleBAL.cs プロジェクト: tonchilling/PTTDA
 public override bool Update(object dto)
 {
     return(dao.Update(dto));
 }