コード例 #1
0
ファイル: HospitalSettings.cs プロジェクト: HCMISFE/FE
        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);
        }
コード例 #2
0
 private void ShowAddNewShelf(object sender, EventArgs e)
 {
     CurrentShelf.AddNew();
     groupControl2.Text = @"Rack Details: Add New Rack";
     // Show the storage type combo box
     lkStorageTypes.Visible = true;
     groupControl2.Enabled  = true;
 }
コード例 #3
0
        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();
        }