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);
            }
        }
Example #2
0
        private void Properties()
        {
            FIA_Biosum_Manager.RxItem_Collection oRxColl = new RxItem_Collection();


            frmMain.g_sbpInfo.Text = "Creating Rx Package Properties Report...Stand By";
            for (int x = 0; x <= ReferenceRxItemCollection.Count - 1; x++)
            {
                if (ReferenceRxItemCollection.Item(x).Delete == false)
                {
                    if (this.m_oRxPackageItem.SimulationYear1Rx.Trim() ==
                        ReferenceRxItemCollection.Item(x).RxId.Trim() ||
                        this.m_oRxPackageItem.SimulationYear2Rx.Trim() ==
                        ReferenceRxItemCollection.Item(x).RxId.Trim() ||
                        this.m_oRxPackageItem.SimulationYear3Rx.Trim() ==
                        ReferenceRxItemCollection.Item(x).RxId.Trim() ||
                        this.m_oRxPackageItem.SimulationYear4Rx.Trim() ==
                        ReferenceRxItemCollection.Item(x).RxId.Trim())
                    {
                        RxItem oItem = new RxItem();
                        oItem.CopyProperties(ReferenceRxItemCollection.Item(x), oItem);
                        if (oItem.m_oFvsCommandItem_Collection1 != null)
                        {
                            for (int y = 0; y <= oItem.m_oFvsCommandItem_Collection1.Count - 1; y++)
                            {
                                if (oItem.m_oFvsCommandItem_Collection1.Item(y).Delete == true)
                                {
                                    oItem.m_oFvsCommandItem_Collection1.Remove(y);
                                }
                            }
                        }
                        oRxColl.Add(oItem);
                    }
                }
            }

            FIA_Biosum_Manager.RxPackageItem_Collection oRxPackageCollection = new RxPackageItem_Collection();
            oRxPackageCollection.Add(this.m_oRxPackageItem);

            FIA_Biosum_Manager.frmDialog frmTemp = new frmDialog();
            frmTemp.Text       = "FIA Biosum";
            frmTemp.AutoScroll = false;
            uc_textbox uc_textbox1 = new uc_textbox();

            frmTemp.Controls.Add(uc_textbox1);
            uc_textbox1.Dock          = DockStyle.Fill;
            uc_textbox1.lblTitle.Text = "Package Properties";
            RxTools oRxTools = new RxTools();

            uc_textbox1.TextValue = oRxTools.PackageProperties(oRxPackageCollection, oRxColl);
            frmTemp.Show();

            frmMain.g_sbpInfo.Text = "Ready";
        }
        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 #4
0
        private void Properties()
        {
            if (this.m_oRxItem.RxId.Trim().Length == 0)
            {
                return;
            }
            frmMain.g_sbpInfo.Text = "Creating Rx Properties Report...Stand By";
            FIA_Biosum_Manager.RxItem_Collection oRxCollection = new RxItem_Collection();
            FIA_Biosum_Manager.RxItem            oRxItem       = new RxItem();

            oRxItem.CopyProperties(m_oRxItem, oRxItem);



            if (oRxItem.m_oFvsCommandItem_Collection1 != null)
            {
                for (int y = 0; y <= oRxItem.m_oFvsCommandItem_Collection1.Count - 1; y++)
                {
                    if (oRxItem.m_oFvsCommandItem_Collection1.Item(y).Delete == true)
                    {
                        oRxItem.m_oFvsCommandItem_Collection1.Remove(y);
                    }
                }
            }

            oRxCollection.Add(oRxItem);
            FIA_Biosum_Manager.frmDialog frmTemp = new frmDialog();
            frmTemp.Text       = "FIA Biosum";
            frmTemp.AutoScroll = false;
            uc_textbox uc_textbox1 = new uc_textbox();

            frmTemp.Controls.Add(uc_textbox1);
            uc_textbox1.Dock          = DockStyle.Fill;
            uc_textbox1.lblTitle.Text = "Treatment Properties";
            RxTools oRxTools = new RxTools();

            uc_textbox1.TextValue = oRxTools.TreatmentProperties(oRxCollection);
            frmTemp.Show();
            frmMain.g_sbpInfo.Text = "Ready";
        }