コード例 #1
0
ファイル: Mem_MemberTypeManager.cs プロジェクト: iebbd/org
    public static Mem_MemberType GetMem_MemberTypeByID(int id)
    {
        Mem_MemberType            mem_MemberType            = new Mem_MemberType();
        SqlMem_MemberTypeProvider sqlMem_MemberTypeProvider = new SqlMem_MemberTypeProvider();

        mem_MemberType = sqlMem_MemberTypeProvider.GetMem_MemberTypeByID(id);
        return(mem_MemberType);
    }
コード例 #2
0
    public bool UpdateMem_MemberType(Mem_MemberType mem_MemberType)
    {
        using (SqlConnection connection = new SqlConnection(this.ConnectionString))
        {
            SqlCommand cmd = new SqlCommand("IEB_UpdateMem_MemberType", connection);
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.Add("@Mem_MemberTypeID", SqlDbType.Int).Value        = mem_MemberType.Mem_MemberTypeID;
            cmd.Parameters.Add("@Mem_MemberTypeName", SqlDbType.NVarChar).Value = mem_MemberType.Mem_MemberTypeName;
            cmd.Parameters.Add("@Mem_MemberCategoryID", SqlDbType.Int).Value    = mem_MemberType.Mem_MemberCategoryID;
            cmd.Parameters.Add("@Details", SqlDbType.NText).Value                  = mem_MemberType.Details;
            cmd.Parameters.Add("@EntranceFee", SqlDbType.Decimal).Value            = mem_MemberType.EntranceFee;
            cmd.Parameters.Add("@AnnaralSubscriptionFee", SqlDbType.Decimal).Value = mem_MemberType.AnnaralSubscriptionFee;
            cmd.Parameters.Add("@DiplomaFee", SqlDbType.Decimal).Value             = mem_MemberType.DiplomaFee;
            cmd.Parameters.Add("@Age", SqlDbType.Int).Value             = mem_MemberType.Age;
            cmd.Parameters.Add("@Experience", SqlDbType.NVarChar).Value = mem_MemberType.Experience;
            connection.Open();

            int result = cmd.ExecuteNonQuery();
            return(result == 1);
        }
    }
コード例 #3
0
 public Mem_MemberType GetMem_MemberTypeFromReader(IDataReader reader)
 {
     try
     {
         Mem_MemberType mem_MemberType = new Mem_MemberType
                                         (
             (int)reader["Mem_MemberTypeID"],
             reader["Mem_MemberTypeName"].ToString(),
             (int)reader["Mem_MemberCategoryID"],
             reader["Details"].ToString(),
             (decimal)reader["EntranceFee"],
             (decimal)reader["AnnaralSubscriptionFee"],
             (decimal)reader["DiplomaFee"],
             (int)reader["Age"],
             reader["Experience"].ToString()
                                         );
         return(mem_MemberType);
     }
     catch (Exception ex)
     {
         return(null);
     }
 }
コード例 #4
0
ファイル: Mem_MemberTypeManager.cs プロジェクト: iebbd/org
    public static bool UpdateMem_MemberType(Mem_MemberType mem_MemberType)
    {
        SqlMem_MemberTypeProvider sqlMem_MemberTypeProvider = new SqlMem_MemberTypeProvider();

        return(sqlMem_MemberTypeProvider.UpdateMem_MemberType(mem_MemberType));
    }
コード例 #5
0
ファイル: Mem_MemberTypeManager.cs プロジェクト: iebbd/org
    public static int InsertMem_MemberType(Mem_MemberType mem_MemberType)
    {
        SqlMem_MemberTypeProvider sqlMem_MemberTypeProvider = new SqlMem_MemberTypeProvider();

        return(sqlMem_MemberTypeProvider.InsertMem_MemberType(mem_MemberType));
    }