Beispiel #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);
        }
Beispiel #2
0
        private void butnew_Click(object sender, System.EventArgs e)
        {
            Frmypbsby f     = new Frmypbsby(_menuTag, _chineseName, _mdiParent);
            Point     point = new Point(160, 75);

            f.Location  = point;
            f.MdiParent = _mdiParent;
            f.Show();
        }
Beispiel #3
0
        private void butnew_Click(object sender, System.EventArgs e)
        {
            if (YpConfig.是否药库(InstanceForm.BCurrentDept.DeptId, InstanceForm.BDatabase) == true)
            {
                MessageBox.Show("您的登陆科室是药库,但进入了药房系统", "", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }


            Frmypbsby f     = new Frmypbsby(_menuTag, _chineseName, _mdiParent);
            Point     point = new Point(160, 75);

            f.Location  = point;
            f.MdiParent = _mdiParent;
            f.Show();
        }
Beispiel #4
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);
            }
        }