private void AddItemToList(FIA_Biosum_Manager.RxItemFvsCommandItem oItem)
        {
            this.lvRxFVSCmd.Items.Add("");
            this.lvRxFVSCmd.Items[lvRxFVSCmd.Items.Count - 1].UseItemStyleForSubItems = false;
            for (int z = 1; z <= this.lvRxFVSCmd.Columns.Count - 1; z++)
            {
                this.lvRxFVSCmd.Items[lvRxFVSCmd.Items.Count - 1].SubItems.Add(" ");
            }

            this.lvRxFVSCmd.Items[lvRxFVSCmd.Items.Count - 1].SubItems[COLUMN_RX].Text       = oItem.RxId;
            this.lvRxFVSCmd.Items[lvRxFVSCmd.Items.Count - 1].SubItems[COLUMN_FVSCMD].Text   = oItem.FVSCommand;
            this.lvRxFVSCmd.Items[lvRxFVSCmd.Items.Count - 1].SubItems[COLUMN_P1].Text       = oItem.Parameter1;
            this.lvRxFVSCmd.Items[lvRxFVSCmd.Items.Count - 1].SubItems[COLUMN_P2].Text       = oItem.Parameter2;
            this.lvRxFVSCmd.Items[lvRxFVSCmd.Items.Count - 1].SubItems[COLUMN_P3].Text       = oItem.Parameter3;
            this.lvRxFVSCmd.Items[lvRxFVSCmd.Items.Count - 1].SubItems[COLUMN_P4].Text       = oItem.Parameter4;
            this.lvRxFVSCmd.Items[lvRxFVSCmd.Items.Count - 1].SubItems[COLUMN_P5].Text       = oItem.Parameter5;
            this.lvRxFVSCmd.Items[lvRxFVSCmd.Items.Count - 1].SubItems[COLUMN_P6].Text       = oItem.Parameter6;
            this.lvRxFVSCmd.Items[lvRxFVSCmd.Items.Count - 1].SubItems[COLUMN_P7].Text       = oItem.Parameter7;
            this.lvRxFVSCmd.Items[lvRxFVSCmd.Items.Count - 1].SubItems[COLUMN_OTHER].Text    = oItem.Other;
            this.lvRxFVSCmd.Items[lvRxFVSCmd.Items.Count - 1].SubItems[COLUMN_FVSCMDID].Text = Convert.ToString(oItem.FVSCommandId);



            this.m_oLvAlternateColors.AddRow();
            this.m_oLvAlternateColors.AddColumns(lvRxFVSCmd.Items.Count - 1, this.lvRxFVSCmd.Columns.Count);


            ReferenceFormRxItem.m_bToolBarButtonEnabled[frmRxItem.UC_FVSCMD, frmRxItem.BUTTON_CLEARALL] = true;
            ReferenceFormRxItem.m_bToolBarButtonEnabled[frmRxItem.UC_FVSCMD, frmRxItem.BUTTON_DELETE]   = true;
            ReferenceFormRxItem.m_bToolBarButtonEnabled[frmRxItem.UC_FVSCMD, frmRxItem.BUTTON_EDIT]     = true;
            ReferenceFormRxItem.SetToolBarButtonsEnabled(frmRxItem.UC_FVSCMD);

            this.lvRxFVSCmd.Items[lvRxFVSCmd.Items.Count - 1].Selected = true;
        }
