private void us_obj_2_form(decimal i_dc_id_gd_chi_tiet_du_an) { US_GD_CHI_TIET_DU_AN v_us_gd_ct_da = new US_GD_CHI_TIET_DU_AN(i_dc_id_gd_chi_tiet_du_an); m_us.strTRANG_THAI_HIEN_TAI = v_us_gd_ct_da.strTRANG_THAI_HIEN_TAI; m_txt_mo_ta.Text = v_us_gd_ct_da.strMO_TA; m_cbo_vi_tri.SelectedValue = v_us_gd_ct_da.dcID_VI_TRI; m_dat_tham_gia.Value = v_us_gd_ct_da.datTHOI_DIEM_TG; m_txt_ma_ns.Text = new US_DM_NHAN_SU(v_us_gd_ct_da.dcID_NHAN_SU).strMA_NV; m_txt_ma_du_an.Text = new US_V_DM_DU_AN_QUYET_DINH_TU_DIEN(v_us_gd_ct_da.dcID_DU_AN).strMA_DU_AN; if (v_us_gd_ct_da.dcTHOI_GIAN_TG == null) { m_txt_thoi_gian_tham_gia.Text = v_us_gd_ct_da.dcTHOI_GIAN_TG.ToString(); } else { m_txt_thoi_gian_tham_gia.Text = "0"; } if (v_us_gd_ct_da.dcID_DANH_HIEU != null) { m_cbo_danh_hieu.SelectedValue = v_us_gd_ct_da.dcID_DANH_HIEU; } if (v_us_gd_ct_da.datTHOI_DIEM_KT != null) { m_dat_ngay_kt.Value = v_us_gd_ct_da.datTHOI_DIEM_KT; } else { m_dat_ngay_kt.Checked = false; } if (v_us_gd_ct_da.dcID_QUYET_DINH != 0) { m_grb_quyet_dinh.Enabled = true; m_us_quyet_dinh = new US_DM_QUYET_DINH(v_us_gd_ct_da.dcID_QUYET_DINH); m_txt_ma_quyet_dinh.Text = m_us_quyet_dinh.strMA_QUYET_DINH; m_lbl_loai_qd.Text = new US.US_CM_DM_TU_DIEN(CIPConvert.ToDecimal(TU_DIEN.QD_THANH_LAP_DU_AN)).strTEN; m_dat_ngay_ky.Value = m_us_quyet_dinh.datNGAY_KY; m_dat_ngay_co_hieu_luc_qd.Value = m_us_quyet_dinh.datNGAY_CO_HIEU_LUC; if (m_us_quyet_dinh.datNGAY_HET_HIEU_LUC != null) { m_dat_ngay_het_hieu_luc_qd.Value = m_us_quyet_dinh.datNGAY_HET_HIEU_LUC; } m_txt_noi_dung.Text = m_us_quyet_dinh.strNOI_DUNG; m_str_ma_qd = m_us_quyet_dinh.strMA_QUYET_DINH; m_lbl_file_name.Text = m_us_quyet_dinh.strLINK; } }
private void chuyen_trang_thai_ve_no(decimal dc_id_nv) { US_GD_CHI_TIET_DU_AN v_us = new US_GD_CHI_TIET_DU_AN(); DS_GD_CHI_TIET_DU_AN v_ds = new DS_GD_CHI_TIET_DU_AN(); v_us.FillDatasetTrangThaiYes(v_ds, dc_id_nv); for (int i = 0; i < v_ds.Tables[0].Rows.Count; i++) { DataRow v_dr = v_ds.Tables[0].Rows[i]; datarow_2_us_obj(v_dr, v_us); v_us.strTRANG_THAI_HIEN_TAI = "N"; v_us.Update(); } }
private void datarow_2_us_obj(DataRow v_dr, US_GD_CHI_TIET_DU_AN v_us) { v_us.dcID = CIPConvert.ToDecimal(v_dr[GD_CHI_TIET_DU_AN.ID]); v_us.dcID_DU_AN = CIPConvert.ToDecimal(v_dr[GD_CHI_TIET_DU_AN.ID_DU_AN]); v_us.dcID_NHAN_SU = CIPConvert.ToDecimal(v_dr[GD_CHI_TIET_DU_AN.ID_NHAN_SU]); v_us.dcID_VI_TRI = CIPConvert.ToDecimal(v_dr[GD_CHI_TIET_DU_AN.ID_VI_TRI]); if (v_dr[GD_CHI_TIET_DU_AN.ID_DANH_HIEU].ToString() != "") { v_us.dcID_DANH_HIEU = CIPConvert.ToDecimal(v_dr[GD_CHI_TIET_DU_AN.ID_DANH_HIEU]); } if (v_dr[GD_CHI_TIET_DU_AN.THOI_GIAN_TG].ToString() != "") { v_us.dcTHOI_GIAN_TG = CIPConvert.ToDecimal(v_dr[GD_CHI_TIET_DU_AN.THOI_GIAN_TG]); } v_us.strLUA_CHON = v_dr[GD_CHI_TIET_DU_AN.LUA_CHON].ToString(); v_us.strMO_TA = v_dr[GD_CHI_TIET_DU_AN.MO_TA].ToString(); v_us.strTRANG_THAI_HIEN_TAI = v_dr[GD_CHI_TIET_DU_AN.TRANG_THAI_HIEN_TAI].ToString(); if (v_dr[GD_CHI_TIET_DU_AN.THOI_DIEM_KT].ToString() != "") { v_us.datTHOI_DIEM_KT = (DateTime)v_dr[GD_CHI_TIET_DU_AN.THOI_DIEM_KT]; } v_us.datTHOI_DIEM_TG = (DateTime)v_dr[GD_CHI_TIET_DU_AN.THOI_DIEM_TG]; }