Exemple #1
0
        private void FrmGrade_Load(object sender, EventArgs e)
        {
            DAL.dalCustom dal = new DAL.dalCustom();
            this.textBox_No.Text = dal.notenum().ToString();

            this.comboBox_Product.DataSource    = DAL.dalCustom.getType("CustomType", "C_Id", "C_Name");
            this.comboBox_Product.DisplayMember = "C_Name";
            this.comboBox_Product.ValueMember   = "C_Id";
        }
Exemple #2
0
        private void Btn_Add_Click(object sender, EventArgs e)
        {
            if (this.txt_Name.Text == "")
            {
                MessageBox.Show("名称输入不能为空!");
                return;
            }
            if (this.txt_Number.Text == "")
            {
                MessageBox.Show("编号输入不能为空!");
                return;
            }
            string number = this.txt_Number.Text;

            DAL.dalCustom dal    = new DAL.dalCustom();
            int           result = dal.ExistsName(number);

            if (result != 0)
            {
                MessageBox.Show("此编号已被使用!请更换.");
                return;
            }
            BindDataA();
            if (DAL.dalBook.AddBook(book))
            {
                MessageBox.Show("添加成功!");
                int    Uid = 0;
                string UID = this.txt_Recommend.Text;
                if (UID == "")
                {
                    Uid = 0;
                }
                else
                {
                    Uid = Int32.Parse(UID);
                }
                string Name    = this.txt_Name.Text;
                int    result2 = DAL.performance.addCust(Uid, Name);
                string result3 = result2.ToString();
                MessageBox.Show(result3 + "人添加!");
            }
            else
            {
                MessageBox.Show("添加失败!");
            }

            this.Close();
        }
Exemple #3
0
 private void FrmAdjust_Load(object sender, EventArgs e)
 {
     DAL.dalCustom dal = new DAL.dalCustom();
     this.textBox_No.Text = dal.notenum().ToString();
 }