public DataTable Get(KQHT_ThanhPhanDiemInfo pKQHT_ThanhPhanDiemInfo) { using (var client = new UnimOsServiceClient()) { return(ConvertList.ToDataTable <sp_KQHT_ThanhPhanDiem_GetResult>(client.cDKQHT_ThanhPhanDiem_Get(GlobalVar.MaXacThuc, pKQHT_ThanhPhanDiemInfo))); } }
private void AddBand() { BandedGridColumn bgc; KQHT_ThanhPhanDiemInfo pKQHT_ThanPhanDiemInfo = new KQHT_ThanhPhanDiemInfo(); cBKQHT_ThanhPhanDiem oBKQHT_ThanhPhanDiem = new cBKQHT_ThanhPhanDiem(); dtThanhPhan = oBKQHT_ThanhPhanDiem.Get(pKQHT_ThanPhanDiemInfo); grbNhapDiem.Columns.Clear(); if ((dtThanhPhan != null) && (dtThanhPhan.Rows.Count > 0)) { DataRow[] drThanhPhan = dtThanhPhan.Select("Thi=0"); foreach (DataRow dr in drThanhPhan) { dtSinhVien.Columns.Add(dr["KQHT_ThanhPhanDiemID"].ToString(), typeof(float)); bgc = new BandedGridColumn(); grbNhapDiem.Columns.Add(bgc); SetColumnBandCaption(bgc, dr["KyHieu"].ToString(), dr["KQHT_ThanhPhanDiemID"].ToString(), 70, DevExpress.Utils.HorzAlignment.Default, false); bgc.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.False; bgc.OptionsColumn.AllowEdit = false; bgc.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Numeric; bgc.SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Sum; bgvDiem.Columns.AddRange(new DevExpress.XtraGrid.Views.BandedGrid.BandedGridColumn[] { bgc }); } } }
public frmThanhPhanDiem() { InitializeComponent(); oBKQHT_ThanhPhanDiem = new cBKQHT_ThanhPhanDiem(); pKQHT_ThanhPhanDiemInfo = new KQHT_ThanhPhanDiemInfo(); SetBarButton(false); panelTop.Visible = false; }
public void Delete(KQHT_ThanhPhanDiemInfo pKQHT_ThanhPhanDiemInfo) { ArrayList colParam = new ArrayList(); colParam.Add(CreateParam("@KQHT_ThanhPhanDiemID", SqlDbType.Int, pKQHT_ThanhPhanDiemInfo.KQHT_ThanhPhanDiemID)); RunProcedure("sp_KQHT_ThanhPhanDiem_Delete", colParam); }
public DataTable Get(KQHT_ThanhPhanDiemInfo pKQHT_ThanhPhanDiemInfo) { ArrayList colParam = new ArrayList(); colParam.Add(CreateParam("@KQHT_ThanhPhanDiemID", SqlDbType.Int, pKQHT_ThanhPhanDiemInfo.KQHT_ThanhPhanDiemID)); return(RunProcedureGet("sp_KQHT_ThanhPhanDiem_Get", colParam)); }
public int Add(KQHT_ThanhPhanDiemInfo pKQHT_ThanhPhanDiemInfo) { int ID = 0; ID = oDKQHT_ThanhPhanDiem.Add(pKQHT_ThanhPhanDiemInfo); mErrorMessage = oDKQHT_ThanhPhanDiem.ErrorMessages; mErrorNumber = oDKQHT_ThanhPhanDiem.ErrorNumber; return(ID); }
public void Update(KQHT_ThanhPhanDiemInfo pKQHT_ThanhPhanDiemInfo) { ArrayList colParam = new ArrayList(); colParam.Add(CreateParam("@IDDM_TrinhDo", SqlDbType.Int, pKQHT_ThanhPhanDiemInfo.IDDM_TrinhDo)); colParam.Add(CreateParam("@KyHieu", SqlDbType.NVarChar, pKQHT_ThanhPhanDiemInfo.KyHieu)); colParam.Add(CreateParam("@TenThanhPhan", SqlDbType.NVarChar, pKQHT_ThanhPhanDiemInfo.TenThanhPhan)); colParam.Add(CreateParam("@SoDiem", SqlDbType.Int, pKQHT_ThanhPhanDiemInfo.SoDiem)); colParam.Add(CreateParam("@Thi", SqlDbType.Bit, pKQHT_ThanhPhanDiemInfo.Thi)); colParam.Add(CreateParam("@SoLanThi", SqlDbType.Int, pKQHT_ThanhPhanDiemInfo.SoLanThi)); colParam.Add(CreateParam("@STT", SqlDbType.Int, pKQHT_ThanhPhanDiemInfo.STT)); colParam.Add(CreateParam("@KQHT_ThanhPhanDiemID", SqlDbType.Int, pKQHT_ThanhPhanDiemInfo.KQHT_ThanhPhanDiemID)); RunProcedure("sp_KQHT_ThanhPhanDiem_Update", colParam); }
public int Add(KQHT_ThanhPhanDiemInfo pKQHT_ThanhPhanDiemInfo) { ArrayList colParam = new ArrayList(); colParam.Add(CreateParam("@IDDM_TrinhDo", SqlDbType.Int, pKQHT_ThanhPhanDiemInfo.IDDM_TrinhDo)); colParam.Add(CreateParam("@KyHieu", SqlDbType.NVarChar, pKQHT_ThanhPhanDiemInfo.KyHieu)); colParam.Add(CreateParam("@TenThanhPhan", SqlDbType.NVarChar, pKQHT_ThanhPhanDiemInfo.TenThanhPhan)); colParam.Add(CreateParam("@SoDiem", SqlDbType.Int, pKQHT_ThanhPhanDiemInfo.SoDiem)); colParam.Add(CreateParam("@Thi", SqlDbType.Bit, pKQHT_ThanhPhanDiemInfo.Thi)); colParam.Add(CreateParam("@SoLanThi", SqlDbType.Int, pKQHT_ThanhPhanDiemInfo.SoLanThi)); colParam.Add(CreateParam("@STT", SqlDbType.Int, pKQHT_ThanhPhanDiemInfo.STT)); colParam.Add(CreateParamOut("@ID", SqlDbType.Int)); return((int)RunProcedureOut("sp_KQHT_ThanhPhanDiem_Add", colParam)); }
public void ToDataRow(KQHT_ThanhPhanDiemInfo pKQHT_ThanhPhanDiemInfo, ref DataRow dr) { dr[pKQHT_ThanhPhanDiemInfo.strKQHT_ThanhPhanDiemID] = pKQHT_ThanhPhanDiemInfo.KQHT_ThanhPhanDiemID; dr[pKQHT_ThanhPhanDiemInfo.strIDDM_TrinhDo] = pKQHT_ThanhPhanDiemInfo.IDDM_TrinhDo; dr[pKQHT_ThanhPhanDiemInfo.strKyHieu] = pKQHT_ThanhPhanDiemInfo.KyHieu; dr[pKQHT_ThanhPhanDiemInfo.strTenThanhPhan] = pKQHT_ThanhPhanDiemInfo.TenThanhPhan; dr[pKQHT_ThanhPhanDiemInfo.strSoDiem] = pKQHT_ThanhPhanDiemInfo.SoDiem; dr[pKQHT_ThanhPhanDiemInfo.strThi] = pKQHT_ThanhPhanDiemInfo.Thi; if (pKQHT_ThanhPhanDiemInfo.SoLanThi != null) { dr[pKQHT_ThanhPhanDiemInfo.strSoLanThi] = pKQHT_ThanhPhanDiemInfo.SoLanThi; } if (pKQHT_ThanhPhanDiemInfo.STT != null) { dr[pKQHT_ThanhPhanDiemInfo.strSTT] = pKQHT_ThanhPhanDiemInfo.STT; } }
public void ToInfo(ref KQHT_ThanhPhanDiemInfo pKQHT_ThanhPhanDiemInfo, DataRow dr) { pKQHT_ThanhPhanDiemInfo.KQHT_ThanhPhanDiemID = int.Parse(dr[pKQHT_ThanhPhanDiemInfo.strKQHT_ThanhPhanDiemID].ToString()); pKQHT_ThanhPhanDiemInfo.IDDM_TrinhDo = int.Parse(dr[pKQHT_ThanhPhanDiemInfo.strIDDM_TrinhDo].ToString()); pKQHT_ThanhPhanDiemInfo.KyHieu = dr[pKQHT_ThanhPhanDiemInfo.strKyHieu].ToString(); pKQHT_ThanhPhanDiemInfo.TenThanhPhan = dr[pKQHT_ThanhPhanDiemInfo.strTenThanhPhan].ToString(); pKQHT_ThanhPhanDiemInfo.SoDiem = int.Parse(dr[pKQHT_ThanhPhanDiemInfo.strSoDiem].ToString()); pKQHT_ThanhPhanDiemInfo.Thi = bool.Parse(dr[pKQHT_ThanhPhanDiemInfo.strThi].ToString()); if ("" + dr[pKQHT_ThanhPhanDiemInfo.strSoLanThi] != "") { pKQHT_ThanhPhanDiemInfo.SoLanThi = int.Parse(dr[pKQHT_ThanhPhanDiemInfo.strSoLanThi].ToString()); } if ("" + dr[pKQHT_ThanhPhanDiemInfo.strSTT] != "") { pKQHT_ThanhPhanDiemInfo.SoLanThi = int.Parse(dr[pKQHT_ThanhPhanDiemInfo.strSTT].ToString()); } }
private void AddBand() { BandedGridColumn bgc; KQHT_ThanhPhanDiemInfo pKQHT_ThanPhanDiemInfo = new KQHT_ThanhPhanDiemInfo(); cBKQHT_ThanhPhanDiem oBKQHT_ThanhPhanDiem = new cBKQHT_ThanhPhanDiem(); dtThanhPhan = oBKQHT_ThanhPhanDiem.GetByIDTrinhDo(pDM_LopInfo.IDDM_TrinhDo); // dtThanhPhan = oBKQHT_CongThucDiem.GetMon(IDDM_Lop, Program.IDNamHoc, Program.HocKy, int.Parse(cmbMonHoc.EditValue.ToString())); grbNhapDiem.Columns.Clear(); if ((dtThanhPhan != null) && (dtThanhPhan.Rows.Count > 0)) { foreach (DataRow dr in dtThanhPhan.Rows) { dtSinhVien.Columns.Add(dr["KQHT_ThanhPhanDiemID"].ToString(), typeof(float)); bgc = new BandedGridColumn(); grbNhapDiem.Columns.Add(bgc); SetColumnBandCaption(bgc, dr["KyHieu"].ToString(), dr["KQHT_ThanhPhanDiemID"].ToString(), 60, DevExpress.Utils.HorzAlignment.Default, false); bgc.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.False; bgc.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Numeric; bgc.AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; bgc.SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Sum; bgvDiem.Columns.AddRange(new DevExpress.XtraGrid.Views.BandedGrid.BandedGridColumn[] { bgc }); } } //dtSinhVien.Columns.Add("TK", typeof(float)); //bgc = new BandedGridColumn(); //grbNhapDiem.Columns.Add(bgc); //SetColumnBandCaption(bgc, "Tổng kết", "TK", 80, DevExpress.Utils.HorzAlignment.Default, false); //bgc.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Numeric; //bgc.OptionsColumn.AllowEdit = false; //bgc.AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; //bgc.SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Sum; //bgvDiem.Columns.AddRange(new DevExpress.XtraGrid.Views.BandedGrid.BandedGridColumn[] { bgc }); }
public List <KQHT_ThanhPhanDiemInfo> GetList(KQHT_ThanhPhanDiemInfo pKQHT_ThanhPhanDiemInfo) { List <KQHT_ThanhPhanDiemInfo> oKQHT_ThanhPhanDiemInfoList = new List <KQHT_ThanhPhanDiemInfo>(); DataTable dtb = Get(pKQHT_ThanhPhanDiemInfo); if (dtb != null) { for (int i = 0; i < dtb.Rows.Count; i++) { oKQHT_ThanhPhanDiemInfo = new KQHT_ThanhPhanDiemInfo(); oKQHT_ThanhPhanDiemInfo.KQHT_ThanhPhanDiemID = int.Parse(dtb.Rows[i]["KQHT_ThanhPhanDiemID"].ToString()); oKQHT_ThanhPhanDiemInfo.IDDM_TrinhDo = int.Parse(dtb.Rows[i]["IDDM_TrinhDo"].ToString()); oKQHT_ThanhPhanDiemInfo.KyHieu = dtb.Rows[i]["KyHieu"].ToString(); oKQHT_ThanhPhanDiemInfo.TenThanhPhan = dtb.Rows[i]["TenThanhPhan"].ToString(); oKQHT_ThanhPhanDiemInfo.SoDiem = int.Parse(dtb.Rows[i]["SoDiem"].ToString()); oKQHT_ThanhPhanDiemInfo.Thi = bool.Parse(dtb.Rows[i]["Thi"].ToString()); oKQHT_ThanhPhanDiemInfo.SoLanThi = int.Parse(dtb.Rows[i]["SoLanThi"].ToString()); oKQHT_ThanhPhanDiemInfoList.Add(oKQHT_ThanhPhanDiemInfo); } } return(oKQHT_ThanhPhanDiemInfoList); }
private void AddBand() { KQHT_ThanhPhanDiemInfo pKQHT_ThanPhanDiemInfo = new KQHT_ThanhPhanDiemInfo(); cBKQHT_ThanhPhanDiem oBKQHT_ThanhPhanDiem = new cBKQHT_ThanhPhanDiem(); dtThanhPhan = oBKQHT_ThanhPhanDiem.GetByIDTrinhDo(pDM_LopInfo.IDDM_TrinhDo); if ((dtThanhPhan != null) && (dtThanhPhan.Rows.Count > 0)) { foreach (DataRow dr in dtThanhPhan.Rows) { if ("" + dr["CongThucDiem"] == "") { // Begin Add TenThanhPhanDiem if (!bool.Parse(dr["Thi"].ToString())) { // Nếu không phải là thành phần thi if (int.Parse(dr["SoDiem"].ToString()) == 1) { dtSinhVien.Columns.Add(dr["KQHT_ThanhPhanDiemID"].ToString() + "_1", typeof(double)); ColEnd++; } else { for (int i = 1; i <= int.Parse(dr["SoDiem"].ToString()); i++) { dtSinhVien.Columns.Add(dr["KQHT_ThanhPhanDiemID"].ToString() + "_" + i.ToString(), typeof(double)); ColEnd++; } } } else { // Nếu là thành phần thi IDThanhPhanThi = dr["KQHT_ThanhPhanDiemID"].ToString(); SoLanThi = int.Parse(dr["SoLanThi"].ToString()); for (int i = 1; i <= SoLanThi; i++) { dtSinhVien.Columns.Add(dr["KQHT_ThanhPhanDiemID"].ToString() + "_" + i.ToString(), typeof(double)); ColEnd++; } } // End Add TenThanhPhanDiem } else { IDKQHT_ThanhPhanTBHS = int.Parse(dr["KQHT_ThanhPhanDiemID"].ToString()); } } if (IDKQHT_ThanhPhanTBHS > 0) { DataRow[] arrDr = dtThanhPhan.Select("KQHT_ThanhPhanDiemID = " + IDKQHT_ThanhPhanTBHS.ToString()); dtSinhVien.Columns.Add(IDKQHT_ThanhPhanTBHS.ToString() + "_1", typeof(double)); } // Add cột lý do không được dự thi vào dtSinhVien.Columns.Add("LyDo", typeof(string)); // Add cột điểm trung bình môn học for (int i = 1; i <= SoLanThi; i++) { dtSinhVien.Columns.Add("TK_" + i.ToString(), typeof(double)); dtSinhVien.Columns.Add("IDKQHT_XepLoai_" + i.ToString(), typeof(int)); if (i > 1) { dtSinhVien.Columns.Add(IDKQHT_ThanhPhanTBHS.ToString() + "_" + i.ToString(), typeof(double)); } } } }
public void Delete(KQHT_ThanhPhanDiemInfo pKQHT_ThanhPhanDiemInfo) { oDKQHT_ThanhPhanDiem.Delete(pKQHT_ThanhPhanDiemInfo); mErrorMessage = oDKQHT_ThanhPhanDiem.ErrorMessages; mErrorNumber = oDKQHT_ThanhPhanDiem.ErrorNumber; }
public DataTable Get(KQHT_ThanhPhanDiemInfo pKQHT_ThanhPhanDiemInfo) { return(oDKQHT_ThanhPhanDiem.Get(pKQHT_ThanhPhanDiemInfo)); }