Ejemplo n.º 1
0
        ///<summary>Inserts one CovCat into the database.  Provides option to use the existing priKey.</summary>
        public static long Insert(CovCat covCat, bool useExistingPK)
        {
            if (!useExistingPK && PrefC.RandomKeys)
            {
                covCat.CovCatNum = ReplicationServers.GetKey("covcat", "CovCatNum");
            }
            string command = "INSERT INTO covcat (";

            if (useExistingPK || PrefC.RandomKeys)
            {
                command += "CovCatNum,";
            }
            command += "Description,DefaultPercent,CovOrder,IsHidden,EbenefitCat) VALUES(";
            if (useExistingPK || PrefC.RandomKeys)
            {
                command += POut.Long(covCat.CovCatNum) + ",";
            }
            command +=
                "'" + POut.String(covCat.Description) + "',"
                + POut.Int(covCat.DefaultPercent) + ","
                + POut.Byte(covCat.CovOrder) + ","
                + POut.Bool(covCat.IsHidden) + ","
                + POut.Int((int)covCat.EbenefitCat) + ")";
            if (useExistingPK || PrefC.RandomKeys)
            {
                Db.NonQ(command);
            }
            else
            {
                covCat.CovCatNum = Db.NonQ(command, true);
            }
            return(covCat.CovCatNum);
        }
Ejemplo n.º 2
0
 ///<summary>Inserts one CovCat into the database.  Returns the new priKey.</summary>
 internal static long Insert(CovCat covCat)
 {
     if(DataConnection.DBtype==DatabaseType.Oracle) {
         covCat.CovCatNum=DbHelper.GetNextOracleKey("covcat","CovCatNum");
         int loopcount=0;
         while(loopcount<100){
             try {
                 return Insert(covCat,true);
             }
             catch(Oracle.DataAccess.Client.OracleException ex){
                 if(ex.Number==1 && ex.Message.ToLower().Contains("unique constraint") && ex.Message.ToLower().Contains("violated")){
                     covCat.CovCatNum++;
                     loopcount++;
                 }
                 else{
                     throw ex;
                 }
             }
         }
         throw new ApplicationException("Insert failed.  Could not generate primary key.");
     }
     else {
         return Insert(covCat,false);
     }
 }
Ejemplo n.º 3
0
        ///<summary>Inserts one CovCat into the database.  Provides option to use the existing priKey.  Doesn't use the cache.</summary>
        public static long InsertNoCache(CovCat covCat, bool useExistingPK)
        {
            bool   isRandomKeys = Prefs.GetBoolNoCache(PrefName.RandomPrimaryKeys);
            string command      = "INSERT INTO covcat (";

            if (!useExistingPK && isRandomKeys)
            {
                covCat.CovCatNum = ReplicationServers.GetKeyNoCache("covcat", "CovCatNum");
            }
            if (isRandomKeys || useExistingPK)
            {
                command += "CovCatNum,";
            }
            command += "Description,DefaultPercent,CovOrder,IsHidden,EbenefitCat) VALUES(";
            if (isRandomKeys || useExistingPK)
            {
                command += POut.Long(covCat.CovCatNum) + ",";
            }
            command +=
                "'" + POut.String(covCat.Description) + "',"
                + POut.Int(covCat.DefaultPercent) + ","
                + POut.Byte(covCat.CovOrder) + ","
                + POut.Bool(covCat.IsHidden) + ","
                + POut.Int((int)covCat.EbenefitCat) + ")";
            if (useExistingPK || isRandomKeys)
            {
                Db.NonQ(command);
            }
            else
            {
                covCat.CovCatNum = Db.NonQ(command, true, "CovCatNum", "covCat");
            }
            return(covCat.CovCatNum);
        }
