public US_GD_HOC(decimal i_dbID) { pm_objDS = new DS_GD_HOC(); pm_strTableName = c_TableName; IMakeSelectCmd v_objMkCmd = new CMakeAndSelectCmd(pm_objDS, c_TableName); v_objMkCmd.AddCondition("ID", i_dbID, eKieuDuLieu.KieuNumber, eKieuSoSanh.Bang); SqlCommand v_cmdSQL; v_cmdSQL = v_objMkCmd.getSelectCmd(); this.FillDatasetByCommand(pm_objDS, v_cmdSQL); pm_objDR = getRowClone(pm_objDS.Tables[pm_strTableName].Rows[0]); }
public US_GD_HOC() { pm_objDS = new DS_GD_HOC(); pm_strTableName = c_TableName; pm_objDR = pm_objDS.Tables[pm_strTableName].NewRow(); }
private void cho_lop_cu_nghi_hoat_dong() { US_GD_HOC v_us = new US_GD_HOC(); DS_GD_HOC v_ds = new DS_GD_HOC(); v_us.FillDataset(v_ds, "WHERE ID_LOP_MON = " + CIPConvert.ToDecimal(m_cbo_lop_mon_cu.SelectedValue) + " and TRANG_THAI_YN = 'Y'"); for (int i = 0; i < v_ds.Tables[0].Rows.Count; i++) { DataRow v_dr = v_ds.Tables[0].Rows[i]; US_GD_HOC v_us_gd_hoc = new US_GD_HOC(CIPConvert.ToDecimal(v_dr[GD_HOC.ID])); v_us_gd_hoc.BeginTransaction(); v_us_gd_hoc.strTRANG_THAI_YN = "N"; v_us_gd_hoc.datNGAY_KET_THUC = DateTime.Now.Date; v_us_gd_hoc.Update(); v_us_gd_hoc.CommitTransaction(); } US_DM_LOP_MON v_us_dm_lop_mon = new US_DM_LOP_MON(CIPConvert.ToDecimal(m_cbo_lop_mon_cu.SelectedValue)); v_us_dm_lop_mon.BeginTransaction(); v_us_dm_lop_mon.dcTRANG_THAI_LOP_MON = 89; v_us_dm_lop_mon.Update(); v_us_dm_lop_mon.CommitTransaction(); }