Ejemplo n.º 1
0
        public object GetObject()
        {
            if (_functionName == "")
            {
                throw new Exception("引出函数名不能为空!");
            }
            Form f = null;

            switch (_functionName)
            {
            case "Fun_ts_yk_ypbs_cx":
            case "Fun_ts_yk_ypby_cx":
                Frmypbsby Frmypbsby = new Frmypbsby((MenuTag)CommunicateValue[0], Convert.ToString(CommunicateValue[1]), _mdiParent);
                if (_mdiParent != null)
                {
                    Frmypbsby.MdiParent = _mdiParent;
                }
                Frmypbsby.FillDj(new Guid(Convert.ToString(CommunicateValue[2])), true);
                Frmypbsby.Show();
                Frmypbsby.FindRecord((int)CommunicateValue[4], 0);
                return(Frmypbsby);

            default:
                throw new Exception("引出函数名称错误!");
            }
            return(f);
        }
Ejemplo n.º 2
0
        private void butsh_Click(object sender, System.EventArgs e)
        {
            try
            {
                int nrow = this.myDataGrid1.CurrentCell.RowNumber;

                DataTable tb = (DataTable)this.myDataGrid1.DataSource;
                if (tb.Rows.Count == 0)
                {
                    return;
                }
                Frmypbsby f     = new  Frmypbsby(_menuTag, _chineseName, _mdiParent);
                Point     point = new Point(160, 75);
                f.Location  = point;
                f.MdiParent = _mdiParent;
                f.Show();
                f.FillDj(new Guid(tb.Rows[nrow]["id"].ToString()), true);
            }
            catch (System.Exception err)
            {
                MessageBox.Show("发生错误" + err.Message);
            }
        }