Ejemplo n.º 4
0
 ///<summary>Inserts one CovCat into the database.  Provides option to use the existing priKey.</summary>
 internal static long Insert(CovCat covCat,bool useExistingPK)
 {
     if(!useExistingPK && PrefC.RandomKeys) {
         covCat.CovCatNum=ReplicationServers.GetKey("covcat","CovCatNum");
     }
     string command="INSERT INTO covcat (";
     if(useExistingPK || PrefC.RandomKeys) {
         command+="CovCatNum,";
     }
     command+="Description,DefaultPercent,CovOrder,IsHidden,EbenefitCat) VALUES(";
     if(useExistingPK || PrefC.RandomKeys) {
         command+=POut.Long(covCat.CovCatNum)+",";
     }
     command+=
          "'"+POut.String(covCat.Description)+"',"
         +    POut.Int   (covCat.DefaultPercent)+","
         +    POut.Byte  (covCat.CovOrder)+","
         +    POut.Bool  (covCat.IsHidden)+","
         +    POut.Int   ((int)covCat.EbenefitCat)+")";
     if(useExistingPK || PrefC.RandomKeys) {
         Db.NonQ(command);
     }
     else {
         covCat.CovCatNum=Db.NonQ(command,true);
     }
     return covCat.CovCatNum;
 }
Ejemplo n.º 5
0
 ///<summary>Inserts one CovCat into the database.  Returns the new priKey.</summary>
 public static long Insert(CovCat covCat)
 {
     if (DataConnection.DBtype == DatabaseType.Oracle)
     {
         covCat.CovCatNum = DbHelper.GetNextOracleKey("covcat", "CovCatNum");
         int loopcount = 0;
         while (loopcount < 100)
         {
             try {
                 return(Insert(covCat, true));
             }
             catch (Oracle.ManagedDataAccess.Client.OracleException ex) {
                 if (ex.Number == 1 && ex.Message.ToLower().Contains("unique constraint") && ex.Message.ToLower().Contains("violated"))
                 {
                     covCat.CovCatNum++;
                     loopcount++;
                 }
                 else
                 {
                     throw ex;
                 }
             }
         }
         throw new ApplicationException("Insert failed.  Could not generate primary key.");
     }
     else
     {
         return(Insert(covCat, false));
     }
 }
Ejemplo n.º 6
0
        ///<summary></summary>
        public static void MoveDown(CovCat covcat)
        {
            CovCats.Refresh();
            int oldOrder = CovCatB.GetOrderLong(covcat.CovCatNum);

            if (oldOrder == CovCatB.Listt.Length - 1)
            {
                return;
            }
            SetOrder(CovCatB.Listt[oldOrder], oldOrder + 1);
            SetOrder(CovCatB.Listt[oldOrder + 1], oldOrder);
        }
Ejemplo n.º 7
0
        ///<summary></summary>
        public static void MoveUp(CovCat covcat)
        {
            CovCats.Refresh();
            int oldOrder = CovCatB.GetOrderLong(covcat.CovCatNum);

            if (oldOrder == 0)
            {
                return;
            }
            SetOrder(CovCatB.Listt[oldOrder], oldOrder - 1);
            SetOrder(CovCatB.Listt[oldOrder - 1], oldOrder);
        }
Ejemplo n.º 8
0
        ///<summary></summary>
        public static void Insert(CovCat covcat)
        {
            string command = "INSERT INTO covcat (Description,DefaultPercent,"
                             + "CovOrder,IsHidden,EbenefitCat) VALUES("
                             + "'" + POut.PString(covcat.Description) + "', "
                             + "'" + POut.PInt(covcat.DefaultPercent) + "', "
                             + "'" + POut.PInt(covcat.CovOrder) + "', "
                             + "'" + POut.PBool(covcat.IsHidden) + "', "
                             + "'" + POut.PInt((int)covcat.EbenefitCat) + "')";

            General.NonQ(command);
        }