Example #2
0
        private void AddItemToList(FIA_Biosum_Manager.RxItemFvsCommandItem oItem)
        {
            this.lvRxPackageFVSCmd.Items.Add("");
            this.lvRxPackageFVSCmd.Items[lvRxPackageFVSCmd.Items.Count - 1].UseItemStyleForSubItems = false;
            for (int z = 1; z <= this.lvRxPackageFVSCmd.Columns.Count - 1; z++)
            {
                this.lvRxPackageFVSCmd.Items[lvRxPackageFVSCmd.Items.Count - 1].SubItems.Add(" ");
            }
            this.lvRxPackageFVSCmd.Items[lvRxPackageFVSCmd.Items.Count - 1].SubItems[COLUMN_RX].Text     = oItem.RxId;
            this.lvRxPackageFVSCmd.Items[lvRxPackageFVSCmd.Items.Count - 1].SubItems[COLUMN_FVSCMD].Text = oItem.FVSCommand;
            this.lvRxPackageFVSCmd.Items[lvRxPackageFVSCmd.Items.Count - 1].SubItems[COLUMN_P1].Text     = oItem.Parameter1;
            this.lvRxPackageFVSCmd.Items[lvRxPackageFVSCmd.Items.Count - 1].SubItems[COLUMN_P2].Text     = oItem.Parameter2;
            this.lvRxPackageFVSCmd.Items[lvRxPackageFVSCmd.Items.Count - 1].SubItems[COLUMN_P3].Text     = oItem.Parameter3;
            this.lvRxPackageFVSCmd.Items[lvRxPackageFVSCmd.Items.Count - 1].SubItems[COLUMN_P4].Text     = oItem.Parameter4;
            this.lvRxPackageFVSCmd.Items[lvRxPackageFVSCmd.Items.Count - 1].SubItems[COLUMN_P5].Text     = oItem.Parameter5;
            this.lvRxPackageFVSCmd.Items[lvRxPackageFVSCmd.Items.Count - 1].SubItems[COLUMN_P6].Text     = oItem.Parameter6;
            this.lvRxPackageFVSCmd.Items[lvRxPackageFVSCmd.Items.Count - 1].SubItems[COLUMN_P7].Text     = oItem.Parameter7;
            this.lvRxPackageFVSCmd.Items[lvRxPackageFVSCmd.Items.Count - 1].SubItems[COLUMN_OTHER].Text  = oItem.Other;


            this.m_oLvAlternateColors.AddRow();
            this.m_oLvAlternateColors.AddColumns(lvRxPackageFVSCmd.Items.Count - 1, this.lvRxPackageFVSCmd.Columns.Count);

            this.ReferenceFormRxItem.SetToolBarFVSCommandButtonsEnabled("", "Y", "Y", "Y", "");

            this.lvRxPackageFVSCmd.Items[lvRxPackageFVSCmd.Items.Count - 1].Selected = true;
        }
        public void EditItem()
        {
            int x;

            if (this.lvRxFVSCmd.SelectedItems.Count == 0)
            {
                return;
            }
            string strFvsCmd = "";

            FIA_Biosum_Manager.frmRxItemFvsCmdItem         frmFvsCmdItem1           = new frmRxItemFvsCmdItem();
            FIA_Biosum_Manager.RxItemFvsCommandItem        oRxItemFvsCmdItem        = null;
            FIA_Biosum_Manager.RxPackageItemFvsCommandItem oRxPackageItemFvsCmdItem = null;
            frmFvsCmdItem1.MaximizeBox = true;
            frmFvsCmdItem1.BackColor   = System.Drawing.SystemColors.Control;
            frmFvsCmdItem1.Text        = "FVS: FVS Command Item (Edit)";


            //frmFvsCmdItem1.Initialize_Rx_User_Control();



            //frmFvsCmdItem1.uc_rx_edit1.m_oResizeForm.ScrollBarParentControl=frmFvsCmdItem1.uc_rx_edit1.ParentForm;



            //frmFvsCmdItem1.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
            frmFvsCmdItem1.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
            //find the current rxid
            //for (x=0;x<=this.m_oRxItem_Collection.Count-1;x++)
            //{
            //	if (this.m_oRxItem_Collection.Item(x).RxId.Trim() ==
            //		this.lstRx.SelectedItems[0].SubItems[COLUMN_RX].Text.Trim())
            //	{
            //		frmFvsCmdItem1.ReferenceRxItem = this.m_oRxItem_Collection.Item(x);
            //		break;
            //	}
            //}
            frmFvsCmdItem1.ReferenceUserControlFvsCmdList = this;

            frmFvsCmdItem1.m_strAction = "edit";
            oRxItemFvsCmdItem          = this.ReferenceFormRxItem.m_oRxItem.ReferenceFvsCommandsCollection.Item(lvRxFVSCmd.SelectedItems[0].Index);
            strFvsCmd = oRxItemFvsCmdItem.FVSCommand;
            System.Windows.Forms.DialogResult result = frmFvsCmdItem1.ShowDialog();
            if (result == System.Windows.Forms.DialogResult.OK)
            {
                if (oRxItemFvsCmdItem.FVSCommand.Trim().ToUpper() != strFvsCmd.Trim().ToUpper())
                {
                    RxTools oRxTools = new RxTools();
                    oRxItemFvsCmdItem.FVSCommandId = oRxTools.AssignFvsCommandId(this.ReferenceFormRxItem.m_oRxItem.ReferenceFvsCommandsCollection, oRxItemFvsCmdItem.FVSCommand);
                    oRxTools = null;
                }

                oRxItemFvsCmdItem.CopyProperties(frmFvsCmdItem1.uc_rx_fvscmd_edit1.m_oRxItemFvsCmdItem, oRxItemFvsCmdItem);
                UpdateListViewRxItem(oRxItemFvsCmdItem);
            }
        }
        private void UpdateListViewRxItem(FIA_Biosum_Manager.RxItemFvsCommandItem p_oRxItemFvsCommandItem, int p_intRow)
        {
            this.lvRxFVSCmd.BeginUpdate();
            this.lvRxFVSCmd.Items[p_intRow].SubItems[COLUMN_RX].Text       = p_oRxItemFvsCommandItem.RxId;
            this.lvRxFVSCmd.Items[p_intRow].SubItems[COLUMN_FVSCMD].Text   = p_oRxItemFvsCommandItem.FVSCommand;
            this.lvRxFVSCmd.Items[p_intRow].SubItems[COLUMN_P1].Text       = p_oRxItemFvsCommandItem.Parameter1;
            this.lvRxFVSCmd.Items[p_intRow].SubItems[COLUMN_P2].Text       = p_oRxItemFvsCommandItem.Parameter2;
            this.lvRxFVSCmd.Items[p_intRow].SubItems[COLUMN_P3].Text       = p_oRxItemFvsCommandItem.Parameter3;
            this.lvRxFVSCmd.Items[p_intRow].SubItems[COLUMN_P4].Text       = p_oRxItemFvsCommandItem.Parameter4;
            this.lvRxFVSCmd.Items[p_intRow].SubItems[COLUMN_P5].Text       = p_oRxItemFvsCommandItem.Parameter5;
            this.lvRxFVSCmd.Items[p_intRow].SubItems[COLUMN_P6].Text       = p_oRxItemFvsCommandItem.Parameter6;
            this.lvRxFVSCmd.Items[p_intRow].SubItems[COLUMN_P7].Text       = p_oRxItemFvsCommandItem.Parameter7;
            this.lvRxFVSCmd.Items[p_intRow].SubItems[COLUMN_OTHER].Text    = p_oRxItemFvsCommandItem.Other;
            this.lvRxFVSCmd.Items[p_intRow].SubItems[COLUMN_FVSCMDID].Text = Convert.ToString(p_oRxItemFvsCommandItem.FVSCommandId);

            this.lvRxFVSCmd.EndUpdate();
        }
        public void AddItem()
        {
            int     x;
            RxTools oRxTools = new RxTools();

            FIA_Biosum_Manager.frmRxItemFvsCmdItem  frmFvsCmdItem1 = new frmRxItemFvsCmdItem();
            FIA_Biosum_Manager.RxItemFvsCommandItem oFvsCmdItem    = null;
            frmFvsCmdItem1.MaximizeBox = true;
            frmFvsCmdItem1.BackColor   = System.Drawing.SystemColors.Control;
            frmFvsCmdItem1.Text        = "FVS: FVS Command Item (New)";



            frmFvsCmdItem1.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;

            frmFvsCmdItem1.ReferenceUserControlFvsCmdList = this;


            frmFvsCmdItem1.m_strAction = "new";



            frmFvsCmdItem1.loadvalues(oFvsCmdItem);
            System.Windows.Forms.DialogResult result = frmFvsCmdItem1.ShowDialog();
            if (result == System.Windows.Forms.DialogResult.OK)
            {
                frmFvsCmdItem1.uc_rx_fvscmd_edit1.savevalues();
                frmFvsCmdItem1.uc_rx_fvscmd_edit1.m_oRxItemFvsCmdItem.RxId  = ReferenceFormRxItem.m_oRxItem.RxId;
                frmFvsCmdItem1.uc_rx_fvscmd_edit1.m_oRxItemFvsCmdItem.Index = this.lvRxFVSCmd.Items.Count;
                frmFvsCmdItem1.uc_rx_fvscmd_edit1.m_oRxItemFvsCmdItem.Add   = true;
                if (ReferenceFormRxItem.m_oRxItem.ReferenceFvsCommandsCollection == null)
                {
                    this.ReferenceFormRxItem.m_oRxItem.m_oFvsCommandItem_Collection1  = new RxItemFvsCommandItem_Collection();
                    this.ReferenceFormRxItem.m_oRxItem.ReferenceFvsCommandsCollection = this.ReferenceFormRxItem.m_oRxItem.m_oFvsCommandItem_Collection1;
                }
                frmFvsCmdItem1.uc_rx_fvscmd_edit1.m_oRxItemFvsCmdItem.FVSCommandId = oRxTools.AssignFvsCommandId(this.ReferenceFormRxItem.m_oRxItem.m_oFvsCommandItem_Collection1, frmFvsCmdItem1.uc_rx_fvscmd_edit1.m_oRxItemFvsCmdItem.FVSCommand);

                ReferenceFormRxItem.m_oRxItem.ReferenceFvsCommandsCollection.Add(frmFvsCmdItem1.uc_rx_fvscmd_edit1.m_oRxItemFvsCmdItem);

                AddItemToList(frmFvsCmdItem1.uc_rx_fvscmd_edit1.m_oRxItemFvsCmdItem);
            }
            oRxTools = null;
        }
