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); }
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); } }
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); } }
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); } }
public static bool UpdateComn_ResultType(Comn_ResultType comn_ResultType) { SqlComn_ResultTypeProvider sqlComn_ResultTypeProvider = new SqlComn_ResultTypeProvider(); return(sqlComn_ResultTypeProvider.UpdateComn_ResultType(comn_ResultType)); }
public static int InsertComn_ResultType(Comn_ResultType comn_ResultType) { SqlComn_ResultTypeProvider sqlComn_ResultTypeProvider = new SqlComn_ResultTypeProvider(); return(sqlComn_ResultTypeProvider.InsertComn_ResultType(comn_ResultType)); }