public void XoaTruong() { DataTable numberr; dtoTruongHoc = new DTO_TruongHoc() { ID = Convert.ToInt32(lblidtruong.Text) }; numberr = _th.TruongHocXoa(ref err, dtoTruongHoc); if (numberr.Rows.Count > 0) { ToastNotification.Show(this, numberr.Rows[0]["ErrMsg"].ToString(), null, 2000, (eToastGlowColor)eToastGlowColor.Blue, (eToastPosition)eToastPosition.BottomCenter); } }
public DataTable TruongHocXoa(ref string err, DTO_TruongHoc th) { DataTable _dt = new DataTable(); try { return(_dt = data.GetDataTable("sp_TruongHocXoa", CommandType.StoredProcedure, ref err , new SqlParameter("@ID", th.ID) )); } catch (Exception ex) { err = ex.Message; return(_dt); } }
List <DTO_TruongHoc> loadDL() { List <DTO_TruongHoc> dsTH = new List <DTO_TruongHoc>(); foreach (Node n in graph) { DTO_TruongHoc th = new DTO_TruongHoc(); th.STT1 = n.Id; th.TenTruong = n.name; th.ViDo1 = n.x; th.KinhDo = n.y; th.SDT1 = n.SDT; th.DiaChi = n.DiaChi; th.TenQuan = n.tenQuan; dsTH.Add(th); } return(dsTH); }
public DataTable TruongHocInsert(ref string err, DTO_TruongHoc th) { DataTable _dt = new DataTable(); try { return(_dt = data.GetDataTable("sp_TruongHocInsert", CommandType.StoredProcedure, ref err , new SqlParameter("@NAME", th.NAME) , new SqlParameter("@ADDRESSs", th.ADDRESS) , new SqlParameter("@PHONES", th.PHONE) )); } catch (Exception ex) { err = ex.Message; return(_dt); } }
public void ThemTruong() { if (txttenphong.Text == "") { ToastNotification.Show(this, "Vui lòng điền đủ thông tin!", null, 2000, (eToastGlowColor)eToastGlowColor.Blue, (eToastPosition)eToastPosition.BottomCenter); return; } DataTable numberr; dtoTruongHoc = new DTO_TruongHoc() { NAME = txttentruong.Text, ADDRESS = txtdiachi.Text, PHONE = txtsdt.Text }; numberr = _th.TruongHocInsert(ref err, dtoTruongHoc); if (numberr.Rows.Count > 0) { ToastNotification.Show(this, numberr.Rows[0]["ErrMsg"].ToString(), null, 2000, (eToastGlowColor)eToastGlowColor.Blue, (eToastPosition)eToastPosition.BottomCenter); } }