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"); } }
private void fillStoreCmbBox() { var strDTable = PickupLocation.GetStoreDataTable(); cmbbox_KeyWord_Stores.DataSource = strDTable; cmbbox_KeyWord_Stores.DisplayMember = "Store"; cmbbox_KeyWord_Stores.ValueMember = "Store"; }
private void processStoreDelete() { if (PickupLocation.DeleteStore(storeId)) { Close(); } else { MessageBox.Show("Failed to delete store"); } }
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"); } }