Example #1
0
        private void Tsmi_Click(object sender, EventArgs e)
        {
            CRUD      crud         = new CRUD();
            DataTable dt           = crud.CZFunctionName(sender.ToString());
            string    functionName = dt.Rows[0]["FunctionName"].ToString();

            CreateFormInstance(functionName);
            //try
            //{
            //    //tag属性在这里有用到。
            //    string acName = ((ToolStripMenuItem)sender).Tag.ToString();
            //    if (acName != "")
            //    {
            //        string[] strArray = acName.Split(new char[] { ',' });
            //        if (strArray.Length > 2)
            //        {
            //        }
            //        else
            //        {
            //            String str = "void " + acName;
            //            foreach (MethodInfo info in base.GetType().GetMethods())
            //            {
            //                if (str.Trim().ToLower().CompareTo(info.ToString().Trim().ToLower()) == 0)
            //                {
            //                    info.Invoke(this, null);
            //                }
            //            }
            //        }
            //    }
            //}
            //catch (Exception exception)
            //{
            //}
        }
Example #2
0
        private void Tsmi2_Click(object sender, EventArgs e)
        {
            CRUD      crud         = new CRUD();
            DataTable dt           = crud.CZFunctionName(sender.ToString());
            string    functionName = dt.Rows[0]["FunctionName"].ToString();

            CreateFormInstance(functionName);
        }