BKI_DichVuMatDat.NghiepVu.f360_quan_ly_quyet_dinh.find_id_qd_moi_lap C# (CSharp) Method

find_id_qd_moi_lap() private method

private find_id_qd_moi_lap ( decimal ip_dc_id_loai_qd, string ip_str_ma_qd ) : decimal
ip_dc_id_loai_qd decimal
ip_str_ma_qd string
return decimal
        private decimal find_id_qd_moi_lap(decimal ip_dc_id_loai_qd, string ip_str_ma_qd)
        {
            try
            {
                US_GD_QUYET_DINH v_us = new US_GD_QUYET_DINH();
                DS_GD_QUYET_DINH v_ds = new DS_GD_QUYET_DINH();

                v_us.FillDataset(v_ds);

                string v_str_filter = "ID_LOAI_QD = " + ip_dc_id_loai_qd + " AND MA_QUYET_DINH = '" + ip_str_ma_qd + "'";
                DataRow[] v_dr = v_ds.GD_QUYET_DINH.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;
            }
        }