Example #1
0
        private void btnMoreDetailsParcel_Click(object sender, EventArgs e)
        {
            //to do: show more complete view of data in parcel db
            frmMaintainParcels maintain = new frmMaintainParcels();

            maintain.dateCheck();
        }
Example #2
0
        private void deleteToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmMaintainParcels parcel = new frmMaintainParcels(getUserID());
            frmParent          parent = this;

            parcel.MdiParent = parent;
            parcel.Show();
        }
Example #3
0
        private void deleteToolStripMenuItem_Click(object sender, EventArgs e)
        {
            maintain = new frmMaintainParcels();
            frmParent parent = this;

            maintain.MdiParent = parent;
            maintain.Show();
        }
Example #4
0
        private void addToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmMaintainParcels parcels = new frmMaintainParcels(getUserID());
            frmParcelDetails   details = new frmParcelDetails(parcels, true, getUserID());
            frmParent          parent  = this;

            details.MdiParent = parent;
            details.Show();
        }
        private void btnAddNewParcel_Click(object sender, EventArgs e)
        {
            frmMaintainParcels maintain = this;
            frmParcelDetails   details  = new frmParcelDetails(maintain, true, userID);

            details.Show();

            con.Close();
        }
Example #6
0
        public frmParcelDetails(frmMaintainParcels maintain)
        {
            InitializeComponent();
            this.maintain = maintain;
            con           = new SqlConnection(@"Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=C:\Users\kobus\Documents\GitHub\R-Line-Courier-System\R-Line_Courier_System\R-Line_Courier_System\RLine_Database.mdf;Integrated Security=True");

            populateControls("SELECT Status_ID,Status_Description FROM PARCEL_STATUS GROUP BY Status_Description,Status_ID", "Status_Description", "Status_ID", cbDeliveryStatus);
            populateControls("SELECT Client_ID,Company_Name FROM CLIENTS group by Company_Name,Client_ID", "Company_Name", "Client_ID", cbCompanyName);
            populateControls("SELECT postal_Code_ID,Postal_Code FROM POSTAL_CODE GROUP BY Postal_Code,Postal_Code_ID", "Postal_Code", "Postal_Code_ID", cbPostalCode);
        }
Example #7
0
        private void addToolStripMenuItem_Click(object sender, EventArgs e)
        {
            maintain = new frmMaintainParcels();
            frmParent        parent  = this;
            frmParcelDetails details = new frmParcelDetails(maintain);

            details.disableButton(true);
            details.MdiParent = parent;
            details.Show();
        }
Example #8
0
        private void btnAddNewParcel_Click(object sender, EventArgs e)
        {
            frmMaintainParcels maintain = this;
            frmParcelDetails   details  = new frmParcelDetails(maintain);

            details.disableButton(true);
            details.Show();

            con.Close();
        }
Example #9
0
        private void btnUpdateParcel_Click(object sender, EventArgs e)
        {
            frmMaintainParcels maintain = this;
            frmParcelDetails   details  = new frmParcelDetails(maintain);

            details.setParcelID(dgvParcels.SelectedCells[0].Value.ToString());
            details.autoFillForm();
            details.disableButton(false);
            details.Show();

            //to do: fill frmParcelDetails fields with selected data entry
        }
        private void btnUpdateParcel_Click(object sender, EventArgs e)
        {
            frmMaintainParcels maintain = this;

            if (Int32.TryParse(dgvParcels.SelectedCells[0].Value.ToString(), out int i))
            {
                frmParcelDetails details = new frmParcelDetails(maintain, false, userID);
                details.setParcelID(dgvParcels.SelectedCells[0].Value.ToString());
                details.autoFillForm();
                details.Show();
            }
        }
        public frmParcelDetails(frmMaintainParcels maintain, bool state, int userID)
        {
            InitializeComponent();
            this.userID   = userID;
            btnState      = state;
            flag          = false;
            this.maintain = maintain;
            con           = new SqlConnection(@"Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\RLine_Database.mdf;Integrated Security=True");

            populateControls("SELECT Status_ID,Status_Description FROM PARCEL_STATUS GROUP BY Status_Description,Status_ID", "Status_Description", "Status_ID", cbDeliveryStatus);
            populateControls("SELECT Client_ID,Company_Name FROM CLIENTS group by Company_Name,Client_ID", "Company_Name", "Client_ID", cbCompanyName);
            flag = true;
            populateControls("SELECT postal_Code_ID,Postal_Code FROM POSTAL_CODE GROUP BY Postal_Code,Postal_Code_ID", "Postal_Code", "Postal_Code_ID", cbPostalCode);
        }