public static int UpdateOrder(PurchaseOrderDTO purchaseOrderDto)
        {
            string query = "UPDATE purchase_order SET supplier_id = " + purchaseOrderDto.Supplier + "" + ", discription = '" + purchaseOrderDto.Description + "', total_price = " +
                           purchaseOrderDto.Price + ", discount = " + purchaseOrderDto.Discount / 100 + ", date = '" + purchaseOrderDto.OrderDate + "', pay_type = " +
                           purchaseOrderDto.PayType + ", is_paid = " + purchaseOrderDto.IsPaid + ", paid_at = '" + purchaseOrderDto.PaidDate +
                           "', status = " + purchaseOrderDto.StockStatus + ", update_by = " + purchaseOrderDto.UpdatedBy + ", update_at = '" + DateTime.Now + "' WHERE id = " + purchaseOrderDto.Id;

            try
            {
                DataTable orderTable = DatabaseConnection.ConnectWithServer(query);
                if (orderTable == null)
                {
                    return(-1);
                }

                return(1);
            }
            catch (Exception)
            {
                return(-1);
            }
        }
        public static int AddOrder(PurchaseOrderDTO purchaseOrderDto)
        {
            string query = "INSERT INTO purchase_order (supplier_id, discription, total_price, discount, date, pay_type, is_paid," +
                           "paid_at, status, created_by) VALUES " +
                           "( " + "" + purchaseOrderDto.Supplier + ",'" + purchaseOrderDto.Description + "'," + purchaseOrderDto.Price + "," +
                           purchaseOrderDto.Discount / 100 + ",'" + purchaseOrderDto.OrderDate + "'," + purchaseOrderDto.PayType +
                           "," + purchaseOrderDto.IsPaid + ",'" + DateTime.Now + "'," + purchaseOrderDto.StockStatus + "," + purchaseOrderDto.CreatedBy + ")";

            try
            {
                DataTable orderTable = DatabaseConnection.ConnectWithServer(query);
                if (orderTable == null)
                {
                    return(-1);
                }

                return(1);
            }
            catch (Exception)
            {
                return(-1);
            }
        }