Ejemplo n.º 1
0
        //设置未检查,未通过,选择性通过,通过
        void Button5Click(object sender, EventArgs e)
        {
            if (this.listView1.CheckedItems.Count > 0)
            {
                string state       = "";
                string bt          = ((Button)sender).Text;
                string checkedtime = "";
                string msgcontent  = "{0},您好!\n您发布的{1}版本,";
                if ("待检查".Equals(bt))
                {
                    state = Enum.GetName(typeof(CommonConst.CheckState), CommonConst.CheckState.未检查);
                }
                if ("未通过".Equals(bt))
                {
                    state       = Enum.GetName(typeof(CommonConst.CheckState), CommonConst.CheckState.未通过);
                    checkedtime = DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss");
                    msgcontent += "未通过界面检查。请登录以下网址查看界面检查详细:\n http://192.10.110.206:9001/CmdCtrlService/jsp/UIcheckView.jsp?checkno={2}";
                }
                if ("选择性通过".Equals(bt))
                {
                    state       = Enum.GetName(typeof(CommonConst.CheckState), CommonConst.CheckState.择性通过);
                    checkedtime = DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss");
                    msgcontent += "选择性通过界面检查。请登录以下网址查看界面检查详细:\n http://192.10.110.206:9001/CmdCtrlService/jsp/UIcheckView.jsp?checkno={2}";
                }
                if ("已通过".Equals(bt))
                {
                    state       = Enum.GetName(typeof(CommonConst.CheckState), CommonConst.CheckState.已通过);
                    checkedtime = DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss");
                    msgcontent += "检查单号为{2},已通过界面检查。";
                }
                foreach (ListViewItem lvi in this.listView1.CheckedItems)
                {
                    string      id     = lvi.SubItems[6].Text;
                    UIcheckinfo uiinfo = UICheckDao.getUIcheckInfoById(Int32.Parse(id));
                    uiinfo.Checkedtime = checkedtime;
                    uiinfo.State       = state;
                    uiinfo.Checkername = WatchCilent.GlobalParams.User.Fullname;
                    uiinfo.Checkerid   = WatchCilent.GlobalParams.User.Id;

                    SqlDBUtil.update(uiinfo);
                    SendMessageToManager(string.Format(msgcontent, uiinfo.Adminname, uiinfo.Packagename, uiinfo.Checkno), uiinfo.Adminid);
                }
                getUIcheckList();
            }
            else
            {
                MessageBox.Show("请至少选择一条记录!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
Ejemplo n.º 2
0
        //修改查看
        public UICheck(int id, bool isedit)
        {
            //
            // The InitializeComponent() call is required for Windows Forms designer support.
            //
            InitializeComponent();

            _isedit = isedit;
            uiinfo  = UICheckDao.getUIcheckInfoById(id);

            this.comboBox1.DataSource         = Source_Person;
            this.comboBox1.DisplayMember      = "fullname";
            this.comboBox1.ValueMember        = "id";
            this.comboBox1.AutoCompleteSource = AutoCompleteSource.ListItems;
            this.comboBox1.AutoCompleteMode   = AutoCompleteMode.SuggestAppend;

            this.textBox2.Text = UICheckDao.getNewCheckNO();

            this.comboBox2.DataSource         = Source_Module;
            this.comboBox2.DisplayMember      = "fullname";
            this.comboBox2.ValueMember        = "id";
            this.comboBox2.AutoCompleteSource = AutoCompleteSource.ListItems;
            this.comboBox2.AutoCompleteMode   = AutoCompleteMode.SuggestAppend;

            this.comboBox3.DataSource         = Source_Project;
            this.comboBox3.DisplayMember      = "projectname";
            this.comboBox3.ValueMember        = "id";
            this.comboBox3.AutoCompleteSource = AutoCompleteSource.ListItems;
            this.comboBox3.AutoCompleteMode   = AutoCompleteMode.SuggestAppend;

            //this.multiColumnFilterComboBox1.DataSource = PackageDao.getAllUnTestPack();

            this.multiColumnFilterComboBox1.ViewColList.Add(new MComboColumn("packagename", 200, true));
            this.multiColumnFilterComboBox1.ViewColList.Add(new MComboColumn("packtime", 60, true));
            this.multiColumnFilterComboBox1.ViewColList.Add(new MComboColumn("code", 60, true));
            this.multiColumnFilterComboBox1.DisplayMember = "packagename";
            this.multiColumnFilterComboBox1.ValueMember   = "id";
            this.multiColumnFilterComboBox1.Validated    += new EventHandler(Package_SelectedValueChanged);

            this.textBox2.ReadOnly = true;
            TestUnitBingData();

            if (isedit)
            {
                this.checkBox1.Checked            = false;
                this.pictureBox1.SelectColor      = Color.Red;
                this.textBox.Visible              = false;
                this.colorSelector.Visible        = false;
                drawToolsControl.ButtonRedoClick += new EventHandler(
                    DrawToolsControlButtonRedoClick);
                drawToolsControl.ButtonDrawStyleClick += new EventHandler(
                    DrawToolsControlButtonDrawStyleClick);
                colorSelector.ColorChanged    += new EventHandler(colorSelector_ColorChanged);
                colorSelector.FontSizeChanged += new EventHandler(colorSelector_FontSizeChanged);

                this.pictureBox1.TextBoxHide += new EventHandler(TextBoxExLostFocus);
                this.pictureBox1.TextBoxShow += new EventHandler(pictureBox1_TextBoxShow);
            }
            else
            {
                this.checkBox1.Checked        = true;
                this.textBox1.ReadOnly        = true;
                this.drawToolsControl.Visible = false;
                this.colorSelector.Visible    = false;
                this.textBox.Visible          = false;
                this.button4.Visible          = false;
                this.button3.Visible          = false;
                this.button6.Visible          = false;
            }
            this.CenterToParent();
            //
            // TODO: Add constructor code after the InitializeComponent() call.
            //
        }