Exemplo n.º 1
0
        /// <summary>
        /// 点击树状菜单
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void TrvMenu_Click(object sender, EventArgs e)
        {
            while (this.check_if_tab_exist(currSelectNodeTag))
            {
                return;
            }
            if (lastSelectNodeTage == currSelectNodeTag)
            {
                if (currSelectNodeTag != null)
                {
                    switch (this.GetFormName(currSelectNodeTag))
                    {
                    case "frmGameBrowse":
                    {
                        frmGameBrowse frmBse = new frmGameBrowse();
                        frmBse.CreateModule(this, null, null);
                        break;
                    }

                    case "frmUser":
                    {
                        break;
                    }

                    case "frmImort_ExpressBrowse":
                    {
                        frmImort_ExpressBrowse frmJOB = new frmImort_ExpressBrowse();
                        frmJOB.CreateModule(this, null, null);
                        break;
                    }

                    case "frmDataCollect":
                    {
                        frmDataCollect frmClt = new frmDataCollect(currSelectNodeTag);
                        frmClt.CreateModule(this, null, null);
                        break;
                    }

                    case "frmUserBrowse":
                    {
                        frmUserBrowse frmUserBse = new frmUserBrowse();
                        frmUserBse.CreateModule(this, null, null);
                        break;
                    }

                    case "frmUserEdit.cs":
                    {
                        frmUserEdit frmUserEdt = new frmUserEdit(CommonCLS.LoginUserID, "1");
                        frmUserEdt.CreateModule(null, null, null);
                        break;
                    }
                    }
                }
            }
            else
            {
                lastSelectNodeTage = currSelectNodeTag;
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// 添加按钮
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnAdd_Click(object sender, EventArgs e)
 {
     try
     {
         frmUserEdit frmEdit = new frmUserEdit(this.dataGV.SelectedRows[0].Cells[0].Value.ToString(), "0");
         frmEdit.CreateModule(null, null, null);
         if (frmEdit.DialogResult == DialogResult.OK)
         {
             this.GetData();
         }
     }
     catch (System.Exception ex)
     {
         CommonCLS.SaveLog("btnAdd_Click->" + ex.ToString());
     }
 }
Exemplo n.º 3
0
 /// <summary>
 /// 编辑按钮
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnEdit_Click(object sender, EventArgs e)
 {
     try
     {
         if (this.dataGV.SelectedRows.Count <= 0)
         {
             MessageBox.Show("请选择要操作的行");
             return;
         }
         frmUserEdit frmEdit = new frmUserEdit(this.dataGV.SelectedRows[0].Cells[0].Value.ToString(), "1");
         frmEdit.CreateModule(null, null, null);
         if (frmEdit.DialogResult == DialogResult.OK)
         {
             this.GetData();
         }
     }
     catch (System.Exception ex)
     {
         CommonCLS.SaveLog("btnEdit_Click->" + ex.ToString());
     }
 }
Exemplo n.º 4
0
        /// <summary>
        /// 树状菜单选择后

        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void TrvMenu_AfterSelect(object sender, TreeViewEventArgs e)
        {
            try
            {
                while (this.check_if_tab_exist(e.Node.Text))
                {
                    return;
                }
                currSelectNodeTag = Convert.ToString(e.Node.Text);

                if (lastSelectNodeTage == null)
                {
                    lastSelectNodeTage = e.Node.Text;
                }

                if (e.Node.Text != null)
                {
                    switch (this.GetFormName(e.Node.Text))
                    {
                    case "frmGameBrowse":
                    {
                        frmGameBrowse frmBse = new frmGameBrowse();
                        frmBse.CreateModule(this, null, null);
                        break;
                    }

                    case "frmUser":
                    {
                        break;
                    }

                    case "frmImort_ExpressBrowse":
                    {
                        frmImort_ExpressBrowse frmJOB = new frmImort_ExpressBrowse();
                        frmJOB.CreateModule(this, null, null);
                        break;
                    }

                    case "frmDataCollect":
                    {
                        frmDataCollect frmClt = new frmDataCollect(currSelectNodeTag);
                        frmClt.CreateModule(this, null, null);
                        break;
                    }

                    case "frmUserBrowse":
                    {
                        frmUserBrowse frmUserBse = new frmUserBrowse();
                        frmUserBse.CreateModule(this, null, null);
                        break;
                    }

                    case "frmUserEdit.cs":
                    {
                        frmUserEdit frmUserEdt = new  frmUserEdit(CommonCLS.LoginUserID, "1");
                        frmUserEdt.CreateModule(null, null, null);
                        break;
                    }
                    }
                }
                if (e.Node.Tag != null)
                {
                    //this.lblStatus.Text = "正在打开窗体\"" + e.Node.Text.ToString() + "\",请稍等...";
                }
            }
            catch (System.Exception ex)
            {
            }
        }