Ejemplo n.º 9
0
        ///<summary></summary>
        public static void Update(CovCat covcat)
        {
            string command = "UPDATE covcat SET "
                             + "Description = '" + POut.PString(covcat.Description) + "'"
                             + ",DefaultPercent = '" + POut.PInt(covcat.DefaultPercent) + "'"
                             + ",CovOrder = '" + POut.PInt(covcat.CovOrder) + "'"
                             + ",IsHidden = '" + POut.PBool(covcat.IsHidden) + "'"
                             + ",EbenefitCat = '" + POut.PInt((int)covcat.EbenefitCat) + "'"
                             + " WHERE covcatnum = '" + POut.PInt(covcat.CovCatNum) + "'";

            General.NonQ(command);
        }
Ejemplo n.º 10
0
        ///<summary>Updates one CovCat in the database.</summary>
        public static void Update(CovCat covCat)
        {
            string command = "UPDATE covcat SET "
                             + "Description   = '" + POut.String(covCat.Description) + "', "
                             + "DefaultPercent=  " + POut.Int(covCat.DefaultPercent) + ", "
                             + "CovOrder      =  " + POut.Byte(covCat.CovOrder) + ", "
                             + "IsHidden      =  " + POut.Bool(covCat.IsHidden) + ", "
                             + "EbenefitCat   =  " + POut.Int((int)covCat.EbenefitCat) + " "
                             + "WHERE CovCatNum = " + POut.Long(covCat.CovCatNum);

            Db.NonQ(command);
        }
Ejemplo n.º 11
0
        ///<summary>Updates one CovCat in the database.  Uses an old object to compare to, and only alters changed fields.  This prevents collisions and concurrency problems in heavily used tables.  Returns true if an update occurred.</summary>
        public static bool Update(CovCat covCat, CovCat oldCovCat)
        {
            string command = "";

            if (covCat.Description != oldCovCat.Description)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "Description = '" + POut.String(covCat.Description) + "'";
            }
            if (covCat.DefaultPercent != oldCovCat.DefaultPercent)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "DefaultPercent = " + POut.Int(covCat.DefaultPercent) + "";
            }
            if (covCat.CovOrder != oldCovCat.CovOrder)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "CovOrder = " + POut.Byte(covCat.CovOrder) + "";
            }
            if (covCat.IsHidden != oldCovCat.IsHidden)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "IsHidden = " + POut.Bool(covCat.IsHidden) + "";
            }
            if (covCat.EbenefitCat != oldCovCat.EbenefitCat)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "EbenefitCat = " + POut.Int((int)covCat.EbenefitCat) + "";
            }
            if (command == "")
            {
                return(false);
            }
            command = "UPDATE covcat SET " + command
                      + " WHERE CovCatNum = " + POut.Long(covCat.CovCatNum);
            Db.NonQ(command);
            return(true);
        }
Ejemplo n.º 12
0
 ///<summary>Inserts one CovCat into the database.  Returns the new priKey.  Doesn't use the cache.</summary>
 public static long InsertNoCache(CovCat covCat)
 {
     if (DataConnection.DBtype == DatabaseType.MySql)
     {
         return(InsertNoCache(covCat, false));
     }
     else
     {
         if (DataConnection.DBtype == DatabaseType.Oracle)
         {
             covCat.CovCatNum = DbHelper.GetNextOracleKey("covcat", "CovCatNum");                  //Cacheless method
         }
         return(InsertNoCache(covCat, true));
     }
 }
Ejemplo n.º 13
0
		///<summary>Converts a DataTable to a list of objects.</summary>
		public static List<CovCat> TableToList(DataTable table){
			List<CovCat> retVal=new List<CovCat>();
			CovCat covCat;
			for(int i=0;i<table.Rows.Count;i++) {
				covCat=new CovCat();
				covCat.CovCatNum     = PIn.Long  (table.Rows[i]["CovCatNum"].ToString());
				covCat.Description   = PIn.String(table.Rows[i]["Description"].ToString());
				covCat.DefaultPercent= PIn.Int   (table.Rows[i]["DefaultPercent"].ToString());
				covCat.CovOrder      = PIn.Byte  (table.Rows[i]["CovOrder"].ToString());
				covCat.IsHidden      = PIn.Bool  (table.Rows[i]["IsHidden"].ToString());
				covCat.EbenefitCat   = (OpenDentBusiness.EbenefitCategory)PIn.Int(table.Rows[i]["EbenefitCat"].ToString());
				retVal.Add(covCat);
			}
			return retVal;
		}
