Example #1
0
        public void addOperationInfo()
        {
            login();
            OperationInfo info = new OperationInfo();
            //info.dealPattern = "test";
            //info.dealStatus = "2";
            //info.dealStep = "test";
            //info.inputTime = DateTime.Today;
            //info.operationDesc = "test";
            //info.operType = "aa";
            //info.opserId = 1;
            //info.userId = 22;
            DataLayerResult result = dataLayer.AddOperationInfo(info);

            Assert.AreEqual(result, DataLayerResult.Success);
            logou();
        }
Example #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            //处理手顺
            if (this.textBox1.Text.Trim().Equals(""))
            {
                MessageBox.Show("处理手顺不能为空!");
                return;
            }
            //错误描述
            if (this.textBox2.Text.Trim().Equals(""))
            {
                MessageBox.Show("错误描述不能为空!");
                return;
            }

            IDataLayer dataLayer = (IDataLayer)Settings.Default.Context["datalayer"];

            sysguard.SysguardWS.OperationInfo operation = new sysguard.SysguardWS.OperationInfo();

            operation.errorDesp = this.textBox2.Text;

            operation.operContent = this.textBox1.Text;

            operation.inputTime = DateTime.Now;

            sysguard.SysguardWS.UserInfo user = dataLayer.User;

            operation.userId = user.userId;

            DataLayerResult result = dataLayer.AddOperationInfo(operation);

            if (result == DataLayerResult.Success)
            {
                DialogResult resultDialo = MessageBox.Show("新的手顺添加成功,是否退出?", "添加成功!", MessageBoxButtons.YesNo);
                if (resultDialo == DialogResult.Yes)
                {
                    this.DialogResult = DialogResult.OK;
                    this.Dispose();
                }
                else
                {
                    reset();
                    explainControl.Flush();
                }
            }
        }