示例#1
0
 internal static int DeleteProfile(hocba hb)
 {
     SqlParameter[] para = new SqlParameter[]
     {
         new SqlParameter("@ma", hb.mahb),
     };
     return(DataProvider.ExecuteNonQuery("xoahocba", para));
 }
示例#2
0
 public static int UpdateProfile(hocba hb)
 {
     SqlParameter[] para = new SqlParameter[]
     {
         new SqlParameter("@ma", hb.mahb),
         new SqlParameter("@tb", hb.diemtb),
         new SqlParameter("@hl", hb.hocluc),
         new SqlParameter("@hk", hb.hanhkiem),
         new SqlParameter("@vp", hb.thongtinvipham),
         new SqlParameter("@kl", hb.kyluat),
         new SqlParameter("@kt", hb.khenthuong),
         new SqlParameter("@dg", hb.danggiagv),
         new SqlParameter("@ghichu", hb.ghichu),
         new SqlParameter("@hocky", hb.hocky)
     };
     return(DataProvider.ExecuteNonQuery("suahocba", para));
 }
示例#3
0
        private void butluu_Click(object sender, EventArgs e)
        {
            if (txtma.Text == "")
            {
                MessageBox.Show("Chưa nhập đủ thông tin!");
                return;
            }
            hocba hb = new hocba();

            hb.mahb           = txtma.Text;
            hb.mahs           = cbxmahs.Text;
            hb.magv           = cbxmagv.Text;
            hb.diemtb         = txttb.Text;
            hb.hocluc         = txthl.Text;
            hb.hanhkiem       = txthk.Text;
            hb.thongtinvipham = txtvp.Text;
            hb.kyluat         = txtkl.Text;
            hb.khenthuong     = txtkt.Text;
            hb.danggiagv      = txtdg.Text;
            hb.ghichu         = txtghichu.Text;
            hb.hocky          = txthocky.Text;

            if (MessageBox.Show(string.Format("Bạn có muốn lưu học bạ của  học sinh này không?"),
                                "", MessageBoxButtons.OKCancel) == DialogResult.OK)
            {
                if (Bus.InsertProfile(hb) > 0)
                {
                    MessageBox.Show("lưu thành công!");
                    Hocba_Load(sender, e);
                }
                else
                {
                    MessageBox.Show("bị Lỗi");
                }
            }
        }
示例#4
0
 public static int DeleteProfile(hocba hb)
 {
     return(Dao.DeleteProfile(hb));
 }
示例#5
0
 public static int UpdateProfile(hocba hb)
 {
     return(Dao.UpdateProfile(hb));
 }
示例#6
0
 public static int InsertProfile(hocba hb)
 {
     return(Dao.InsertProfile(hb));
 }