Ejemplo n.º 14
0
        private void butAddCat_Click(object sender, System.EventArgs e)
        {
            CovCat covcat = new CovCat();

            covcat.CovOrder       = (byte)CovCatC.Listt.Count;
            covcat.DefaultPercent = -1;
            FormInsCatEdit FormE = new FormInsCatEdit(covcat);

            FormE.IsNew = true;
            FormE.ShowDialog();
            if (FormE.DialogResult == DialogResult.OK)
            {
                changed = true;
                FillSpans();
            }
        }
Ejemplo n.º 15
0
        ///<summary>Converts a DataTable to a list of objects.</summary>
        public static List <CovCat> TableToList(DataTable table)
        {
            List <CovCat> retVal = new List <CovCat>();
            CovCat        covCat;

            for (int i = 0; i < table.Rows.Count; i++)
            {
                covCat                = new CovCat();
                covCat.CovCatNum      = PIn.Long(table.Rows[i]["CovCatNum"].ToString());
                covCat.Description    = PIn.String(table.Rows[i]["Description"].ToString());
                covCat.DefaultPercent = PIn.Int(table.Rows[i]["DefaultPercent"].ToString());
                covCat.CovOrder       = PIn.Byte(table.Rows[i]["CovOrder"].ToString());
                covCat.IsHidden       = PIn.Bool(table.Rows[i]["IsHidden"].ToString());
                covCat.EbenefitCat    = (EbenefitCategory)PIn.Int(table.Rows[i]["EbenefitCat"].ToString());
                retVal.Add(covCat);
            }
            return(retVal);
        }
Ejemplo n.º 16
0
        ///<summary>Converts a DataTable to a list of objects.</summary>
        public static List <CovCat> TableToList(DataTable table)
        {
            List <CovCat> retVal = new List <CovCat>();
            CovCat        covCat;

            foreach (DataRow row in table.Rows)
            {
                covCat                = new CovCat();
                covCat.CovCatNum      = PIn.Long(row["CovCatNum"].ToString());
                covCat.Description    = PIn.String(row["Description"].ToString());
                covCat.DefaultPercent = PIn.Int(row["DefaultPercent"].ToString());
                covCat.CovOrder       = PIn.Byte(row["CovOrder"].ToString());
                covCat.IsHidden       = PIn.Bool(row["IsHidden"].ToString());
                covCat.EbenefitCat    = (OpenDentBusiness.EbenefitCategory)PIn.Int(row["EbenefitCat"].ToString());
                retVal.Add(covCat);
            }
            return(retVal);
        }
Ejemplo n.º 17
0
        ///<summary>Pass in list of procedures and covCat, return the sum of all CanadaTimeUnits of the procedures in that covCat as a double.</summary>
        private double GetAmtUsedForCat(List <Procedure> listProcs, CovCat covCat)
        {
            List <ProcedureCode> listProcCodes = new List <ProcedureCode>();

            for (int i = 0; i < listProcs.Count; i++)
            {
                listProcCodes.Add(ProcedureCodes.GetProcCode(listProcs[i].CodeNum)); //turn list of procedures into list of procedurecodes.
            }
            double total = 0;                                                        //CanadaTimeUnits can be decimal numbers, like 0.5.

            for (int i = 0; i < listProcCodes.Count; i++)                            //for every procedurecode
            //Can be null if the procedure doesn't fall within any spans (like note proc, the code is "clinical" so doesn't fall inside any spans)
            {
                CovCat benCat = CovCats.GetCovCat(CovSpans.GetCat(listProcCodes[i].ProcCode));
                //if the covCat of that code is the same as the passed-in covCat
                if (benCat != null && benCat.EbenefitCat == covCat.EbenefitCat)
                {
                    total += listProcCodes[i].CanadaTimeUnits;                   //add the Canada time units to the total.
                }
            }
            return(total);
        }
