public int Delete_User(UserPublic p) { Database cn = new Database(); SqlParameter[] prams = { cn.MakeInParam("@Id", SqlDbType.Int, 4, p.Id) }; cn.RunProc("User_Delete", prams); cn.Dispose(); try { return((int)prams[0].Value); } catch (Exception) { return(1); } finally { cn.Close(); cn.Dispose(); } }