private void fill_data_2_le_trang_thai_lao_dong() { US_CM_DM_TU_DIEN v_us = new US_CM_DM_TU_DIEN(); DS_CM_DM_TU_DIEN v_ds = new DS_CM_DM_TU_DIEN(); v_us.FillDataset(v_ds, "where ID_LOAI_TU_DIEN = " + CONST_ID_LOAI_TU_DIEN.TRANG_THAI_LAO_DONG); m_le_trang_thai_hien_tai.Properties.DataSource = v_ds.Tables[0]; }
private decimal find_id_cach_tinh_thue(string ip_str_cach_tinh_thue) { try { US_CM_DM_TU_DIEN v_us = new US_CM_DM_TU_DIEN(); DS_CM_DM_TU_DIEN v_ds = new DS_CM_DM_TU_DIEN(); v_us.FillDataset(v_ds); string v_str_filter = "TEN = '" + ip_str_cach_tinh_thue + "'"; DataRow[] v_dr = v_ds.CM_DM_TU_DIEN.Select(v_str_filter); if (v_dr.Count() == 0) { return -1; } else { return CIPConvert.ToDecimal(v_dr.First()["ID"].ToString()); } } catch (Exception v_e) { throw v_e; } }
private string find_id_cm_dm_tu_dien_by_trinh_do_van_hoa(string ip_str_trinh_do_van_hoa) { US_CM_DM_TU_DIEN v_us = new US_CM_DM_TU_DIEN(); DS_CM_DM_TU_DIEN v_ds = new DS_CM_DM_TU_DIEN(); v_us.FillDataset(v_ds); ip_str_trinh_do_van_hoa = ip_str_trinh_do_van_hoa.Trim().ToUpper(); string v_str_filter = "MA_TU_DIEN = '" + ip_str_trinh_do_van_hoa + "'"; DataRow[] v_dr = v_ds.CM_DM_TU_DIEN.Select(v_str_filter); if (v_dr.Count() == 0) { return null; } else { return v_dr.First()["ID"].ToString(); } }
private void load_data_to_sle_loai_chuc_vu() { US_CM_DM_TU_DIEN v_us = new US_CM_DM_TU_DIEN(); DS_CM_DM_TU_DIEN v_ds = new DS_CM_DM_TU_DIEN(); v_us.FillDataset(v_ds,"WHERE ID_LOAI_TU_DIEN = 21"); m_sle_loai_chuc_vu.Properties.ValueMember = CM_DM_TU_DIEN.ID; m_sle_loai_chuc_vu.Properties.DisplayMember = CM_DM_TU_DIEN.TEN; m_sle_loai_chuc_vu.Properties.DataSource = v_ds.Tables[0]; }
private DataTable load_data_from_tu_dien(decimal id_loai_tu_dien) { US_CM_DM_TU_DIEN v_us = new US_CM_DM_TU_DIEN(); DS_CM_DM_TU_DIEN v_ds = new DS_CM_DM_TU_DIEN(); v_us.FillDataset(v_ds, "WHERE ID_LOAI_TU_DIEN = " + id_loai_tu_dien); return v_ds.Tables[0]; }
private decimal find_id_tu_dien_by_ma_tu_dien(string ma_tu_dien) { try { US_CM_DM_TU_DIEN v_us = new US_CM_DM_TU_DIEN(); DS_CM_DM_TU_DIEN v_ds = new DS_CM_DM_TU_DIEN(); v_us.FillDataset(v_ds); decimal id = (from DataRow dr in v_ds.Tables[0].Rows where (string)dr["MA_TU_DIEN"] == ma_tu_dien select (decimal)dr["ID"]).FirstOrDefault(); return id; } catch(Exception v_e) { throw v_e; } }
private void load_data_2_sle_chon_loai_trang_thai_lao_dong() { US_CM_DM_TU_DIEN v_us = new US_CM_DM_TU_DIEN(); DS_CM_DM_TU_DIEN v_ds = new DS_CM_DM_TU_DIEN(); v_us.FillDataset(v_ds, "WHERE ID_LOAI_TU_DIEN = 17"); m_sle_chon_loai_trang_thai_lao_dong.Properties.DataSource = v_ds.Tables[0]; m_sle_chon_loai_trang_thai_lao_dong.Properties.ValueMember = CM_DM_TU_DIEN.ID; m_sle_chon_loai_trang_thai_lao_dong.Properties.DisplayMember = CM_DM_TU_DIEN.TEN; m_sle_chon_loai_trang_thai_lao_dong.Properties.PopulateViewColumns(); m_sle_chon_loai_trang_thai_lao_dong.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.Standard; m_sle_chon_loai_trang_thai_lao_dong.Properties.BestFitMode = DevExpress.XtraEditors.Controls.BestFitMode.BestFit; }