private void xpButton12_Click(object sender, EventArgs e) { Shelf slf = new Shelf(); if(txtShelf.Text=="") { XtraMessageBox.Show("Please enter the bin code", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } if (_shelfId != 0) slf.LoadByPrimaryKey(_shelfId); else slf.AddNew(); slf.ShelfCode = txtShelf.Text; //slf.ShelfStorageType = int.Parse(cboType.SelectedItem.ToString()); slf.Save(); DataTable dtSlf = slf.GetShelves(); PopulateShelves(dtSlf.DefaultView); ResetLocations(); XtraMessageBox.Show("Bin Location Record Updated.", "Confirmation", MessageBoxButtons.OK, MessageBoxIcon.Information); }
private void lkStorageTypes_EditValueChanged(object sender, EventArgs e) { DataRow dr = gridViewPhysicalStores.GetFocusedDataRow(); int id = Convert.ToInt32(dr["ID"]); BLL.Shelf shelf = new Shelf(); shelf.LoadByPrimaryKey(id); if (shelf.RowCount > 0) { shelf.ShelfStorageType = Convert.ToInt32(lkStorageTypes.EditValue); shelf.Save(); } //BLL.PhysicalStore phStore = new PhysicalStore(); //phStore.LoadByPrimaryKey(id); //phStore.PhysicalStoreTypeID = Convert.ToInt32(lkStorageTypes.EditValue); //phStore.Save(); PopulateLookups(); }
private void btnSaveShelf_Click(object sender, EventArgs e) { Shelf slf = new Shelf(); if (shelfId != 0) slf.LoadByPrimaryKey(shelfId); else slf.AddNew(); slf.ShelfCode = txtShelf.Text; slf.ShelfStorageType = int.Parse(cboType.SelectedItem.ToString()); slf.Save(); DataTable dtSlf = slf.GetShelves(); PopulateShelves(dtSlf.DefaultView); ResetLocations(); }
/// <summary> /// Creates the default quaranteen. /// </summary> private static void CreateDefaultQuaranteen() { // create the quaranteen type shelf PhysicalStore ps = new PhysicalStore(); ps.LoadAll(); Shelf shlf = new Shelf(); shlf.AddNew(); shlf.ShelfCode = "A"; shlf.StoreID = ps.ID; shlf.ShelfStorageType = Convert.ToInt32(StorageType.Quaranteen); shlf.Width = shlf.Height = shlf.Length = 1; shlf.Save(); shlf.SavePalletLocationsInShelf(1, 1); shlf.SaveDimentions(1, 1, 1); }