예제 #1
0
        private void grid1_CellDoubleClick(object sender, ODGridClickEventArgs e)
        {
            FormSheetDefEdit FormS = new FormSheetDefEdit(grid1.SelectedTag <SheetDef>());

            FormS.IsInternal = true;
            FormS.ShowDialog();
        }
        ///<summary>Opens a SheetDefEdit window and returns the SheetDef.SheetDefNum.  Returns -1 if user cancels or deletes the Dashboard.</summary>
        private long EditWidget(SheetDef sheetDefWidget = null)
        {
            if (sheetDefWidget == null)
            {
                sheetDefWidget = new SheetDef()
                {
                    SheetType = SheetTypeEnum.PatientDashboardWidget,
                    FontName  = "Microsoft Sans Serif",
                    FontSize  = 9,
                    Height    = 800,
                    Width     = 400,
                };
                FormSheetDef FormSD = new FormSheetDef();
                FormSD.SheetDefCur = sheetDefWidget;
                FormSD.ShowDialog();
                if (FormSD.DialogResult != DialogResult.OK)
                {
                    return(-1);
                }
                sheetDefWidget.SheetFieldDefs = new List <SheetFieldDef>();
                sheetDefWidget.IsNew          = true;
            }
            SheetDefs.GetFieldsAndParameters(sheetDefWidget);
            FormSheetDefEdit FormS = new FormSheetDefEdit(sheetDefWidget);

            if (FormS.ShowDialog() == DialogResult.OK)
            {
                DataValid.SetInvalid(InvalidType.Sheets);
                return(sheetDefWidget.SheetDefNum);
            }
            return(-1);
        }
예제 #3
0
        private void grid1_CellDoubleClick(object sender, ODGridClickEventArgs e)
        {
            FormSheetDefEdit FormS = new FormSheetDefEdit(internalList[e.Row]);

            FormS.IsInternal = true;
            FormS.ShowDialog();
        }
예제 #4
0
        private void butNew_Click(object sender, System.EventArgs e)
        {
            //This button is not enabled unless user has appropriate permission for setup.
            //Not allowed to change sheettype once a sheet is created, so we need to let user pick.
            FormSheetDef FormS = new FormSheetDef();

            FormS.IsInitial  = true;
            FormS.IsReadOnly = false;
            SheetDef sheetdef = new SheetDef();

            sheetdef.FontName = "Microsoft Sans Serif";
            sheetdef.FontSize = 9;
            sheetdef.Height   = 1100;
            sheetdef.Width    = 850;
            FormS.SheetDefCur = sheetdef;
            FormS.ShowDialog();
            if (FormS.DialogResult != DialogResult.OK)
            {
                return;
            }
            //what about parameters?
            sheetdef.SheetFieldDefs = new List <SheetFieldDef>();
            sheetdef.IsNew          = true;
            FormSheetDefEdit FormSD = new FormSheetDefEdit(sheetdef);

            FormSD.ShowDialog();            //It will be saved to db inside this form.
            FillGrid2(sheetdef.SheetDefNum);
            changed = true;
        }
        private void gridInternal_CellDoubleClick(object sender, ODGridClickEventArgs e)
        {
            if (gridInternal.SelectedGridRows.Count == 0)
            {
                return;
            }
            FormSheetDefEdit FormS = new FormSheetDefEdit(gridInternal.SelectedTag <SheetDef>());

            FormS.IsInternal = true;
            FormS.ShowDialog();
        }
예제 #6
0
        private void grid2_CellDoubleClick(object sender, ODGridClickEventArgs e)
        {
            SheetDef sheetdef = grid2.SelectedTag <SheetDef>();

            SheetDefs.GetFieldsAndParameters(sheetdef);
            FormSheetDefEdit FormS = new FormSheetDefEdit(sheetdef);

            FormS.ShowDialog();
            FillGrid2(sheetdef.SheetDefNum);
            changed = true;
        }
예제 #7
0
        private void gridOtherLayouts_CellDoubleClick(object sender, ODGridClickEventArgs e)
        {
            SheetDef sheetDef = _listOtherSheetDefs[e.Row];

            if (sheetDef.SheetDefNum != 0)                  //Is not the internal sheet.
            {
                SheetDefs.GetFieldsAndParameters(sheetDef); //Other user custom sheetdefs need their fields filled.
            }
            FormSheetDefEdit formSheetDefEdit = new FormSheetDefEdit(sheetDef);

            formSheetDefEdit.IsInternal = true;          //So the current user cannot edit, including custom sheets for other users.
            formSheetDefEdit.ShowDialog();
        }
