示例#1
0
        private void BtnUpdNotice_Click(object sender, EventArgs e)
        {
            if (CmoBoxNotDep.Text == string.Empty)
            {
                MessageBoxEx.Show("所属部门不能为空!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }
            if (CmoBoxNotType.Text == string.Empty)
            {
                MessageBoxEx.Show("类型不能为空!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }
            LoadingNews.Show();
            notice.Update(CmoBoxNotDep.Text.ToString(), CmoBoxNotType.Text.ToString());
            string Department = CmoBoxNotDep.Text.ToString();
            string Type       = CmoBoxNotType.Text.ToString();
            string Date       = DateTImePicNotice.Text;

            DataGridViewNotice.DataSource = notice.GetList(Department, Type, Date).Tables["Notice"].DefaultView;
            LoadingNews.Hide();
            MessageBoxEx.Show("更新完成!", "成功", MessageBoxButtons.OK, MessageBoxIcon.None);
        }
示例#2
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            this.BackColor = Color.FromArgb(63, 176, 215);
            LoadingIndex.Show();
            TimerLoad.Enabled         = true;
            TimerLoad.Interval        = 4000;
            TimerClock.Enabled        = true;
            TimerClock.Interval       = 1000;
            LblVersion.Text           = LblVersion.Text + Assembly.GetExecutingAssembly().GetName().Version.ToString();
            CmoBoxPrior.SelectedIndex = 1;
            FindPwd.Left    = (this.Width - FindPwd.Width) / 2;//还原位置
            FindPwd.Visible = false;
            Tool.StationNameXml();

            LblShowEmail.Text    = "邮箱:" + u.Email;
            LblShowTel.Text      = "电话:" + u.Tel;
            LblUserNameShow.Text = "用户名:" + u.UserName;
            LblShowDep.Text      = "所在单位:" + u.School;

            LoadingEmail.Hide();
            LoadingNews.Hide();
            LoadingTicket.Hide();
        }