Example #1
0
        private void cancle_Click(object sender, EventArgs e)
        {
            this.Close();
            UImain UImain = new UImain();

            UImain.Focus();
        }
Example #2
0
        private void sure_Click(object sender, EventArgs e)
        {
            if (bookname.Text == "" || autor.Text == "" || pubname.Text == "" || type.Text == "" || date.Text == "" || page.Text == "" || textBox1.Text == "" || bookIntro.Text == "")
            {
                if (MessageBox.Show("存在字段为空") == DialogResult.OK)
                {
                    return;
                }
            }

            DateTime tm;

            if (false == DateTime.TryParse(date.Text, out tm))
            {
                if (MessageBox.Show("时间格式错误") == DialogResult.OK)
                {
                    return;
                }
            }
            byte[]          road       = ESBasic.Helpers.ImageHelper.Convert(this.bookimg.BackgroundImage);
            LibraryBLL.book bookupdate = new LibraryBLL.book();
            try
            {
                bookupdate.bookinfochange(bookname.Text, autor.Text, type.Text, pubname.Text, date.Text, code, road, bookIntro.Text, Convert.ToInt32(page.Text), Convert.ToInt32(textBox1.Text));
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
                return;
            }
            this.Hide();
            UImain main = new UImain();

            main.Focus();
        }
Example #3
0
 private void sure_Click(object sender, EventArgs e)
 {
     if (Pwd != rePwd)
     {
         if (MessageBox.Show("两次密码不同,请重新输入") == DialogResult.OK)
         {
             this.password.Focus();
             return;
         }
     }
     if (!setphoto)
     {
         if (MessageBox.Show("未设置头像") == DialogResult.OK)
         {
             return;
         }
     }
     try
     {
         LibraryBLL.user.check(userid.Text);
     }
     catch
     {
         if (MessageBox.Show("名字已被注册,请重新输入") == DialogResult.OK)
         {
             return;
         }
     }
     byte[]          road      = ESBasic.Helpers.ImageHelper.Convert(this.head.BackgroundImage);
     LibraryBLL.user userlogin = new LibraryBLL.user();
     try
     {
         userlogin.userlogincheck(userid.Text, stuname.Text, stuid.Text, courage.Text, qq.Text, phone.Text, road, password.Text);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
         return;
     }
     if (MessageBox.Show("注册成功") == DialogResult.OK)
     {
         UImain uimain = new UImain();
         this.Hide();
         uimain.Focus();
         uimain.userinfoshow();
     }
 }
Example #4
0
        private void sure_Click(object sender, EventArgs e)
        {
            byte[]          road   = ESBasic.Helpers.ImageHelper.Convert(this.headchanged.BackgroundImage);
            LibraryBLL.user change = new LibraryBLL.user();
            try
            {
                change.headchange(name, road);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
                return;
            }
            k = true;
            UImain main = new UImain();

            this.Hide();
            main.Focus();
        }
Example #5
0
        private void sure_Click(object sender, EventArgs e)
        {
            if (bookname.Text == "" || autor.Text == "" || pubname.Text == "" || type.Text == "" || date.Text == "" || bookIds.Text == "" || page.Text == "" || textBox1.Text == "" || bookIntro.Text == "")
            {
                if (MessageBox.Show("存在字段为空") == DialogResult.OK)
                {
                    return;
                }
            }

            DateTime tm;

            if (false == DateTime.TryParse(date.Text, out tm))
            {
                if (MessageBox.Show("时间格式错误") == DialogResult.OK)
                {
                    return;
                }
            }

            string[] code = this.bookIds.Text.Trim().Split(';');
            for (int i = 0; i < code.Length; i++)
            {
                byte[]          road       = ESBasic.Helpers.ImageHelper.Convert(this.bookimg.BackgroundImage);
                LibraryBLL.book bookupdate = new LibraryBLL.book();
                try
                {
                    bookupdate.bookCheckIn(bookname.Text, autor.Text, type.Text, pubname.Text, date.Text, code[i], road, bookIntro.Text, Convert.ToInt32(page.Text), Convert.ToInt32(textBox1.Text));
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                    return;
                }
            }
            if (MessageBox.Show("书本增加成功") == DialogResult.OK)
            {
                this.Hide();
                UImain main = new UImain();
                main.Focus();
            }
        }