예제 #1
0
 public void SetObjects()
 {
     if (!BillingIds.Equals("N/A"))
     {
         Thread dbThread = new Thread(() =>
         {
             int[] ids = ParseIds(BillingIds);
             List <BillingItem> temp = Database.GetBillingItems(ids);
             items.AddRange(temp);
         })
         {
             IsBackground = true
         };
         dbThread.Start();
     }
     if (!LineItemIds.Equals("N/A"))
     {
         Thread dbThread = new Thread(() =>
         {
             int[] ids            = ParseIds(LineItemIds);
             List <LineItem> temp = Database.GetLineItems(ids);
             lineItems.AddRange(temp);
         })
         {
             IsBackground = true
         };
         dbThread.Start();
     }
 }
예제 #2
0
        public void RemoveLineItemID(int id)
        {
            StringBuilder str = new StringBuilder(LineItemIds);

            str.Replace($"{id},", string.Empty);
            LineItemIds = str.ToString().Trim();
            if (LineItemIds.Equals(""))
            {
                LineItemIds = "N/A";
            }
        }
예제 #3
0
        public void AddLineItemID(int id)
        {
            if (LineItemIds.Equals("N/A"))
            {
                LineItemIds = "";
            }

            if (LineItemIds.Contains($"{id}"))
            {
                return;
            }

            StringBuilder str = new StringBuilder(LineItemIds);

            str.Append($"{id}, ");
            LineItemIds = str.ToString().Trim();
        }