示例#1
0
        private void radioButton1_CheckedChanged(object sender, EventArgs e)
        {
            string code = string.Empty;
            string type = string.Empty;

            curUser = Neusoft.FrameWork.Management.Connection.Operator as Neusoft.HISFC.Models.Base.Employee;
            Neusoft.HISFC.BizLogic.Manager.UserText m = new Neusoft.HISFC.BizLogic.Manager.UserText();
            if (this.radioButton1.Checked)
            {
                type = "1";
                code = curUser.Dept.ID;
            }
            else
            {
                type = "0";
                code = curUser.ID;
            }
            ArrayList al = m.GetGroupList(code, type);

            if (txtMemo.Items.Count > 0)
            {
                this.txtMemo.Items.Clear();
                txtMemo.Text = "";
            }
            this.txtMemo.AddItems(al);
        }
示例#2
0
        protected int GetValue()
        {
            if (myUserText == null)
            {
                return(-1);
            }
            if (myUserText.Name == "")
            {
                if (myUserText.Text.Trim().Length > 5)
                {
                    myUserText.Name = myUserText.Text.Trim().Substring(0, 5);
                }
                else
                {
                    myUserText.Name = myUserText.Text;
                }
            }
            this.txtMemo.Text  = myUserText.Memo;
            this.textBox1.Text = myUserText.Name;

            if (this.richTextBox1.Text == "")
            {
                this.richTextBox1.Text = myUserText.Text;
            }

            if (myUserText.Type == "1")
            {
                this.radioButton1.Checked = true;
            }
            else
            {
                this.radioButton2.Checked = true;
            }
            try
            {
                string code = string.Empty;
                string type = string.Empty;
                curUser = Neusoft.FrameWork.Management.Connection.Operator as Neusoft.HISFC.Models.Base.Employee;
                Neusoft.HISFC.BizLogic.Manager.UserText m = new Neusoft.HISFC.BizLogic.Manager.UserText();
                if (this.radioButton1.Checked)
                {
                    type = "1";
                    code = curUser.Dept.ID;
                }
                else
                {
                    type = "0";
                    code = curUser.ID;
                }
                ArrayList al = m.GetGroupList(code, type);
                if (txtMemo.Items.Count > 0)
                {
                    txtMemo.Items.Clear();
                    txtMemo.Text = "";
                }
                this.txtMemo.AddItems(al);
            }
            catch
            {
                return(-1);
            }
            return(0);
        }