Ejemplo n.º 1
0
        private void tv_AfterSelect(object sender, TreeViewEventArgs e)
        {
            NodeWithId tmp_node = (NodeWithId)e.Node.Clone();

            DataRow[] drs;
            drs = CLocalDB.localDB.Tables["diag_category"].Select("id='" + tmp_node.nodeId.ToString() + "'");
            if (drs[0]["bt_order"].ToString() == "0")
            {
                return;
            }

            start_no = int.Parse(drs[0]["start_no"].ToString());
            end_no   = int.Parse(drs[0]["end_no"].ToString());
            dt.DefaultView.RowFilter = "(no>=" + start_no + ")AND(no<=" + end_no + ")";

            lbNoRange.Text = start_no.ToString() + " <= No <= " + end_no.ToString();
        }
Ejemplo n.º 2
0
        public override object Clone()
        {
            NodeWithId rtn_obj = new NodeWithId(this.Name, this.nodeId);

            return(rtn_obj);
        }
Ejemplo n.º 3
0
 public override object Clone()
 {
     NodeWithId rtn_obj = new NodeWithId(this.Name, this.nodeId);
     return rtn_obj;
 }
Ejemplo n.º 4
0
        public EditDiagnoses()
        {
            InitializeComponent();

            #region TreeView
            DataRow[] drs;
            int       i;

            #region laryngopharynx
            i   = 1001;
            drs = CLocalDB.localDB.Tables["diag_category"].Select("id=" + i.ToString());
            NodeWithId Laryngopharynx = new NodeWithId(drs[0]["name"].ToString(), i);
            tv.Nodes.Add(Laryngopharynx);
            #endregion

            #region esophagus
            i   = 2001;
            drs = CLocalDB.localDB.Tables["diag_category"].Select("id=" + i.ToString());
            NodeWithId eso_inf = new NodeWithId(drs[0]["name"].ToString(), i);

            i   = 3000;
            drs = CLocalDB.localDB.Tables["diag_category"].Select("id=" + i.ToString());
            NodeWithId eso_tum = new NodeWithId(drs[0]["name"].ToString(), i);

            i   = 4000;
            drs = CLocalDB.localDB.Tables["diag_category"].Select("id=" + i.ToString());
            NodeWithId eso_etc = new NodeWithId(drs[0]["name"].ToString(), i);

            i   = 2000;
            drs = CLocalDB.localDB.Tables["diag_category"].Select("id=" + i.ToString());
            NodeWithId esophagus = new NodeWithId(drs[0]["name"].ToString(), i);
            esophagus.Nodes.Add(eso_inf);
            esophagus.Nodes.Add(eso_tum);
            esophagus.Nodes.Add(eso_etc);
            tv.Nodes.Add(esophagus);
            #endregion

            #region Stomach
            i   = 5001;
            drs = CLocalDB.localDB.Tables["diag_category"].Select("id=" + i.ToString());
            NodeWithId stomach_inf = new NodeWithId(drs[0]["name"].ToString(), i);

            i   = 6000;
            drs = CLocalDB.localDB.Tables["diag_category"].Select("id=" + i.ToString());
            NodeWithId stomach_tum = new NodeWithId(drs[0]["name"].ToString(), i);

            i   = 7000;
            drs = CLocalDB.localDB.Tables["diag_category"].Select("id=" + i.ToString());
            NodeWithId stomach_etc = new NodeWithId(drs[0]["name"].ToString(), i);

            i   = 5000;
            drs = CLocalDB.localDB.Tables["diag_category"].Select("id=" + i.ToString());
            NodeWithId stomach = new NodeWithId(drs[0]["name"].ToString(), i);
            stomach.Nodes.Add(stomach_inf);
            stomach.Nodes.Add(stomach_tum);
            stomach.Nodes.Add(stomach_etc);
            tv.Nodes.Add(stomach);
            #endregion

            #region Duodenum
            i   = 10001;
            drs = CLocalDB.localDB.Tables["diag_category"].Select("id=" + i.ToString());
            NodeWithId Duodenum = new NodeWithId(drs[0]["name"].ToString(), i);
            tv.Nodes.Add(Duodenum);
            #endregion

            #region SideView
            i   = 20000;
            drs = CLocalDB.localDB.Tables["diag_category"].Select("id=" + i.ToString());
            NodeWithId SideView = new NodeWithId(drs[0]["name"].ToString(), i);
            tv.Nodes.Add(SideView);
            #endregion

            #region SmallBowel
            i   = 30001;
            drs = CLocalDB.localDB.Tables["diag_category"].Select("id=" + i.ToString());
            NodeWithId SmallBowel = new NodeWithId(drs[0]["name"].ToString(), i);
            tv.Nodes.Add(SmallBowel);
            #endregion

            #region Colon
            i   = 40001;
            drs = CLocalDB.localDB.Tables["diag_category"].Select("id=" + i.ToString());
            NodeWithId Colon_inf = new NodeWithId(drs[0]["name"].ToString(), i);

            i   = 50000;
            drs = CLocalDB.localDB.Tables["diag_category"].Select("id=" + i.ToString());
            NodeWithId Colon_tum = new NodeWithId(drs[0]["name"].ToString(), i);

            i   = 60000;
            drs = CLocalDB.localDB.Tables["diag_category"].Select("id=" + i.ToString());
            NodeWithId Colon_etc = new NodeWithId(drs[0]["name"].ToString(), i);

            i   = 40000;
            drs = CLocalDB.localDB.Tables["diag_category"].Select("id=" + i.ToString());
            NodeWithId Colon = new NodeWithId(drs[0]["name"].ToString(), i);
            Colon.Nodes.Add(Colon_inf);
            Colon.Nodes.Add(Colon_tum);
            Colon.Nodes.Add(Colon_etc);
            tv.Nodes.Add(Colon);
            #endregion

            #region Anus
            i   = 30001;
            drs = CLocalDB.localDB.Tables["diag_category"].Select("id=" + i.ToString());
            NodeWithId Anus = new NodeWithId(drs[0]["name"].ToString(), i);
            tv.Nodes.Add(Anus);
            #endregion

            #region Procedure
            i   = 100001;
            drs = CLocalDB.localDB.Tables["diag_category"].Select("id=" + i.ToString());
            NodeWithId Procedure = new NodeWithId(drs[0]["name"].ToString(), i);
            tv.Nodes.Add(Procedure);
            #endregion

            #region Study
            i   = 200001;
            drs = CLocalDB.localDB.Tables["diag_category"].Select("id=" + i.ToString());
            NodeWithId Study = new NodeWithId(drs[0]["name"].ToString(), i);
            tv.Nodes.Add(Study);
            #endregion

            #region Broncho
            i   = 300001;
            drs = CLocalDB.localDB.Tables["diag_category"].Select("id=" + i.ToString());
            NodeWithId Broncho = new NodeWithId(drs[0]["name"].ToString(), i);
            tv.Nodes.Add(Broncho);
            #endregion

            #region Abdomen
            #region Gallbladder
            i   = 1010000;
            drs = CLocalDB.localDB.Tables["diag_category"].Select("id=" + i.ToString());
            NodeWithId Gallbladder = new NodeWithId(drs[0]["name"].ToString(), i);
            #endregion

            #region ExtrahepaticBileDuct
            i   = 1020000;
            drs = CLocalDB.localDB.Tables["diag_category"].Select("id=" + i.ToString());
            NodeWithId ExtrahepaticBileDuct = new NodeWithId(drs[0]["name"].ToString(), i);
            #endregion

            #region Liver
            i   = 1030000;
            drs = CLocalDB.localDB.Tables["diag_category"].Select("id=" + i.ToString());
            NodeWithId Liver = new NodeWithId(drs[0]["name"].ToString(), i);
            #endregion

            #region Spleen
            i   = 1040000;
            drs = CLocalDB.localDB.Tables["diag_category"].Select("id=" + i.ToString());
            NodeWithId Spleen = new NodeWithId(drs[0]["name"].ToString(), i);
            #endregion

            #region Pancreas
            i   = 1050000;
            drs = CLocalDB.localDB.Tables["diag_category"].Select("id=" + i.ToString());
            NodeWithId Pancreas = new NodeWithId(drs[0]["name"].ToString(), i);
            #endregion

            #region Kidney
            i   = 1060000;
            drs = CLocalDB.localDB.Tables["diag_category"].Select("id=" + i.ToString());
            NodeWithId Kidney = new NodeWithId(drs[0]["name"].ToString(), i);
            #endregion

            i   = 1000000;
            drs = CLocalDB.localDB.Tables["diag_category"].Select("id=" + i.ToString());
            NodeWithId Abdmen = new NodeWithId(drs[0]["name"].ToString(), i);
            Abdmen.Nodes.Add(Gallbladder);
            Abdmen.Nodes.Add(ExtrahepaticBileDuct);
            Abdmen.Nodes.Add(Liver);
            Abdmen.Nodes.Add(Spleen);
            Abdmen.Nodes.Add(Pancreas);
            Abdmen.Nodes.Add(Kidney);
            tv.Nodes.Add(Abdmen);
            #endregion

            #endregion

            #region dgv
            dgv.AutoSizeRowsMode = DataGridViewAutoSizeRowsMode.AllCells;
            dgv.DataSource       = dt;
            showList();

            #region Add btDelete
            DataGridViewButtonColumn btDelete = new DataGridViewButtonColumn(); //DataGridViewButtonColumnの作成
            btDelete.Name = "btDelete";                                         //列の名前を設定
            btDelete.UseColumnTextForButtonValue = true;                        //ボタンにテキスト表示
            btDelete.Text = FindingsEditor.Properties.Resources.Delete;         //ボタンの表示テキスト設定
            dgv.Columns.Add(btDelete);                                          //ボタン追加
            #endregion

            #region Header text
            dgv.Columns["no"].HeaderText           = "No";
            dgv.Columns["name_eng"].HeaderText     = FindingsEditor.Properties.Resources.English;
            dgv.Columns["name_jp"].HeaderText      = FindingsEditor.Properties.Resources.Japanese;
            dgv.Columns["diag_order"].HeaderText   = FindingsEditor.Properties.Resources.Order;
            dgv.Columns["diag_visible"].HeaderText = FindingsEditor.Properties.Resources.Visible;
            dgv.Columns["btDelete"].HeaderText     = FindingsEditor.Properties.Resources.Delete;
            dgv.Columns["tbUpdate"].HeaderText     = FindingsEditor.Properties.Resources.Update;
            #endregion

            #region Design and Settings
            dgv.Columns["noInsert"].Visible  = false;
            dgv.Columns["tbUpdate"].ReadOnly = true;

            //カラム幅自動に設定
            foreach (DataGridViewColumn dc in dgv.Columns)
            {
                dc.AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells;
            }

            //並び替え
            DataView dv = dt.DefaultView;
            dv.Sort = "no ASC";
            #endregion

            #region event
            this.dgv.CellValueChanged             += new DataGridViewCellEventHandler(this.dgv_CellValueChanged);
            this.dgv.CurrentCellDirtyStateChanged += new EventHandler(this.dgv_CurrentCellDirtyStateChanged);
            #endregion

            #endregion
        }
