public int AddRole(Roles Rol) { try { return repository.AddRole(Rol); } catch (Exception ex) { LogUtil.Log("AddRole", ex); throw new FaultException(ex.Message); } }
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(); } }
public bool UpdateRole(Roles Rol) { try { return repository.UpdateRole(Rol); } catch (Exception ex) { LogUtil.Log("UpdateRole", ex); throw new FaultException(ex.Message); } }