Example #6
0
        private void UpdateListViewRxItem(FIA_Biosum_Manager.RxItemFvsCommandItem p_oRxItemFvsCommandItem)
        {
            if (lvRxPackageFVSCmd.SelectedItems.Count == 0)
            {
                return;
            }
            int x = lvRxPackageFVSCmd.SelectedItems[0].Index;

            this.lvRxPackageFVSCmd.Items[x].SubItems[COLUMN_RX].Text     = p_oRxItemFvsCommandItem.RxId;
            this.lvRxPackageFVSCmd.Items[x].SubItems[COLUMN_FVSCMD].Text = p_oRxItemFvsCommandItem.FVSCommand;
            this.lvRxPackageFVSCmd.Items[x].SubItems[COLUMN_P1].Text     = p_oRxItemFvsCommandItem.Parameter1;
            this.lvRxPackageFVSCmd.Items[x].SubItems[COLUMN_P2].Text     = p_oRxItemFvsCommandItem.Parameter2;
            this.lvRxPackageFVSCmd.Items[x].SubItems[COLUMN_P3].Text     = p_oRxItemFvsCommandItem.Parameter3;
            this.lvRxPackageFVSCmd.Items[x].SubItems[COLUMN_P4].Text     = p_oRxItemFvsCommandItem.Parameter4;
            this.lvRxPackageFVSCmd.Items[x].SubItems[COLUMN_P5].Text     = p_oRxItemFvsCommandItem.Parameter5;
            this.lvRxPackageFVSCmd.Items[x].SubItems[COLUMN_P6].Text     = p_oRxItemFvsCommandItem.Parameter6;
            this.lvRxPackageFVSCmd.Items[x].SubItems[COLUMN_P7].Text     = p_oRxItemFvsCommandItem.Parameter7;
            this.lvRxPackageFVSCmd.Items[x].SubItems[COLUMN_OTHER].Text  = p_oRxItemFvsCommandItem.Other;
        }
        public void loadvalues()
        {
            int intRowCount = 0;
            int x, y;

            this.lvRxFVSCmd.Clear();
            this.m_oLvAlternateColors.InitializeRowCollection();


            this.lvRxFVSCmd.Columns.Add(" ", 2, HorizontalAlignment.Left);
            this.lvRxFVSCmd.Columns.Add("Rx", 60, HorizontalAlignment.Left);
            this.lvRxFVSCmd.Columns.Add("FVSCmd", 100, HorizontalAlignment.Left);
            this.lvRxFVSCmd.Columns.Add("P1", 50, HorizontalAlignment.Left);
            this.lvRxFVSCmd.Columns.Add("P2", 50, HorizontalAlignment.Left);
            this.lvRxFVSCmd.Columns.Add("P3", 50, HorizontalAlignment.Left);
            this.lvRxFVSCmd.Columns.Add("P4", 50, HorizontalAlignment.Left);
            this.lvRxFVSCmd.Columns.Add("P5", 50, HorizontalAlignment.Left);
            this.lvRxFVSCmd.Columns.Add("P6", 50, HorizontalAlignment.Left);
            this.lvRxFVSCmd.Columns.Add("P7", 50, HorizontalAlignment.Left);
            this.lvRxFVSCmd.Columns.Add("Other", 100, HorizontalAlignment.Left);
            this.lvRxFVSCmd.Columns.Add("FVSCmdId", 50, HorizontalAlignment.Left);



            if (this.ReferenceFormRxItem.m_oRxItem.ReferenceFvsCommandsCollection != null)
            {
                this.lvRxFVSCmd.BeginUpdate();

                for (x = 0; x <= this.ReferenceFormRxItem.m_oRxItem.ReferenceFvsCommandsCollection.Count - 1; x++)
                {
                    for (y = 0; y <= this.ReferenceFormRxItem.m_oRxItem.ReferenceFvsCommandsCollection.Count - 1; y++)
                    {
                        if (this.ReferenceFormRxItem.m_oRxItem.ReferenceFvsCommandsCollection.Item(y).Index == x)
                        {
                            FIA_Biosum_Manager.RxItemFvsCommandItem oItem =
                                ReferenceFormRxItem.m_oRxItem.ReferenceFvsCommandsCollection.Item(y);
                            this.lvRxFVSCmd.Items.Add("");
                            this.lvRxFVSCmd.Items[lvRxFVSCmd.Items.Count - 1].UseItemStyleForSubItems = false;
                            for (int z = 1; z <= this.lvRxFVSCmd.Columns.Count - 1; z++)
                            {
                                this.lvRxFVSCmd.Items[lvRxFVSCmd.Items.Count - 1].SubItems.Add(" ");
                            }

                            this.lvRxFVSCmd.Items[lvRxFVSCmd.Items.Count - 1].SubItems[COLUMN_RX].Text       = oItem.RxId;
                            this.lvRxFVSCmd.Items[lvRxFVSCmd.Items.Count - 1].SubItems[COLUMN_FVSCMD].Text   = oItem.FVSCommand;
                            this.lvRxFVSCmd.Items[lvRxFVSCmd.Items.Count - 1].SubItems[COLUMN_P1].Text       = oItem.Parameter1;
                            this.lvRxFVSCmd.Items[lvRxFVSCmd.Items.Count - 1].SubItems[COLUMN_P2].Text       = oItem.Parameter2;
                            this.lvRxFVSCmd.Items[lvRxFVSCmd.Items.Count - 1].SubItems[COLUMN_P3].Text       = oItem.Parameter3;
                            this.lvRxFVSCmd.Items[lvRxFVSCmd.Items.Count - 1].SubItems[COLUMN_P4].Text       = oItem.Parameter4;
                            this.lvRxFVSCmd.Items[lvRxFVSCmd.Items.Count - 1].SubItems[COLUMN_P5].Text       = oItem.Parameter5;
                            this.lvRxFVSCmd.Items[lvRxFVSCmd.Items.Count - 1].SubItems[COLUMN_P6].Text       = oItem.Parameter6;
                            this.lvRxFVSCmd.Items[lvRxFVSCmd.Items.Count - 1].SubItems[COLUMN_P7].Text       = oItem.Parameter7;
                            this.lvRxFVSCmd.Items[lvRxFVSCmd.Items.Count - 1].SubItems[COLUMN_OTHER].Text    = oItem.Other;
                            this.lvRxFVSCmd.Items[lvRxFVSCmd.Items.Count - 1].SubItems[COLUMN_FVSCMDID].Text = Convert.ToString(oItem.FVSCommandId);


                            this.m_oLvAlternateColors.AddRow();
                            this.m_oLvAlternateColors.AddColumns(lvRxFVSCmd.Items.Count - 1, this.lvRxFVSCmd.Columns.Count);
                        }
                    }
                }
                this.lvRxFVSCmd.EndUpdate();
            }


            this.m_oLvAlternateColors.ListView();

            if (this.lvRxFVSCmd.Items.Count > 0)
            {
                this.lvRxFVSCmd.Items[0].Selected = true;
            }
        }
 public void loadvalues(FIA_Biosum_Manager.RxItemFvsCommandItem p_oFvsCmdItem)
 {
     this.uc_rx_fvscmd_edit1.ReferenceFormFvsCmdItem = this;
     this.uc_rx_fvscmd_edit1.loadvalues(p_oFvsCmdItem);
 }