Exemplo n.º 1
0
    public static Comn_ResultType GetComn_ResultTypeByID(int id)
    {
        Comn_ResultType            comn_ResultType            = new Comn_ResultType();
        SqlComn_ResultTypeProvider sqlComn_ResultTypeProvider = new SqlComn_ResultTypeProvider();

        comn_ResultType = sqlComn_ResultTypeProvider.GetComn_ResultTypeByID(id);
        return(comn_ResultType);
    }
Exemplo n.º 2
0
    public int InsertComn_ResultType(Comn_ResultType comn_ResultType)
    {
        using (SqlConnection connection = new SqlConnection(this.ConnectionString))
        {
            SqlCommand cmd = new SqlCommand("IEB_InsertComn_ResultType", connection);
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.Add("@Comn_ResultTypeID", SqlDbType.Int).Direction    = ParameterDirection.Output;
            cmd.Parameters.Add("@Comn_ResultTypeName", SqlDbType.NVarChar).Value = comn_ResultType.Comn_ResultTypeName;
            connection.Open();

            int result = cmd.ExecuteNonQuery();
            return((int)cmd.Parameters["@Comn_ResultTypeID"].Value);
        }
    }
Exemplo n.º 3
0
    public bool UpdateComn_ResultType(Comn_ResultType comn_ResultType)
    {
        using (SqlConnection connection = new SqlConnection(this.ConnectionString))
        {
            SqlCommand cmd = new SqlCommand("IEB_UpdateComn_ResultType", connection);
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.Add("@Comn_ResultTypeID", SqlDbType.Int).Value        = comn_ResultType.Comn_ResultTypeID;
            cmd.Parameters.Add("@Comn_ResultTypeName", SqlDbType.NVarChar).Value = comn_ResultType.Comn_ResultTypeName;
            connection.Open();

            int result = cmd.ExecuteNonQuery();
            return(result == 1);
        }
    }
Exemplo n.º 4
0
 public Comn_ResultType GetComn_ResultTypeFromReader(IDataReader reader)
 {
     try
     {
         Comn_ResultType comn_ResultType = new Comn_ResultType
                                           (
             (int)reader["Comn_ResultTypeID"],
             reader["Comn_ResultTypeName"].ToString()
                                           );
         return(comn_ResultType);
     }
     catch (Exception ex)
     {
         return(null);
     }
 }
Exemplo n.º 5
0
    public static bool UpdateComn_ResultType(Comn_ResultType comn_ResultType)
    {
        SqlComn_ResultTypeProvider sqlComn_ResultTypeProvider = new SqlComn_ResultTypeProvider();

        return(sqlComn_ResultTypeProvider.UpdateComn_ResultType(comn_ResultType));
    }
Exemplo n.º 6
0
    public static int InsertComn_ResultType(Comn_ResultType comn_ResultType)
    {
        SqlComn_ResultTypeProvider sqlComn_ResultTypeProvider = new SqlComn_ResultTypeProvider();

        return(sqlComn_ResultTypeProvider.InsertComn_ResultType(comn_ResultType));
    }