public void ToInfo(ref TC_DanhSachHocBong_ChiTietInfo pTC_DanhSachHocBong_ChiTietInfo, DataRow dr) { pTC_DanhSachHocBong_ChiTietInfo.TC_DanhSachHocBong_ChiTietID = int.Parse(dr[pTC_DanhSachHocBong_ChiTietInfo.strTC_DanhSachHocBong_ChiTietID].ToString()); pTC_DanhSachHocBong_ChiTietInfo.IDTC_DanhSachHocBong = int.Parse(dr[pTC_DanhSachHocBong_ChiTietInfo.strIDTC_DanhSachHocBong].ToString()); pTC_DanhSachHocBong_ChiTietInfo.Thang = int.Parse(dr[pTC_DanhSachHocBong_ChiTietInfo.strThang].ToString()); pTC_DanhSachHocBong_ChiTietInfo.SoTien = float.Parse(dr[pTC_DanhSachHocBong_ChiTietInfo.strSoTien].ToString()); }
private void btnCapNhat_Click(object sender, EventArgs e) { if (dtSinhVien == null || dtSinhVien.Rows.Count <= 0) { return; } DataTable dtChange = dtSinhVien.GetChanges(); if (dtChange == null) { return; } foreach (DataRow dr in dtChange.Rows) { try { pTC_DanhSachHocBong_ChiTietInfo = new TC_DanhSachHocBong_ChiTietInfo(); pTC_DanhSachHocBong_ChiTietInfo.TC_DanhSachHocBong_ChiTietID = int.Parse(dr["TC_DanhSachHocBong_ChiTietID"].ToString()); if ("" + dr["SoNgayThieuCong"] != "") { pTC_DanhSachHocBong_ChiTietInfo.SoNgayThieuCong = int.Parse(dr["SoNgayThieuCong"].ToString()); } if ("" + dr["SoTienThieuCong"] != "") { pTC_DanhSachHocBong_ChiTietInfo.SoTienThieuCong = int.Parse(dr["SoTienThieuCong"].ToString()); } pTC_DanhSachHocBong_ChiTietInfo.GhiChu = "" + dr["GhiChu"]; oBTC_DanhSachHocBong_ChiTiet.UpdateThieuCong(pTC_DanhSachHocBong_ChiTietInfo); } catch { } } LuuThanhCong(); }
public void ToDataRow(TC_DanhSachHocBong_ChiTietInfo pTC_DanhSachHocBong_ChiTietInfo, ref DataRow dr) { dr[pTC_DanhSachHocBong_ChiTietInfo.strTC_DanhSachHocBong_ChiTietID] = pTC_DanhSachHocBong_ChiTietInfo.TC_DanhSachHocBong_ChiTietID; dr[pTC_DanhSachHocBong_ChiTietInfo.strIDTC_DanhSachHocBong] = pTC_DanhSachHocBong_ChiTietInfo.IDTC_DanhSachHocBong; dr[pTC_DanhSachHocBong_ChiTietInfo.strThang] = pTC_DanhSachHocBong_ChiTietInfo.Thang; dr[pTC_DanhSachHocBong_ChiTietInfo.strSoTien] = pTC_DanhSachHocBong_ChiTietInfo.SoTien; }
public void Delete(TC_DanhSachHocBong_ChiTietInfo pTC_DanhSachHocBong_ChiTietInfo) { ArrayList colParam = new ArrayList(); colParam.Add(CreateParam("@TC_DanhSachHocBong_ChiTietID", SqlDbType.Int, pTC_DanhSachHocBong_ChiTietInfo.TC_DanhSachHocBong_ChiTietID)); RunProcedure("sp_TC_DanhSachHocBong_ChiTiet_Delete", colParam); }
public DataTable Get(TC_DanhSachHocBong_ChiTietInfo pTC_DanhSachHocBong_ChiTietInfo) { ArrayList colParam = new ArrayList(); colParam.Add(CreateParam("@TC_DanhSachHocBong_ChiTietID", SqlDbType.Int, pTC_DanhSachHocBong_ChiTietInfo.TC_DanhSachHocBong_ChiTietID)); return(RunProcedureGet("sp_TC_DanhSachHocBong_ChiTiet_Get", colParam)); }
public int Add(TC_DanhSachHocBong_ChiTietInfo pTC_DanhSachHocBong_ChiTietInfo) { int ID = 0; ID = oDTC_DanhSachHocBong_ChiTiet.Add(pTC_DanhSachHocBong_ChiTietInfo); mErrorMessage = oDTC_DanhSachHocBong_ChiTiet.ErrorMessages; mErrorNumber = oDTC_DanhSachHocBong_ChiTiet.ErrorNumber; return(ID); }
public void Update(TC_DanhSachHocBong_ChiTietInfo pTC_DanhSachHocBong_ChiTietInfo) { ArrayList colParam = new ArrayList(); colParam.Add(CreateParam("@IDTC_DanhSachHocBong", SqlDbType.Int, pTC_DanhSachHocBong_ChiTietInfo.IDTC_DanhSachHocBong)); colParam.Add(CreateParam("@Thang", SqlDbType.Int, pTC_DanhSachHocBong_ChiTietInfo.Thang)); colParam.Add(CreateParam("@SoTien", SqlDbType.Money, pTC_DanhSachHocBong_ChiTietInfo.SoTien)); colParam.Add(CreateParam("@TC_DanhSachHocBong_ChiTietID", SqlDbType.Int, pTC_DanhSachHocBong_ChiTietInfo.TC_DanhSachHocBong_ChiTietID)); RunProcedure("sp_TC_DanhSachHocBong_ChiTiet_Update", colParam); }
public int Add(TC_DanhSachHocBong_ChiTietInfo pTC_DanhSachHocBong_ChiTietInfo) { ArrayList colParam = new ArrayList(); colParam.Add(CreateParam("@IDTC_DanhSachHocBong", SqlDbType.Int, pTC_DanhSachHocBong_ChiTietInfo.IDTC_DanhSachHocBong)); colParam.Add(CreateParam("@Thang", SqlDbType.Int, pTC_DanhSachHocBong_ChiTietInfo.Thang)); colParam.Add(CreateParam("@SoTien", SqlDbType.Money, pTC_DanhSachHocBong_ChiTietInfo.SoTien)); colParam.Add(CreateParamOut("@ID", SqlDbType.Int)); return((int)RunProcedureOut("sp_TC_DanhSachHocBong_ChiTiet_Add", colParam)); }
public void UpdateThieuCong(TC_DanhSachHocBong_ChiTietInfo pTC_DanhSachHocBong_ChiTietInfo) { ArrayList colParam = new ArrayList(); colParam.Add(CreateParam("@SoNgayThieuCong", SqlDbType.Int, pTC_DanhSachHocBong_ChiTietInfo.SoNgayThieuCong)); colParam.Add(CreateParam("@SoTienThieuCong", SqlDbType.Money, pTC_DanhSachHocBong_ChiTietInfo.SoTienThieuCong)); colParam.Add(CreateParam("@GhiChu", SqlDbType.NVarChar, pTC_DanhSachHocBong_ChiTietInfo.GhiChu)); colParam.Add(CreateParam("@TC_DanhSachHocBong_ChiTietID", SqlDbType.Int, pTC_DanhSachHocBong_ChiTietInfo.TC_DanhSachHocBong_ChiTietID)); RunProcedure("sp_TC_DanhSachHocBong_ChiTiet_UpdateNgayCong", colParam); }
public frmDanhSachHocBong() { InitializeComponent(); pTC_DanhSachHocBongInfo = new TC_DanhSachHocBongInfo(); oBTC_DanhSachHocBong = new cBTC_DanhSachHocBong(); oBTC_DanhSachHocBong_ChiTiet = new cBTC_DanhSachHocBong_ChiTiet(); pTC_DanhSachHocBong_ChiTietInfo = new TC_DanhSachHocBong_ChiTietInfo(); pDM_LopInfo = new DM_LopInfo(); //pTC_BienLaiThuTien_ChiTietInfo = new TC_BienLaiThuTien_ChiTietInfo(); //oBTC_BienLaiThuTien_ChiTiet = new cBTC_BienLaiThuTien_ChiTiet(); //pTC_BienLaiThuTienInfo = new TC_BienLaiThuTienInfo(); //oBTC_BienLaiThuTien = new cBTC_BienLaiThuTien(); }
public List <TC_DanhSachHocBong_ChiTietInfo> GetList(TC_DanhSachHocBong_ChiTietInfo pTC_DanhSachHocBong_ChiTietInfo) { List <TC_DanhSachHocBong_ChiTietInfo> oTC_DanhSachHocBong_ChiTietInfoList = new List <TC_DanhSachHocBong_ChiTietInfo>(); DataTable dtb = Get(pTC_DanhSachHocBong_ChiTietInfo); if (dtb != null) { for (int i = 0; i < dtb.Rows.Count; i++) { oTC_DanhSachHocBong_ChiTietInfo = new TC_DanhSachHocBong_ChiTietInfo(); oTC_DanhSachHocBong_ChiTietInfo.TC_DanhSachHocBong_ChiTietID = int.Parse(dtb.Rows[i]["TC_DanhSachHocBong_ChiTietID"].ToString()); oTC_DanhSachHocBong_ChiTietInfo.IDTC_DanhSachHocBong = int.Parse(dtb.Rows[i]["IDTC_DanhSachHocBong"].ToString()); oTC_DanhSachHocBong_ChiTietInfo.Thang = int.Parse(dtb.Rows[i]["Thang"].ToString()); oTC_DanhSachHocBong_ChiTietInfo.SoTien = float.Parse(dtb.Rows[i]["SoTien"].ToString()); oTC_DanhSachHocBong_ChiTietInfoList.Add(oTC_DanhSachHocBong_ChiTietInfo); } } return(oTC_DanhSachHocBong_ChiTietInfoList); }
public void Delete(TC_DanhSachHocBong_ChiTietInfo pTC_DanhSachHocBong_ChiTietInfo) { oDTC_DanhSachHocBong_ChiTiet.Delete(pTC_DanhSachHocBong_ChiTietInfo); mErrorMessage = oDTC_DanhSachHocBong_ChiTiet.ErrorMessages; mErrorNumber = oDTC_DanhSachHocBong_ChiTiet.ErrorNumber; }
public void UpdateThieuCong(TC_DanhSachHocBong_ChiTietInfo pTC_DanhSachHocBong_ChiTietInfo) { oDTC_DanhSachHocBong_ChiTiet.UpdateThieuCong(pTC_DanhSachHocBong_ChiTietInfo); mErrorMessage = oDTC_DanhSachHocBong_ChiTiet.ErrorMessages; mErrorNumber = oDTC_DanhSachHocBong_ChiTiet.ErrorNumber; }
public DataTable Get(TC_DanhSachHocBong_ChiTietInfo pTC_DanhSachHocBong_ChiTietInfo) { return(oDTC_DanhSachHocBong_ChiTiet.Get(pTC_DanhSachHocBong_ChiTietInfo)); }