コード例 #1
0
        public bool Update_HoursPrice(DTO_HoursPrice Fixed)
        {
            connect();

            string sql = "UPDATE  capston1_customers.HoursPrice SET  Hours=@Hours,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("@Hours", MySqlDbType.Decimal).Value    = Fixed.Hours;
                _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);
        }
コード例 #2
0
        public bool Insert_HoursPrice(DTO_HoursPrice Fixed)
        {
            connect();

            string sql = "INSERT INTO capston1_customers.HoursPrice (No,Matter_ID, Date, Description, Hours) VALUES (@No,@Matter_ID, @Date, @Description, @Hours)";

            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("@Hours", MySqlDbType.Decimal).Value         = Fixed.Hours;
                _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);
        }
コード例 #3
0
        public bool Delete_HoursPrice(DTO_HoursPrice Fixed)
        {
            connect();

            string sql = "DELETE FROM HoursPrice 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);
        }
コード例 #4
0
 public bool Delete_HoursPrice(DTO_HoursPrice Fixed)
 {
     return(_DAO_Time.Delete_HoursPrice(Fixed));
 }
コード例 #5
0
 public bool Update_HoursPrice(DTO_HoursPrice Fixed)
 {
     return(_DAO_Time.Update_HoursPrice(Fixed));
 }
コード例 #6
0
 public bool Insert_HoursPrice(DTO_HoursPrice Fixed)
 {
     return(_DAO_Time.Insert_HoursPrice(Fixed));
 }