コード例 #1
0
ファイル: Billing.cs プロジェクト: ethan-hann/SurveyManager
 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
ファイル: Billing.cs プロジェクト: ethan-hann/SurveyManager
        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
ファイル: Billing.cs プロジェクト: ethan-hann/SurveyManager
        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();
        }