Ejemplo n.º 18
0
 ///<summary>Returns true if Update(CovCat,CovCat) would make changes to the database.
 ///Does not make any changes to the database and can be called before remoting role is checked.</summary>
 public static bool UpdateComparison(CovCat covCat, CovCat oldCovCat)
 {
     if (covCat.Description != oldCovCat.Description)
     {
         return(true);
     }
     if (covCat.DefaultPercent != oldCovCat.DefaultPercent)
     {
         return(true);
     }
     if (covCat.CovOrder != oldCovCat.CovOrder)
     {
         return(true);
     }
     if (covCat.IsHidden != oldCovCat.IsHidden)
     {
         return(true);
     }
     if (covCat.EbenefitCat != oldCovCat.EbenefitCat)
     {
         return(true);
     }
     return(false);
 }
Ejemplo n.º 19
0
		///<summary>Updates one CovCat in the database.  Uses an old object to compare to, and only alters changed fields.  This prevents collisions and concurrency problems in heavily used tables.  Returns true if an update occurred.</summary>
		public static bool Update(CovCat covCat,CovCat oldCovCat){
			string command="";
			if(covCat.Description != oldCovCat.Description) {
				if(command!=""){ command+=",";}
				command+="Description = '"+POut.String(covCat.Description)+"'";
			}
			if(covCat.DefaultPercent != oldCovCat.DefaultPercent) {
				if(command!=""){ command+=",";}
				command+="DefaultPercent = "+POut.Int(covCat.DefaultPercent)+"";
			}
			if(covCat.CovOrder != oldCovCat.CovOrder) {
				if(command!=""){ command+=",";}
				command+="CovOrder = "+POut.Byte(covCat.CovOrder)+"";
			}
			if(covCat.IsHidden != oldCovCat.IsHidden) {
				if(command!=""){ command+=",";}
				command+="IsHidden = "+POut.Bool(covCat.IsHidden)+"";
			}
			if(covCat.EbenefitCat != oldCovCat.EbenefitCat) {
				if(command!=""){ command+=",";}
				command+="EbenefitCat = "+POut.Int   ((int)covCat.EbenefitCat)+"";
			}
			if(command==""){
				return false;
			}
			command="UPDATE covcat SET "+command
				+" WHERE CovCatNum = "+POut.Long(covCat.CovCatNum);
			Db.NonQ(command);
			return true;
		}
Ejemplo n.º 20
0
		///<summary>Updates one CovCat in the database.</summary>
		public static void Update(CovCat covCat){
			string command="UPDATE covcat SET "
				+"Description   = '"+POut.String(covCat.Description)+"', "
				+"DefaultPercent=  "+POut.Int   (covCat.DefaultPercent)+", "
				+"CovOrder      =  "+POut.Byte  (covCat.CovOrder)+", "
				+"IsHidden      =  "+POut.Bool  (covCat.IsHidden)+", "
				+"EbenefitCat   =  "+POut.Int   ((int)covCat.EbenefitCat)+" "
				+"WHERE CovCatNum = "+POut.Long(covCat.CovCatNum);
			Db.NonQ(command);
		}
