public US_DM_CO_SO(decimal i_dbID) { pm_objDS = new DS_DM_CO_SO(); 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]); }
private bool validate_ma_update(string ip_str_ma, decimal ip_dc_id) { US_DM_CO_SO v_us = new US_DM_CO_SO(); DS_DM_CO_SO v_ds = new DS_DM_CO_SO(); v_us.FillDataset(v_ds, "where ma='" + ip_str_ma + "' or id=" + ip_dc_id); if (v_ds.DM_CO_SO.Count != 1) return false; return true; }
private bool validate_ma_insert(string v_str_ma) { US_DM_CO_SO v_us = new US_DM_CO_SO(); DS_DM_CO_SO v_ds = new DS_DM_CO_SO(); v_us.FillDataset(v_ds, "where ma='" + v_str_ma + "'"); if (v_ds.DM_CO_SO.Count != 0 && m_e_form_mode == DataEntryFormMode.InsertDataState) return false; return true; }
public US_DM_CO_SO() { pm_objDS = new DS_DM_CO_SO(); pm_strTableName = c_TableName; pm_objDR = pm_objDS.Tables[pm_strTableName].NewRow(); }
private void load_cbo_dm_co_co() { US_DM_CO_SO v_us = new US_DM_CO_SO(); DS_DM_CO_SO v_ds = new DS_DM_CO_SO(); v_us.FillDataset(v_ds); m_cbo_tinh_theo_co_so.DataSource = v_ds.DM_CO_SO; m_cbo_tinh_theo_co_so.ValueMember = DM_CO_SO.ID; m_cbo_tinh_theo_co_so.DisplayMember = DM_CO_SO.MA; //DataRow v_dr = v_ds.DM_CO_SO.NewRow(); //v_dr[DM_CO_SO.ID] = -1; //v_dr[DM_CO_SO.MA] = "Tất cả"; //v_dr[DM_CO_SO.ID_LOAI_CO_SO] = -1; //v_ds.DM_CO_SO.Rows.InsertAt(v_dr, 0); m_cbo_tinh_theo_co_so.SelectedIndex = 0; }