public bool UpdatePackages()
        {
            LoadPackage Lpk = new LoadPackage();

            System.Data.SqlClient.SqlConnection conn = Connection.GetConnection();
            string updateStatement = "UPDATE Packages SET PkgName = @PkgName,PkgStartDate=@PkgStartDate,PkgEndDate=@PkgEndDate,PkgDesc=@PkgDesc,PkgBasePrice=@PkgBasePrice,PkgAgencyCommission=@PCommission WHERE PackageId = @PackageID";

            System.Data.SqlClient.SqlCommand cmd = new System.Data.SqlClient.SqlCommand(updateStatement, conn);
            cmd.Parameters.AddWithValue("@PackageID", Lpk.PackageId);
            cmd.Parameters.AddWithValue("@PkgName", Lpk.PkgName);
            cmd.Parameters.AddWithValue("@PkgStartDate", Lpk.PkgStartDate);
            cmd.Parameters.AddWithValue("@PkgEndDate", Lpk.PkgEndDate);
            cmd.Parameters.AddWithValue("@PkgDesc", Lpk.PkgDesc);
            cmd.Parameters.AddWithValue("@PkgBasePrice", Lpk.PkgBasePrice);
            cmd.Parameters.AddWithValue("@PCommission", Lpk.PkgAgencyCommission);

            try
            {
                conn.Open();
                if (cmd.ExecuteNonQuery() > 0)
                {
                    return(true);
                }
            }
            catch (System.Data.SqlClient.SqlException ex)
            {
                throw ex;
            }
            finally
            {
                conn.Close();
            }
            return(false);
        }
        //public static bool InsertPackages()
        //{
        //    SqlConnection connection = Connection.GetConnection();
        //    String query = "INSERT INTO dbo.Packages (PkgName,PkgStartDate,PkgEndDate,PkgDesc,PkgBasePrice,PkgAgencyCommission) VALUES (@id,@username,@password, @email)";

        //    using (SqlCommand command = new SqlCommand(query, connection))
        //    {
        //        command.Parameters.AddWithValue("@PkgName", "abc");
        //        command.Parameters.AddWithValue("@PkgStartDate", "abc");
        //        command.Parameters.AddWithValue("@PkgEndDate", "abc");
        //        command.Parameters.AddWithValue("@PkgDesc", "abc");
        //        command.Parameters.AddWithValue("@PkgBasePrice", "abc");
        //        command.Parameters.AddWithValue("@PkgAgencyCommission", "abc");

        //        connection.Open();
        //        int result = command.ExecuteNonQuery();

        //        // Check Error
        //        if (result < 0)
        //            Console.WriteLine("Error inserting data into Database!");
        //    }

        //    try
        //    {
        //        connection.Open();
        //        if (cmd.ExecuteNonQuery() > 0) return true;
        //    }
        //    catch (SqlException ex)
        //    {
        //        throw ex;
        //    }
        //    finally
        //    {
        //        connection.Close();
        //    }
        //    return false;
        //}

        public int SavePackages()
        {
            LoadPackage Lpk = new LoadPackage();

            System.Data.SqlClient.SqlConnection conn = Connection.GetConnection();

            String savePackages = "INSERT INTO dbo.Packages (PkgName,PkgStartDate,PkgEndDate,PkgDesc,PkgBasePrice,PkgAgencyCommission) VALUES (@PkgName,@PkgStartDate,@PkgEndDate,@PkgDesc,@PkgBasePrice,@PCommission)";

            System.Data.SqlClient.SqlCommand cmd = new System.Data.SqlClient.SqlCommand(savePackages, conn);
            cmd.Parameters.AddWithValue("@PkgName", Lpk.PkgName);
            cmd.Parameters.AddWithValue("@PkgStartDate", Lpk.PkgStartDate);
            cmd.Parameters.AddWithValue("@PkgEndDate", Lpk.PkgEndDate);
            cmd.Parameters.AddWithValue("@PkgDesc", Lpk.PkgDesc);
            cmd.Parameters.AddWithValue("@PkgBasePrice", Lpk.PkgBasePrice);
            cmd.Parameters.AddWithValue("@PCommission", Lpk.PkgAgencyCommission);

            try
            {
                conn.Open();
                if (cmd.ExecuteNonQuery() > 0)
                {
                    GetDataId = new LoadData();
                    return(GetDataId.MaxId("Select MAX(PackageId) from Packages"));
                }
            }
            catch (System.Data.SqlClient.SqlException ex)
            {
                throw ex;
            }
            finally
            {
                conn.Close();
            }

            return(0);
        }