Ejemplo n.º 1
0
 public AddEditPackage(ManagePackagesListing managePackagesListing = null)
 {
     InitializeComponent();
     lblTitle.Text          = "Add New Package";
     this.Text              = "Add New Package";
     isEditMode             = false;
     _managePackagesListing = managePackagesListing;
     _db = new TravelExpertsEntities();
 }
Ejemplo n.º 2
0
        private void managePackagesToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var packagelist = new ManagePackagesListing
            {
                MdiParent = this
            };

            packagelist.Show();
        }
Ejemplo n.º 3
0
        public AddEditPackage(Package packageToEdit, ManagePackagesListing managePackagesListing = null)
        {
            InitializeComponent();
            lblTitle.Text          = "Edit Packages";
            this.Text              = "Edit Packages";
            _managePackagesListing = managePackagesListing;

            if (packageToEdit == null)
            {
                MessageBox.Show("Please ensure you selected a valid Package to edit");
                Close();
            }
            else
            {
                isEditMode = true;
                _db        = new TravelExpertsEntities();
                PopulateFields(packageToEdit);
            }
        }