BKI_DichVuMatDat.NghiepVu.f342_dat_he_so_lns_lcd_de.find_id_loai_hop_dong_cua_nhan_vien C# (CSharp) Method

find_id_loai_hop_dong_cua_nhan_vien() private method

private find_id_loai_hop_dong_cua_nhan_vien ( decimal ip_dc_id_gd_hd ) : decimal
ip_dc_id_gd_hd decimal
return decimal
        private decimal find_id_loai_hop_dong_cua_nhan_vien(decimal ip_dc_id_gd_hd)
        {
            US_GD_HOP_DONG v_us = new US_GD_HOP_DONG();
            DS_GD_HOP_DONG v_ds = new DS_GD_HOP_DONG();

            v_us.FillDataset(v_ds);

            string v_str_filter = "ID = " + ip_dc_id_gd_hd + " AND DA_XOA = 'N'";
            DataRow[] v_dr = v_ds.GD_HOP_DONG.Select(v_str_filter);

            if (v_dr.Count() == 0)
            {
                return -1;
            }
            else
            {
                return CIPConvert.ToDecimal(v_dr.First()["ID_LOAI_HOP_DONG"].ToString());
            }
        }