コード例 #1
0
 public int AddRole(Roles Rol)
 {
     try
     {
         return repository.AddRole(Rol);
     }
     catch (Exception ex)
     {
         LogUtil.Log("AddRole", ex);
         throw new FaultException(ex.Message);
     }
 }
コード例 #2
0
        protected void btAddRole_Click(object sender, EventArgs e)
        {
            if (Page.IsValid)
            {
                TatooineModel.Roles role = new TatooineModel.Roles();
                role.RoleName = tbNewRoleName.Text;
                WCFproxy<ITatooineRoles>.Use(client =>
                {
                    client.AddRole(role);

                });
                Common.LoadRoles = null;
                gvRoles.DataBind();
            }
        }
コード例 #3
0
 public bool UpdateRole(Roles Rol)
 {
     try
     {
         return repository.UpdateRole(Rol);
     }
     catch (Exception ex)
     {
         LogUtil.Log("UpdateRole", ex);
         throw new FaultException(ex.Message);
     }
 }