Example #1
0
 public static void ItemStatuses()
 {
     q = ItemStatus.ListOnline("SELECT * FROM itemStatus WHERE companyID ='" + Helper.CompanyID + "' ");
     ProcessWindow._Form1.FeedBack("Downloading product status... " + q.Count);
     foreach (var h in q)
     {
         string Query = "DELETE from itemStatus WHERE id ='" + h.Id + "'";
         MySQL.Query(Query);
         ItemStatus p = new ItemStatus(h.Id, h.FollowID, h.Title, h.Status, h.Details, DateTime.Now.ToString("dd-MM-yyyy H:m:s"), "true", Helper.CompanyID);
         if (MySQL.Insert(p) != "")
         {
             ProcessWindow._Form1.FeedBack("Downloading ... " + h.Details.ToString());
             ItemReview u = new ItemReview(h.Id, h.FollowID, h.Title, h.Status, h.Details, DateTime.Now.ToString("dd-MM-yyyy H:m:s"), "true", Helper.CompanyID);
             DBConnect.UpdateMySql(u, h.Id);
             ProcessWindow._Form1.FeedBack("Updating .. " + h.Details.ToString());
         }
     }
     ProcessWindow._Form1.FeedBack("Downloading product status Complete");
 }