예제 #8
0
        private void gridCustomLayouts_CellDoubleClick(object sender, ODGridClickEventArgs e)
        {
            SheetDef sheetDef = _listCustomSheetDefs[e.Row];

            SheetDefs.GetFieldsAndParameters(sheetDef);
            FormSheetDefEdit formSheetDefEdit = new FormSheetDefEdit(sheetDef);

            if (formSheetDefEdit.ShowDialog() != DialogResult.OK)
            {
                return;
            }
            _isSignalNeeded = true;
            RefreshAndFillGrids(sheetDef.SheetDefNum);
        }
예제 #9
0
        private void grid2_CellDoubleClick(object sender, ODGridClickEventArgs e)
        {
            SheetDef sheetdef = SheetDefC.Listt[e.Row];

            SheetDefs.GetFieldsAndParameters(sheetdef);
            FormSheetDefEdit FormS = new FormSheetDefEdit(sheetdef);

            FormS.ShowDialog();
            FillGrid2();
            for (int i = 0; i < SheetDefC.Listt.Count; i++)
            {
                if (SheetDefC.Listt[i].SheetDefNum == sheetdef.SheetDefNum)
                {
                    grid2.SetSelected(i, true);
                }
            }
            changed = true;
        }
예제 #10
0
        private void butNew_Click(object sender, EventArgs e)
        {
            //This button is not enabled unless user has appropriate permission for setup.
            SheetDef sheetDefNew = _listOtherSheetDefs[0].Copy();          //First item is always internal.  Only 1 interal sheet def per instance of this window.

            sheetDefNew.Description = "Custom Layout " + (_listCustomSheetDefs.Count + 1).ToString();
            sheetDefNew.IsNew       = true;
            //sheetDefNew.UserNum=Security.CurUser.UserNum;
            FormSheetDef formSheetDef = new FormSheetDef();

            formSheetDef.IsInitial   = false;        //User can not change SheetType.
            formSheetDef.IsReadOnly  = false;
            formSheetDef.SheetDefCur = sheetDefNew;
            if (formSheetDef.ShowDialog() != DialogResult.OK)
            {
                return;
            }
            FormSheetDefEdit formSheetDefEdit = new FormSheetDefEdit(sheetDefNew);

            formSheetDefEdit.ShowDialog();            //It will be saved to db inside this form.
            _isSignalNeeded = true;
            RefreshAndFillGrids(sheetDefNew.SheetDefNum);
        }
예제 #11
0
 private void grid2_CellDoubleClick(object sender,ODGridClickEventArgs e)
 {
     SheetDef sheetdef=SheetDefC.Listt[e.Row];
     SheetDefs.GetFieldsAndParameters(sheetdef);
     FormSheetDefEdit FormS=new FormSheetDefEdit(sheetdef);
     FormS.ShowDialog();
     FillGrid2();
     for(int i=0;i<SheetDefC.Listt.Count;i++){
         if(SheetDefC.Listt[i].SheetDefNum==sheetdef.SheetDefNum){
             grid2.SetSelected(i,true);
         }
     }
     changed=true;
 }
예제 #12
0
 private void grid1_CellDoubleClick(object sender,ODGridClickEventArgs e)
 {
     FormSheetDefEdit FormS=new FormSheetDefEdit(internalList[e.Row]);
     FormS.IsInternal=true;
     FormS.ShowDialog();
 }
예제 #13
0
 private void butNew_Click(object sender, System.EventArgs e)
 {
     //This button is not enabled unless user has appropriate permission for setup.
     //Not allowed to change sheettype once a sheet is created, so we need to let user pick.
     FormSheetDef FormS=new FormSheetDef();
     FormS.IsInitial=true;
     FormS.IsReadOnly=false;
     SheetDef sheetdef=new SheetDef();
     sheetdef.FontName="Microsoft Sans Serif";
     sheetdef.FontSize=9;
     sheetdef.Height=1100;
     sheetdef.Width=850;
     FormS.SheetDefCur=sheetdef;
     FormS.ShowDialog();
     if(FormS.DialogResult!=DialogResult.OK){
         return;
     }
     //what about parameters?
     sheetdef.SheetFieldDefs=new List<SheetFieldDef>();
     sheetdef.IsNew=true;
     FormSheetDefEdit FormSD=new FormSheetDefEdit(sheetdef);
     FormSD.ShowDialog();//It will be saved to db inside this form.
     FillGrid2();
     for(int i=0;i<SheetDefC.Listt.Count;i++){
         if(SheetDefC.Listt[i].SheetDefNum==sheetdef.SheetDefNum){
             grid2.SetSelected(i,true);
         }
     }
     changed=true;
 }