public static CUSTIDTYPE GetCUSTIDTYPEByID(int id) { CUSTIDTYPE cUSTIDTYPE = new CUSTIDTYPE(); SqlCUSTIDTYPEProvider sqlCUSTIDTYPEProvider = new SqlCUSTIDTYPEProvider(); cUSTIDTYPE = sqlCUSTIDTYPEProvider.GetCUSTIDTYPEByID(id); return(cUSTIDTYPE); }
public int InsertCUSTIDTYPE(CUSTIDTYPE cUSTIDTYPE) { using (SqlConnection connection = new SqlConnection(this.ConnectionString)) { SqlCommand cmd = new SqlCommand("AbiMatuEnterprise_InsertCUSTIDTYPE", connection); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add("@CUSTIDTYPEID", SqlDbType.Int).Direction = ParameterDirection.Output; cmd.Parameters.Add("@CUSTIDTYPEName", SqlDbType.NChar).Value = cUSTIDTYPE.CUSTIDTYPEName; connection.Open(); int result = cmd.ExecuteNonQuery(); return((int)cmd.Parameters["@CUSTIDTYPEID"].Value); } }
public bool UpdateCUSTIDTYPE(CUSTIDTYPE cUSTIDTYPE) { using (SqlConnection connection = new SqlConnection(this.ConnectionString)) { SqlCommand cmd = new SqlCommand("AbiMatuEnterprise_UpdateCUSTIDTYPE", connection); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add("@CUSTIDTYPEID", SqlDbType.Int).Value = cUSTIDTYPE.CUSTIDTYPEID; cmd.Parameters.Add("@CUSTIDTYPEName", SqlDbType.NChar).Value = cUSTIDTYPE.CUSTIDTYPEName; connection.Open(); int result = cmd.ExecuteNonQuery(); return(result == 1); } }
public CUSTIDTYPE GetCUSTIDTYPEFromReader(IDataReader reader) { try { CUSTIDTYPE cUSTIDTYPE = new CUSTIDTYPE ( (int)reader["CUSTIDTYPEID"], reader["CUSTIDTYPEName"].ToString() ); return(cUSTIDTYPE); } catch (Exception ex) { return(null); } }
public static bool UpdateCUSTIDTYPE(CUSTIDTYPE cUSTIDTYPE) { SqlCUSTIDTYPEProvider sqlCUSTIDTYPEProvider = new SqlCUSTIDTYPEProvider(); return(sqlCUSTIDTYPEProvider.UpdateCUSTIDTYPE(cUSTIDTYPE)); }
public static int InsertCUSTIDTYPE(CUSTIDTYPE cUSTIDTYPE) { SqlCUSTIDTYPEProvider sqlCUSTIDTYPEProvider = new SqlCUSTIDTYPEProvider(); return(sqlCUSTIDTYPEProvider.InsertCUSTIDTYPE(cUSTIDTYPE)); }