private void FormBilling_Load(object sender, System.EventArgs e)
 {
     //contrAccount1.checkShowAll.Checked=false;
     //textDate.Text=Ledgers.GetClosestFirst(DateTime.Today).ToShortDateString();
     //Patients.GetAgingList();
     FillTable();
     gridBill.SetSelected(true);
 }
        private void butUp_Click(object sender, System.EventArgs e)
        {
            if (gridMain.SelectedIndices.Length == 0)
            {
                MsgBox.Show(this, "You must first select a row.");
                return;
            }
            int selected = gridMain.SelectedIndices[0];

            if (selected == 0)
            {
                return;                //already at the top
            }
            //move selected item up
            Operatories.List[selected].ItemOrder--;
            Operatories.InsertOrUpdate(Operatories.List[selected], false);
            //move the one above it down
            Operatories.List[selected - 1].ItemOrder++;
            Operatories.InsertOrUpdate(Operatories.List[selected - 1], false);
            FillGrid();
            gridMain.SetSelected(selected - 1, true);
            changed = true;
        }