Example #1
0
        private void processStoreAdd()
        {
            var sNicName = txtBox_StoreNicName.Text;

            if (PickupLocation.DoesStoreExist(sNicName))
            {
                MessageBox.Show("Store Nicname already exists, choose another name");
                return;
            }
            var sName  = txtBox_StoreName.Text;
            var sAdd   = txtBox_StoreAddress.Text;
            var sCity  = txtBox_StoreCity.Text;
            var sSt    = txtBox_StoreState.Text;
            var sZip   = txtBox_StoreZip.Text;
            var sPhone = txtBox_StorePhone.Text;
            var sIa    = ChkBox_StoreInactive.Checked;
            var sSc    = txtBox_ShipCode.Text;

            if (PickupLocation.AddStore(sNicName, sName, sAdd, sCity, sSt, sZip, sPhone, sIa, sSc))
            {
                Close();
            }
            else
            {
                MessageBox.Show("Failed to add store");
            }
        }
Example #2
0
        private void fillStoreCmbBox()
        {
            var strDTable = PickupLocation.GetStoreDataTable();

            cmbbox_KeyWord_Stores.DataSource    = strDTable;
            cmbbox_KeyWord_Stores.DisplayMember = "Store";
            cmbbox_KeyWord_Stores.ValueMember   = "Store";
        }
Example #3
0
 private void processStoreDelete()
 {
     if (PickupLocation.DeleteStore(storeId))
     {
         Close();
     }
     else
     {
         MessageBox.Show("Failed to delete store");
     }
 }
Example #4
0
        private void processStoreUpdate()
        {
            var sNicName = txtBox_StoreNicName.Text;
            var sName    = txtBox_StoreName.Text;
            var sAdd     = txtBox_StoreAddress.Text;
            var sCity    = txtBox_StoreCity.Text;
            var sSt      = txtBox_StoreState.Text;
            var sZip     = txtBox_StoreZip.Text;
            var sPhone   = txtBox_StorePhone.Text;
            var sIa      = ChkBox_StoreInactive.Checked;
            var sSc      = txtBox_ShipCode.Text;

            if (PickupLocation.UpdateStore(storeId, sNicName, sName, sAdd, sCity, sSt, sZip, sPhone, sIa, sSc))
            {
                Close();
            }
            else
            {
                MessageBox.Show("Failed to update store");
            }
        }