/// <summary> /// Updates a EmailConfirmationType record and returns the number of records affected /// </summary> public static int Update(EmailConfirmationTypeDO DO) { SqlParameter _EmailConfirmationTypeID = new SqlParameter("EmailConfirmationTypeID", SqlDbType.VarChar); _EmailConfirmationTypeID.Value = DO.EmailConfirmationTypeID; SqlParameter[] _params = new SqlParameter[] { _EmailConfirmationTypeID }; string pid = ConfigurationManager.AppSettings["ePermitDAL"]; return DataCommon.ExecuteScalar("[dbo].[EmailConfirmationType_Update]", _params, pid); }
/// <summary> /// Creates a new EmailConfirmationType record using async /// </summary> public static async Task CreateAsync(EmailConfirmationTypeDO DO) { SqlParameter _EmailConfirmationTypeID = new SqlParameter("EmailConfirmationTypeID", SqlDbType.VarChar); _EmailConfirmationTypeID.Value = DO.EmailConfirmationTypeID; SqlParameter[] _params = new SqlParameter[] { _EmailConfirmationTypeID }; string pid = ConfigurationManager.AppSettings["ePermitDAL"]; await DataCommon.ExecuteNonQueryAsync("[dbo].[EmailConfirmationType_Insert]", _params, pid); }
/// <summary> /// Selects EmailConfirmationType records by PK /// </summary> public static async Task<EmailConfirmationTypeDO[]> GetByPKAsync(String EmailConfirmationTypeID) { SqlParameter _EmailConfirmationTypeID = new SqlParameter("EmailConfirmationTypeID", SqlDbType.VarChar); _EmailConfirmationTypeID.Value = EmailConfirmationTypeID; SqlParameter[] _params = new SqlParameter[] { _EmailConfirmationTypeID }; string pid = ConfigurationManager.AppSettings["ePermitDAL"]; SafeReader sr = await DataCommon.ExecuteSafeReaderAsync("[dbo].[EmailConfirmationType_GetByPK]", _params, pid); List<EmailConfirmationTypeDO> objs = new List<EmailConfirmationTypeDO>(); while(sr.Read()) { EmailConfirmationTypeDO obj = new EmailConfirmationTypeDO(); obj.EmailConfirmationTypeID = sr.GetString(sr.GetOrdinal("EmailConfirmationTypeID")); objs.Add(obj); } return objs.ToArray(); }
/// <summary> /// Gets all EmailConfirmationType records /// </summary> public static async Task<EmailConfirmationTypeDO[]> GetAllAsync() { string pid = ConfigurationManager.AppSettings["ePermitDAL"]; SafeReader sr = await DataCommon.ExecuteSafeReaderAsync("[dbo].[EmailConfirmationType_GetAll]", new SqlParameter[] { }, pid); List<EmailConfirmationTypeDO> objs = new List<EmailConfirmationTypeDO>(); while(sr.Read()){ EmailConfirmationTypeDO obj = new EmailConfirmationTypeDO(); obj.EmailConfirmationTypeID = sr.GetString(sr.GetOrdinal("EmailConfirmationTypeID")); objs.Add(obj); } return objs.ToArray(); }