Esempio n. 1
0
        public void XoaPhong()
        {
            DataTable numberr;

            dtoPhongHoc = new DTO_PhongHoc()
            {
                ID_CLASS = Convert.ToInt32(lblidphong.Text),
            };

            numberr = _th.PhongHocXoa(ref err, dtoPhongHoc);
            if (numberr.Rows.Count > 0)
            {
                ToastNotification.Show(this, numberr.Rows[0]["ErrMsg"].ToString(), null, 2000, (eToastGlowColor)eToastGlowColor.Blue, (eToastPosition)eToastPosition.BottomCenter);
            }
        }
Esempio n. 2
0
        public DataTable PhongHocXoa(ref string err, DTO_PhongHoc ph)
        {
            DataTable _dt = new DataTable();

            try
            {
                return(_dt = data.GetDataTable("sp_PhongHocXoa", CommandType.StoredProcedure, ref err

                                               , new SqlParameter("@ID_CLASS", ph.ID_CLASS)
                                               ));
            }
            catch (Exception ex)
            {
                err = ex.Message;
                return(_dt);
            }
        }
Esempio n. 3
0
        public DataTable PhongHocInsert(ref string err, DTO_PhongHoc ph)
        {
            DataTable _dt = new DataTable();

            try
            {
                return(_dt = data.GetDataTable("sp_PhongHoc", CommandType.StoredProcedure, ref err
                                               , new SqlParameter("@SCHOOL", ph.SCHOOL)
                                               , new SqlParameter("@CLASSNAME", ph.NAMES)

                                               ));
            }
            catch (Exception ex)
            {
                err = ex.Message;
                return(_dt);
            }
        }
Esempio n. 4
0
        public void ThemPhong()
        {
            if (txttentruong.Text == "" && txtdiachi.Text == "" && txtsdt.Text == "")
            {
                ToastNotification.Show(this, "Vui lòng điền đủ thông tin!", null, 2000, (eToastGlowColor)eToastGlowColor.Blue, (eToastPosition)eToastPosition.BottomCenter);
                return;
            }

            DataTable numberr;

            dtoPhongHoc = new DTO_PhongHoc()
            {
                SCHOOL = Convert.ToInt32(cbTruongHoc.SelectedValue),
                NAMES  = txttenphong.Text.Trim()
            };

            numberr = _th.PhongHocInsert(ref err, dtoPhongHoc);
            if (numberr.Rows.Count > 0)
            {
                ToastNotification.Show(this, numberr.Rows[0]["ErrMsg"].ToString(), null, 2000, (eToastGlowColor)eToastGlowColor.Blue, (eToastPosition)eToastPosition.BottomCenter);
            }
        }