Example #1
0
 public static USER_Membership GetUSER_MembershipByRoleID(int RoleID)
 {
     USER_Membership uSER_Membership = new USER_Membership();
     SqlUSER_MembershipProvider sqlUSER_MembershipProvider = new SqlUSER_MembershipProvider();
     uSER_Membership = sqlUSER_MembershipProvider.GetUSER_MembershipByRoleID(RoleID);
     return uSER_Membership;
 }
Example #2
0
    public static USER_Membership GetUSER_MembershipByRoleID(int RoleID)
    {
        USER_Membership            uSER_Membership            = new USER_Membership();
        SqlUSER_MembershipProvider sqlUSER_MembershipProvider = new SqlUSER_MembershipProvider();

        uSER_Membership = sqlUSER_MembershipProvider.GetUSER_MembershipByRoleID(RoleID);
        return(uSER_Membership);
    }
    public bool UpdateUSER_Membership(USER_Membership uSER_Membership)
    {
        using (SqlConnection connection = new SqlConnection(this.ConnectionString))
        {
            SqlCommand cmd = new SqlCommand("UpdateUSER_Membership", connection);
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.Add("@RoleID", SqlDbType.Int).Value           = uSER_Membership.RoleID;
            cmd.Parameters.Add("@UpdatedBy", SqlDbType.NVarChar).Value   = uSER_Membership.UpdatedBy;
            cmd.Parameters.Add("@UpdatedDate", SqlDbType.DateTime).Value = uSER_Membership.UpdatedDate;
            cmd.Parameters.Add("@RowStatusID", SqlDbType.Int).Value      = uSER_Membership.RowStatusID;
            connection.Open();

            int result = cmd.ExecuteNonQuery();
            return(result == 1);
        }
    }
    public USER_Membership GetUSER_MembershipFromReader(IDataReader reader)
    {
        try
        {
            USER_Membership uSER_Membership = new USER_Membership
                                              (

                DataAccessObject.IsNULL <int>(reader["RoleID"]),
                DataAccessObject.IsNULL <string>(reader["AddedBy"]),
                DataAccessObject.IsNULL <DateTime>(reader["AddedDate"]),
                DataAccessObject.IsNULL <string>(reader["UpdatedBy"]),
                DataAccessObject.IsNULL <DateTime>(reader["UpdatedDate"]),
                DataAccessObject.IsNULL <int>(reader["RowStatusID"])
                                              );
            return(uSER_Membership);
        }
        catch (Exception ex)
        {
            return(null);
        }
    }
Example #5
0
    public static bool UpdateUSER_Membership(USER_Membership uSER_Membership)
    {
        SqlUSER_MembershipProvider sqlUSER_MembershipProvider = new SqlUSER_MembershipProvider();

        return(sqlUSER_MembershipProvider.UpdateUSER_Membership(uSER_Membership));
    }
Example #6
0
    public static int InsertUSER_Membership(USER_Membership uSER_Membership)
    {
        SqlUSER_MembershipProvider sqlUSER_MembershipProvider = new SqlUSER_MembershipProvider();

        return(sqlUSER_MembershipProvider.InsertUSER_Membership(uSER_Membership));
    }
Example #7
0
    public bool UpdateUSER_Membership(USER_Membership uSER_Membership)
    {
        using (SqlConnection connection = new SqlConnection(this.ConnectionString))
        {
            SqlCommand cmd = new SqlCommand("UpdateUSER_Membership", connection);
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.Add("@RoleID", SqlDbType.Int).Value = uSER_Membership.RoleID;
            cmd.Parameters.Add("@UpdatedBy", SqlDbType.NVarChar).Value = uSER_Membership.UpdatedBy;
            cmd.Parameters.Add("@UpdatedDate", SqlDbType.DateTime).Value = uSER_Membership.UpdatedDate;
            cmd.Parameters.Add("@RowStatusID", SqlDbType.Int).Value = uSER_Membership.RowStatusID;
            connection.Open();

            int result = cmd.ExecuteNonQuery();
            return result == 1;
        }
    }
Example #8
0
    public USER_Membership GetUSER_MembershipFromReader(IDataReader reader)
    {
        try
        {
            USER_Membership uSER_Membership = new USER_Membership
                (

                     DataAccessObject.IsNULL<int>(reader["RoleID"]),
                     DataAccessObject.IsNULL<string>(reader["AddedBy"]),
                     DataAccessObject.IsNULL<DateTime>(reader["AddedDate"]),
                     DataAccessObject.IsNULL<string>(reader["UpdatedBy"]),
                     DataAccessObject.IsNULL<DateTime>(reader["UpdatedDate"]),
                     DataAccessObject.IsNULL<int>(reader["RowStatusID"])
                );
             return uSER_Membership;
        }
        catch(Exception ex)
        {
            return null;
        }
    }
Example #9
0
 public static bool UpdateUSER_Membership(USER_Membership uSER_Membership)
 {
     SqlUSER_MembershipProvider sqlUSER_MembershipProvider = new SqlUSER_MembershipProvider();
     return sqlUSER_MembershipProvider.UpdateUSER_Membership(uSER_Membership);
 }
Example #10
0
 public static int InsertUSER_Membership(USER_Membership uSER_Membership)
 {
     SqlUSER_MembershipProvider sqlUSER_MembershipProvider = new SqlUSER_MembershipProvider();
     return sqlUSER_MembershipProvider.InsertUSER_Membership(uSER_Membership);
 }