示例#1
0
        public void updateMBIforHICN()
        {
            Console.WriteLine("Starting  : Update MBI Process");
            _lCurrentMasterUserId = 1;
            try
            {
                List <DOGEN_Queue> lstGenQueues;
                BLCommon           objBLCommon = new BLCommon();
                ExceptionTypes     result      = objBLCommon.GetCasesToMask(out lstGenQueues);
                if (result == ExceptionTypes.Success && lstGenQueues.Count > 0)
                {
                    //Parallel.ForEach(lstGenQueues, item =>
                    //{

                    //});
                    Console.WriteLine("Total Records : " + lstGenQueues.Count);
                    foreach (var item in lstGenQueues)
                    {
                        if (item.GEN_QueueId.HasValue && item.GEN_QueueId.Value != 0 && !item.MemberCurrentHICN.IsNullOrEmpty())
                        {
                            Console.WriteLine("Processing : Gen_QueueId - " + item.GEN_QueueId + ", Household Id - " + item.GPSHouseholdID);
                            GetMemberEligibility(item.GPSHouseholdID, out string MBI);

                            if (!string.IsNullOrEmpty(MBI))
                            {
                                result = objBLCommon.UpdateMBIValue(item.GEN_QueueId.Value, MBI);
                                Console.WriteLine("Gen_QueueId - " + item.GEN_QueueId.Value + " Result : Success");
                            }
                        }
                    }
                    //});
                }
                else
                {
                    Console.WriteLine("Error : ");
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine("Error : " + ex.Message);
            }
        }