Ejemplo n.º 1
0
        private void butAdd_Click(object sender, System.EventArgs e)
        {
            Operatory opCur = new Operatory();

            opCur.IsNew = true;
            if (PrefC.HasClinicsEnabled && !comboClinic.IsAllSelected && !comboClinic.IsNothingSelected)
            {
                opCur.ClinicNum = comboClinic.SelectedClinicNum;
            }
            if (gridMain.SelectedIndices.Length > 0)          //a row is selected
            {
                opCur.ItemOrder = gridMain.SelectedIndices[0];
            }
            else
            {
                opCur.ItemOrder = _listOps.Count;              //goes at end of list
            }
            FormOperatoryEdit FormE = new FormOperatoryEdit(opCur);

            FormE.ListOps = _listOps;
            FormE.IsNew   = true;
            FormE.ShowDialog();
            if (FormE.DialogResult == DialogResult.Cancel)
            {
                return;
            }
            FillGrid();
        }
Ejemplo n.º 2
0
        private void butAdd_Click(object sender, System.EventArgs e)
        {
            Operatory opCur = new Operatory();

            if (gridMain.SelectedIndices.Length > 0)          //a row is selected
            {
                opCur.ItemOrder = gridMain.SelectedIndices[0];
            }
            else
            {
                opCur.ItemOrder = Operatories.List.Length;              //goes at end of list
            }
            FormOperatoryEdit FormE = new FormOperatoryEdit(opCur);

            FormE.IsNew = true;
            FormE.ShowDialog();
            if (FormE.DialogResult == DialogResult.Cancel)
            {
                return;
            }
            if (gridMain.SelectedIndices.Length > 0)
            {
                //fix the itemOrder of every Operatory following this one
                for (int i = gridMain.SelectedIndices[0]; i < Operatories.List.Length; i++)
                {
                    Operatories.List[i].ItemOrder++;
                    Operatories.InsertOrUpdate(Operatories.List[i], false);
                }
            }
            FillGrid();
            changed = true;
        }
Ejemplo n.º 3
0
 private void butAdd_Click(object sender, System.EventArgs e)
 {
     Operatory opCur=new Operatory();
     if(gridMain.SelectedIndices.Length>0){//a row is selected
         opCur.ItemOrder=gridMain.SelectedIndices[0];
     }
     else{
         opCur.ItemOrder=OperatoryC.Listt.Count;//goes at end of list
     }
     FormOperatoryEdit FormE=new FormOperatoryEdit(opCur);
     FormE.IsNew=true;
     FormE.ShowDialog();
     if(FormE.DialogResult==DialogResult.Cancel){
         return;
     }
     if(gridMain.SelectedIndices.Length>0){
         //fix the itemOrder of every Operatory following this one
         for(int i=gridMain.SelectedIndices[0];i<OperatoryC.Listt.Count;i++){
             OperatoryC.Listt[i].ItemOrder++;
             Operatories.Update(OperatoryC.Listt[i]);
         }
     }
     FillGrid();
     changed=true;
 }
Ejemplo n.º 4
0
        private void gridMain_CellDoubleClick(object sender, OpenDental.UI.ODGridClickEventArgs e)
        {
            FormOperatoryEdit FormOE = new FormOperatoryEdit((Operatory)gridMain.Rows[e.Row].Tag);

            FormOE.ListOps = _listOps;
            FormOE.ShowDialog();
            FillGrid();
        }
Ejemplo n.º 5
0
        private void gridMain_CellDoubleClick(object sender, OpenDental.UI.ODGridClickEventArgs e)
        {
            FormOperatoryEdit FormE = new FormOperatoryEdit(Operatories.List[e.Row]);

            FormE.ShowDialog();
            FillGrid();
            changed = true;
        }
Ejemplo n.º 6
0
		private void butAdd_Click(object sender, System.EventArgs e) {
			Operatory opCur=new Operatory();
			if(gridMain.SelectedIndices.Length>0){//a row is selected
				opCur.ItemOrder=gridMain.SelectedIndices[0];
			}
			else{
				opCur.ItemOrder=_listOps.Count;//goes at end of list
			}
			FormOperatoryEdit FormE=new FormOperatoryEdit(opCur);
			FormE.ListOps=_listOps;
			FormE.IsNew=true;
			FormE.ShowDialog();
			if(FormE.DialogResult==DialogResult.Cancel){
				return;
			}
			FillGrid();
		}
Ejemplo n.º 7
0
		private void gridMain_CellDoubleClick(object sender, OpenDental.UI.ODGridClickEventArgs e) {
			FormOperatoryEdit FormE=new FormOperatoryEdit(_listOps[e.Row]);
			FormE.ListOps=_listOps;
			FormE.ShowDialog();
			FillGrid();
		}
Ejemplo n.º 8
0
		private void gridMain_CellDoubleClick(object sender, OpenDental.UI.ODGridClickEventArgs e) {
			FormOperatoryEdit FormE=new FormOperatoryEdit(OperatoryC.Listt[e.Row]);
			FormE.ShowDialog();
			FillGrid();
			changed=true;
		}