Ejemplo n.º 5
0
        public EditDiagnoses()
        {
            InitializeComponent();

            #region TreeView
            DataRow[] drs;
            int i;

            #region laryngopharynx
            i = 1001;
            drs = CLocalDB.localDB.Tables["diag_category"].Select("id=" + i.ToString());
            NodeWithId Laryngopharynx = new NodeWithId(drs[0]["name"].ToString(), i);
            tv.Nodes.Add(Laryngopharynx);
            #endregion

            #region esophagus
            i = 2001;
            drs = CLocalDB.localDB.Tables["diag_category"].Select("id=" + i.ToString());
            NodeWithId eso_inf = new NodeWithId(drs[0]["name"].ToString(), i);

            i = 3000;
            drs = CLocalDB.localDB.Tables["diag_category"].Select("id=" + i.ToString());
            NodeWithId eso_tum = new NodeWithId(drs[0]["name"].ToString(), i);

            i = 4000;
            drs = CLocalDB.localDB.Tables["diag_category"].Select("id=" + i.ToString());
            NodeWithId eso_etc = new NodeWithId(drs[0]["name"].ToString(), i);

            i = 2000;
            drs = CLocalDB.localDB.Tables["diag_category"].Select("id=" + i.ToString());
            NodeWithId esophagus = new NodeWithId(drs[0]["name"].ToString(), i);
            esophagus.Nodes.Add(eso_inf);
            esophagus.Nodes.Add(eso_tum);
            esophagus.Nodes.Add(eso_etc);
            tv.Nodes.Add(esophagus);
            #endregion

            #region Stomach
            i = 5001;
            drs = CLocalDB.localDB.Tables["diag_category"].Select("id=" + i.ToString());
            NodeWithId stomach_inf = new NodeWithId(drs[0]["name"].ToString(), i);

            i = 6000;
            drs = CLocalDB.localDB.Tables["diag_category"].Select("id=" + i.ToString());
            NodeWithId stomach_tum = new NodeWithId(drs[0]["name"].ToString(), i);

            i = 7000;
            drs = CLocalDB.localDB.Tables["diag_category"].Select("id=" + i.ToString());
            NodeWithId stomach_etc = new NodeWithId(drs[0]["name"].ToString(), i);

            i = 5000;
            drs = CLocalDB.localDB.Tables["diag_category"].Select("id=" + i.ToString());
            NodeWithId stomach = new NodeWithId(drs[0]["name"].ToString(), i);
            stomach.Nodes.Add(stomach_inf);
            stomach.Nodes.Add(stomach_tum);
            stomach.Nodes.Add(stomach_etc);
            tv.Nodes.Add(stomach);
            #endregion

            #region Duodenum
            i = 10001;
            drs = CLocalDB.localDB.Tables["diag_category"].Select("id=" + i.ToString());
            NodeWithId Duodenum = new NodeWithId(drs[0]["name"].ToString(), i);
            tv.Nodes.Add(Duodenum);
            #endregion

            #region SideView
            i = 20000;
            drs = CLocalDB.localDB.Tables["diag_category"].Select("id=" + i.ToString());
            NodeWithId SideView = new NodeWithId(drs[0]["name"].ToString(), i);
            tv.Nodes.Add(SideView);
            #endregion

            #region SmallBowel
            i = 30001;
            drs = CLocalDB.localDB.Tables["diag_category"].Select("id=" + i.ToString());
            NodeWithId SmallBowel = new NodeWithId(drs[0]["name"].ToString(), i);
            tv.Nodes.Add(SmallBowel);
            #endregion

            #region Colon
            i = 40001;
            drs = CLocalDB.localDB.Tables["diag_category"].Select("id=" + i.ToString());
            NodeWithId Colon_inf = new NodeWithId(drs[0]["name"].ToString(), i);

            i = 50000;
            drs = CLocalDB.localDB.Tables["diag_category"].Select("id=" + i.ToString());
            NodeWithId Colon_tum = new NodeWithId(drs[0]["name"].ToString(), i);

            i = 60000;
            drs = CLocalDB.localDB.Tables["diag_category"].Select("id=" + i.ToString());
            NodeWithId Colon_etc = new NodeWithId(drs[0]["name"].ToString(), i);

            i = 40000;
            drs = CLocalDB.localDB.Tables["diag_category"].Select("id=" + i.ToString());
            NodeWithId Colon = new NodeWithId(drs[0]["name"].ToString(), i);
            Colon.Nodes.Add(Colon_inf);
            Colon.Nodes.Add(Colon_tum);
            Colon.Nodes.Add(Colon_etc);
            tv.Nodes.Add(Colon);
            #endregion

            #region Anus
            i = 30001;
            drs = CLocalDB.localDB.Tables["diag_category"].Select("id=" + i.ToString());
            NodeWithId Anus = new NodeWithId(drs[0]["name"].ToString(), i);
            tv.Nodes.Add(Anus);
            #endregion

            #region Procedure
            i = 100001;
            drs = CLocalDB.localDB.Tables["diag_category"].Select("id=" + i.ToString());
            NodeWithId Procedure = new NodeWithId(drs[0]["name"].ToString(), i);
            tv.Nodes.Add(Procedure);
            #endregion

            #region Study
            i = 200001;
            drs = CLocalDB.localDB.Tables["diag_category"].Select("id=" + i.ToString());
            NodeWithId Study = new NodeWithId(drs[0]["name"].ToString(), i);
            tv.Nodes.Add(Study);
            #endregion

            #region Broncho
            i = 300001;
            drs = CLocalDB.localDB.Tables["diag_category"].Select("id=" + i.ToString());
            NodeWithId Broncho = new NodeWithId(drs[0]["name"].ToString(), i);
            tv.Nodes.Add(Broncho);
            #endregion

            #region Abdomen
            #region Gallbladder
            i = 1010000;
            drs = CLocalDB.localDB.Tables["diag_category"].Select("id=" + i.ToString());
            NodeWithId Gallbladder = new NodeWithId(drs[0]["name"].ToString(), i);
            #endregion

            #region ExtrahepaticBileDuct
            i = 1020000;
            drs = CLocalDB.localDB.Tables["diag_category"].Select("id=" + i.ToString());
            NodeWithId ExtrahepaticBileDuct = new NodeWithId(drs[0]["name"].ToString(), i);
            #endregion

            #region Liver
            i = 1030000;
            drs = CLocalDB.localDB.Tables["diag_category"].Select("id=" + i.ToString());
            NodeWithId Liver = new NodeWithId(drs[0]["name"].ToString(), i);
            #endregion

            #region Spleen
            i = 1040000;
            drs = CLocalDB.localDB.Tables["diag_category"].Select("id=" + i.ToString());
            NodeWithId Spleen = new NodeWithId(drs[0]["name"].ToString(), i);
            #endregion

            #region Pancreas
            i = 1050000;
            drs = CLocalDB.localDB.Tables["diag_category"].Select("id=" + i.ToString());
            NodeWithId Pancreas = new NodeWithId(drs[0]["name"].ToString(), i);
            #endregion

            #region Kidney
            i = 1060000;
            drs = CLocalDB.localDB.Tables["diag_category"].Select("id=" + i.ToString());
            NodeWithId Kidney = new NodeWithId(drs[0]["name"].ToString(), i);
            #endregion

            i = 1000000;
            drs = CLocalDB.localDB.Tables["diag_category"].Select("id=" + i.ToString());
            NodeWithId Abdmen = new NodeWithId(drs[0]["name"].ToString(), i);
            Abdmen.Nodes.Add(Gallbladder);
            Abdmen.Nodes.Add(ExtrahepaticBileDuct);
            Abdmen.Nodes.Add(Liver);
            Abdmen.Nodes.Add(Spleen);
            Abdmen.Nodes.Add(Pancreas);
            Abdmen.Nodes.Add(Kidney);
            tv.Nodes.Add(Abdmen);
            #endregion

            #endregion

            #region dgv
            dgv.AutoSizeRowsMode = DataGridViewAutoSizeRowsMode.AllCells;
            dgv.DataSource = dt;
            showList();

            #region Add btDelete
            DataGridViewButtonColumn btDelete = new DataGridViewButtonColumn(); //DataGridViewButtonColumnの作成
            btDelete.Name = "btDelete";  //列の名前を設定
            btDelete.UseColumnTextForButtonValue = true;    //ボタンにテキスト表示
            btDelete.Text = Properties.Resources.Delete;  //ボタンの表示テキスト設定
            dgv.Columns.Add(btDelete);           //ボタン追加
            #endregion

            #region Header text
            dgv.Columns["no"].HeaderText = "No";
            dgv.Columns["name_eng"].HeaderText = Properties.Resources.English;
            dgv.Columns["name_jp"].HeaderText = Properties.Resources.Japanese;
            dgv.Columns["diag_order"].HeaderText = Properties.Resources.Order;
            dgv.Columns["diag_visible"].HeaderText = Properties.Resources.Visible;
            dgv.Columns["btDelete"].HeaderText = Properties.Resources.Delete;
            dgv.Columns["tbUpdate"].HeaderText = Properties.Resources.Update;
            #endregion

            #region Design and Settings
            dgv.Columns["noInsert"].Visible = false;
            dgv.Columns["tbUpdate"].ReadOnly = true;

            //カラム幅自動に設定
            foreach (DataGridViewColumn dc in dgv.Columns)
            { dc.AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells; }

            //並び替え
            DataView dv = dt.DefaultView;
            dv.Sort = "no ASC";
            #endregion

            #region event
            this.dgv.CellValueChanged += new DataGridViewCellEventHandler(this.dgv_CellValueChanged);
            this.dgv.CurrentCellDirtyStateChanged += new EventHandler(this.dgv_CurrentCellDirtyStateChanged);
            #endregion

            #endregion
        }