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(); }
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); }
/// <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); }