private bool check_tuong_ung_lop_mon_hop_dong(decimal ip_dc_id_hop_dong, string ip_str_ma_lop_mon) { US_GD_LOP_MON_DETAIL v_us_gd_lop_mon_detail = new US_GD_LOP_MON_DETAIL(); DS_GD_LOP_MON_DETAIL v_ds_gd_lop_mon_detail = new DS_GD_LOP_MON_DETAIL(); decimal v_dc_id_lop_mon = get_id_lop_mon_by_ma_lop_mon(ip_str_ma_lop_mon); v_us_gd_lop_mon_detail.FillDataset(v_ds_gd_lop_mon_detail, " WHERE ID_HOP_DONG_KHUNG = " + ip_dc_id_hop_dong + " AND ID_LOP_MON=" + v_dc_id_lop_mon); if (v_ds_gd_lop_mon_detail.GD_LOP_MON_DETAIL.Rows.Count == 0) { return(false); // Nghĩa là không tương ứng } return(true); // Nghĩa là tương ứng (hay chúng là 1 cặp) }
protected void m_grv_SelectedIndexChanging(object sender, GridViewSelectEventArgs e) { try { m_lbl_mess.Text = ""; m_e_form_mode = DataEntryFormMode.UpdateDataState; m_hdf_id.Value = CIPConvert.ToStr(this.m_grv.DataKeys[e.NewSelectedIndex].Value); m_us_gd_lop_mon_detail = new US_GD_LOP_MON_DETAIL(CIPConvert.ToDecimal(this.m_grv.DataKeys[e.NewSelectedIndex].Value)); us_object_2_form(); } catch (Exception v_e) { CSystemLog_301.ExceptionHandle(this, v_e); } }