public bool Update_FixedPrice(DTO_FixedPrice Fixed) { connect(); string sql = "UPDATE capston1_customers.FixedPrice SET Amount=@Amount,Date =@Date, Description=@Description WHERE No = @No"; try { _cmd = new MySqlCommand(sql, _cnn); _cmd.Parameters.Add("@No", MySqlDbType.VarChar).Value = Fixed.No; _cmd.Parameters.Add("@Amount", MySqlDbType.Decimal).Value = Fixed.Amount; _cmd.Parameters.Add("@Date", MySqlDbType.Text).Value = Fixed.Date; _cmd.Parameters.Add("@Description", MySqlDbType.Text).Value = Fixed.Description; _cmd.ExecuteNonQuery(); _cmd.Dispose(); disconnect(); } catch (Exception ex) { disconnect(); return(false); throw ex; } return(true); }
public bool Insert_FixedPrice(DTO_FixedPrice Fixed) { connect(); string sql = "INSERT INTO capston1_customers.FixedPrice (No,Matter_ID, Date, Description, Amount) VALUES (@No,@Matter_ID, @Date, @Description, @Amount)"; try { _cmd = new MySqlCommand(sql, _cnn); _cmd.Parameters.Add("@No", MySqlDbType.VarChar).Value = Fixed.No; _cmd.Parameters.Add("@Matter_ID", MySqlDbType.VarChar, 30).Value = Fixed.Matter_ID; _cmd.Parameters.Add("@Amount", MySqlDbType.Decimal).Value = Fixed.Amount; _cmd.Parameters.Add("@Date", MySqlDbType.Text).Value = Fixed.Date; _cmd.Parameters.Add("@Description", MySqlDbType.Text).Value = Fixed.Description; _cmd.ExecuteNonQuery(); _cmd.Dispose(); disconnect(); } catch (Exception ex) { disconnect(); return(false); throw ex; } return(true); }
public bool Delete_FixedPrice(DTO_FixedPrice Fixed) { connect(); string sql = "DELETE FROM FixedPrice WHERE No = @No"; try { _cmd = new MySqlCommand(sql, _cnn); _cmd.Parameters.Add("@No", MySqlDbType.VarChar).Value = Fixed.No; _cmd.ExecuteNonQuery(); _cmd.Dispose(); disconnect(); } catch (Exception ex) { disconnect(); return(false); throw ex; } return(true); }
public bool Delete_FixedPrice(DTO_FixedPrice Fixed) { return(_DAO_Time.Delete_FixedPrice(Fixed)); }
public bool Update_FixedPrice(DTO_FixedPrice Fixed) { return(_DAO_Time.Update_FixedPrice(Fixed)); }
public bool Insert_FixedPrice(DTO_FixedPrice Fixed) { return(_DAO_Time.Insert_FixedPrice(Fixed)); }