public void FillRunningOrdersGrid(GridView gv, bool display)
 {
     if (!string.IsNullOrEmpty(Show_ID))
     {
         Guid? show_Final_Class_ID = null;
         if (!string.IsNullOrEmpty(Show_Final_Class_ID) && Show_Final_Class_ID != new Guid().ToString())
         {
             show_Final_Class_ID = new Guid(Show_Final_Class_ID);
         }
         Guid show_ID = new Guid(Show_ID);
         List<Guid> showList = new List<Guid>();
         showList.Add(show_ID);
         LinkedShows ls = new LinkedShows();
         List<LinkedShows> lsList = ls.GetLinked_ShowsByParent_ID(show_ID);
         if (lsList != null && lsList.Count > 0)
         {
             foreach (LinkedShows linkedShow in lsList)
             {
                 showList.Add(linkedShow.Child_Show_ID);
             }
         }
         RunningOrders.SetDay1Show_ID(showList);
         List<OwnersDogsClassesDrawn> oDCDList = OwnersDogsClassesDrawn.GetOwnersDogsClassesDrawnListData(show_ID, show_Final_Class_ID, display);
         if (display)
         {
             gv.DataSource = oDCDList;
             gv.DataBind();
         }
         else
         {
             OwnersDogsClassesDrawnList = oDCDList;
         }
     }
 }
Exemple #2
0
 public static void ClearRunningOrders(string show_ID, Guid user_ID)
 {
     Guid newShow_ID = new Guid(show_ID);
     List<Guid> showList = new List<Guid>();
     showList.Add(newShow_ID);
     LinkedShows ls = new LinkedShows();
     List<LinkedShows> lsList = ls.GetLinked_ShowsByParent_ID(newShow_ID);
     if (lsList != null && lsList.Count > 0)
     {
         foreach (LinkedShows linkedShow in lsList)
         {
             showList.Add(linkedShow.Child_Show_ID);
         }
     }
     List<OwnersDogsClassesDrawn> oDCDList = new List<OwnersDogsClassesDrawn>();
     oDCDList = OwnersDogsClassesDrawn.GetOwnersDogsClassesDrawnListData(newShow_ID, null, true);
     if (oDCDList != null && oDCDList.Count > 0)
     {
         SetClassesAndDrawQty(newShow_ID);
         foreach (ClassesAndDrawQty classRow in ClassesAndDrawQtyList)
         {
             foreach (OwnersDogsClassesDrawn row in oDCDList)
             {
                 if (row.Show_Final_Class_ID == classRow.Show_Final_Class_ID)
                 {
                     SetRunningOrderNull(row, user_ID);
                 }
             }
         }
     }
     foreach (Guid s_ID in showList)
     {
         Shows show = new Shows(s_ID);
         show.Running_Orders_Allocated = false;
         show.Update_Show(s_ID, user_ID);
     }
 }
Exemple #3
0
 public static void AllocateRunningOrders(string show_ID, Guid user_ID)
 {
     Guid newShow_ID = new Guid(show_ID);
     List<Guid> showList = new List<Guid>();
     showList.Add(newShow_ID);
     LinkedShows ls = new LinkedShows();
     List<LinkedShows> lsList = ls.GetLinked_ShowsByParent_ID(newShow_ID);
     if (lsList != null && lsList.Count > 0)
     {
         foreach (LinkedShows linkedShow in lsList)
         {
             showList.Add(linkedShow.Child_Show_ID);
         }
     }
     SetDay1Show_ID(showList);
     if (OwnersDogsClassesDrawn.DeleteOwnersDogsClassesDrawnList())
     {
         foreach (Guid s_ID in showList)
         {
             OwnersDrawn = null;
             DogsDrawn = null;
             Shows show = new Shows(s_ID);
             if (!(bool)show.Running_Orders_Allocated)
             {
                 AllEntriesInClass = OwnersDogsClassesDrawn.GetOwnersDogsClassesDrawnListData(s_ID, null, false);
                 AllocateRunningOrdersStage1(s_ID, user_ID);
                 AllocateRunningOrdersStage2(s_ID, user_ID);
                 AllocateRunningOrdersStage3(s_ID, user_ID);
                 show.Running_Orders_Allocated = true;
                 show.Update_Show(s_ID, user_ID);
             }
         }
     }
 }