Ejemplo n.º 21
0
        private void FillGrid()
        {
            gridRemainTimeUnits.BeginUpdate();
            gridRemainTimeUnits.ListGridRows.Clear();
            List <PatPlan> listPatPlans    = PatPlans.Refresh(_patCur.PatNum);
            List <InsSub>  listInsSubs     = InsSubs.GetMany(listPatPlans.Select(x => x.InsSubNum).ToList());
            List <Benefit> listPatBenefits = Benefits.Refresh(listPatPlans, listInsSubs);

            if (listPatBenefits.IsNullOrEmpty())
            {
                gridRemainTimeUnits.EndUpdate();
                return;
            }
            List <InsPlan> listInsPlans = InsPlans.GetByInsSubs(listInsSubs.Select(x => x.InsSubNum).ToList());
            List <Carrier> listCarriers = Carriers.GetCarriers(listInsPlans.Select(x => x.CarrierNum).ToList());
            //Get the LIM information for all potential subscribers.
            List <Patient> listSubscribers = Patients.GetLimForPats(listInsSubs.Select(x => x.Subscriber).ToList());
            GridRow        gridRow;
            //Get the last year of completed procedures because there is no current TimePeriod for benefits that will care about older procedures.
            //A subset of these procedures will be used for each specific benefit in order to correctly represent the time units remaining.
            List <Procedure> listCompletedProcs = Procedures.GetCompletedForDateRange(
                DateTime.Today.AddYears(-1),
                DateTimeOD.Today,
                listPatNums: new List <long> {
                _patCur.PatNum
            });
            //Get all of the claimprocs associated to the completed procedures in order to link procedures to insurance plans.
            List <ClaimProc> listClaimProcs = ClaimProcs.GetForProcs(listCompletedProcs.Select(x => x.ProcNum).ToList());

            foreach (Benefit benefit in listPatBenefits)
            {
                if (benefit.CovCatNum == 0 ||           //no category
                    benefit.BenefitType != InsBenefitType.Limitations ||                     //benefit type is not limitations
                    (benefit.TimePeriod != BenefitTimePeriod.CalendarYear &&                     //neither calendar year, serviceyear, or 12 months
                     benefit.TimePeriod != BenefitTimePeriod.ServiceYear &&
                     benefit.TimePeriod != BenefitTimePeriod.NumberInLast12Months) ||
                    benefit.Quantity < 0 ||                    //quantity is negative (negatives are allowed in FormBenefitEdit)
                    benefit.QuantityQualifier != BenefitQuantity.NumberOfServices ||                    //qualifier us not the number of services
                    (benefit.CoverageLevel != BenefitCoverageLevel.Family &&                     //neither individual nor family coverage level
                     benefit.CoverageLevel != BenefitCoverageLevel.Individual))
                {
                    continue;
                }
                List <Procedure> listProcs;
                //for calendar year, get completed procs from January.01.CurYear ~ Curdate
                if (benefit.TimePeriod == BenefitTimePeriod.CalendarYear)
                {
                    //01/01/CurYear. is there a better way?
                    listProcs = listCompletedProcs.FindAll(x => x.ProcDate >= new DateTime(DateTimeOD.Today.Year, 1, 1));
                }
                else if (benefit.TimePeriod == BenefitTimePeriod.NumberInLast12Months)
                {
                    //today - 12 months - 1 day. Procedures exactly 1 year ago are not counted in the range
                    listProcs = listCompletedProcs.FindAll(x => x.ProcDate >= DateTimeOD.Today.AddYears(-1).AddDays(1));
                }
                else                                                                  //if not calendar year, then it must be service year
                {
                    int monthRenew = InsPlans.RefreshOne(benefit.PlanNum).MonthRenew; //monthrenew only stores the month as an int.
                    if (DateTimeOD.Today.Month >= monthRenew)                         //if the the current date is past the renewal month, use the current year
                    {
                        listProcs = listCompletedProcs.FindAll(x => x.ProcDate >= new DateTime(DateTimeOD.Today.Year, monthRenew, 1));
                    }
                    else                       //otherwise use the previous year
                    {
                        listProcs = listCompletedProcs.FindAll(x => x.ProcDate >= new DateTime(DateTimeOD.Today.Year - 1, monthRenew, 1));
                    }
                }
                Dictionary <long, List <ClaimProc> > dictClaimProcsPerSub;
                if (benefit.PatPlanNum != 0)
                {
                    //The list of benefits that we are looping through was filled via listPatPlans so this will never fail.
                    //If this line fails then it means that there was a valid PlanNum AND a valid PatPlanNum set on the benefit which is invalid ATM.
                    dictClaimProcsPerSub = listClaimProcs.FindAll(x => x.InsSubNum == listPatPlans.First(y => y.PatPlanNum == benefit.PatPlanNum).InsSubNum)
                                           .GroupBy(x => x.InsSubNum)
                                           .ToDictionary(x => x.Key, x => x.ToList());
                }
                else                  //benefit.PatPlanNum was not set so benefit.PlanNum must be set.
                {
                    dictClaimProcsPerSub = listClaimProcs.FindAll(x => x.PlanNum == benefit.PlanNum)
                                           .GroupBy(x => x.InsSubNum)
                                           .ToDictionary(x => x.Key, x => x.ToList());
                }
                foreach (long insSubNum in dictClaimProcsPerSub.Keys)
                {
                    //The insSubNum should have a corresponding entry within listInsSubs.
                    InsSub insSub = listInsSubs.FirstOrDefault(x => x.InsSubNum == insSubNum);
                    if (insSub == null)
                    {
                        continue;                        //If not found then there are claimprocs associated to an inssub that is associated to a dropped or missing plan.
                    }
                    InsPlan insPlan    = listInsPlans.FirstOrDefault(x => x.PlanNum == insSub.PlanNum);
                    Carrier carrier    = listCarriers.FirstOrDefault(x => x.CarrierNum == insPlan.CarrierNum);
                    Patient subscriber = listSubscribers.FirstOrDefault(x => x.PatNum == insSub.Subscriber);
                    CovCat  category   = CovCats.GetCovCat(benefit.CovCatNum);
                    //Filter out any procedures that are not associated to the insurance plan of the current benefit.
                    List <Procedure> listFilterProcs = listProcs.FindAll(x => x.ProcNum.In(dictClaimProcsPerSub[insSubNum].Select(y => y.ProcNum)));
                    //Calculate the amount used for one benefit.
                    double amtUsed   = CovCats.GetAmtUsedForCat(listFilterProcs, category);
                    double amtRemain = benefit.Quantity - amtUsed;
                    gridRow = new GridRow((carrier == null) ? "Unknown" : carrier.CarrierName,
                                          (subscriber == null) ? "Unknown" : subscriber.GetNameFL(),
                                          category.Description.ToString(),
                                          benefit.Quantity.ToString(),
                                          amtUsed.ToString("F"),
                                          (amtRemain > 0) ? amtRemain.ToString("F") : "0");
                    gridRemainTimeUnits.ListGridRows.Add(gridRow);
                }
            }
            gridRemainTimeUnits.EndUpdate();
        }
Ejemplo n.º 22
0
 ///<summary>Inserts one CovCat into the database.  Returns the new priKey.</summary>
 public static long Insert(CovCat covCat)
 {
     return(Insert(covCat, false));
 }
Ejemplo n.º 23
0
 ///<summary>Inserts one CovCat into the database.  Returns the new priKey.  Doesn't use the cache.</summary>
 public static long InsertNoCache(CovCat covCat)
 {
     return(InsertNoCache(covCat, false));
 }
Ejemplo n.º 24
0
 ///<summary></summary>
 private static void SetOrder(CovCat covcat, int newOrder)
 {
     covcat.CovOrder = newOrder;
     Update(covcat);
 }
Ejemplo n.º 25
0
 ///<summary></summary>
 public FormInsCatEdit(CovCat covCatCur)
 {
     InitializeComponent();
     _covCatCur = covCatCur.Copy();
     Lan.F(this);
 }