예제 #1
0
 protected void RefreshGrid(bool rebind, bool notpaid)
 {
     if (asn != null)
     {
         RadGrid1.DataSource = asn.AnestheticTickets;
         // call updateTotal in caller
         RadAjaxManager1.ResponseScripts.Add("parent.updateTotal()");
     }
     else if (sn != null)
     {
         RadGrid1.DataSource = sn.Tickets;
         // call updateTotal in caller
         RadAjaxManager1.ResponseScripts.Add("parent.updateTotal()");
     }
     else
     {
         if (pat == null && cus == null)
         {
             RadGrid1.DataSource = CntAriCli.GetTickets(notpaid, ctx).OrderByDescending(x => x.TicketDate);
         }
         else
         {
             if (pat != null)
             {
                 RadGrid1.DataSource = CntAriCli.GeTickets(notpaid, cus, ctx).OrderByDescending(x => x.TicketDate);
             }
             if (cus != null)
             {
                 RadGrid1.DataSource = CntAriCli.GetTicketsNotInvoiced(cus, ctx).OrderByDescending(x => x.TicketDate);
             }
         }
     }
     if (rebind)
     {
         RadGrid1.Rebind();
     }
 }