public void SortRetQuentity(int order)
 {
     if (order == 0)
     {
         List <ReturnVoucher> spr = new List <ReturnVoucher>();
         for (int i = 0; i < ShowingReport.Count; i++)
         {
             spr.Add(ShowingReport[i]);
         }
         spr = spr.OrderByDescending(o => o.quentity).ToList();
         ShowingReport.Clear();
         for (int i = 0; i < spr.Count; i++)
         {
             ShowingReport.Add(spr[i]);
         }
         rq = 1;
     }
     else if (order == 1)
     {
         List <ReturnVoucher> spr = new List <ReturnVoucher>();
         for (int i = 0; i < ShowingReport.Count; i++)
         {
             spr.Add(ShowingReport[i]);
         }
         spr = spr.OrderBy(o => o.quentity).ToList();
         ShowingReport.Clear();
         for (int i = 0; i < spr.Count; i++)
         {
             ShowingReport.Add(spr[i]);
         }
         rq = 0;
     }
 }
 public void SortContructorName(int itemorder)
 {
     if (itemorder == 0)
     {
         List <ReturnVoucher> spr = new List <ReturnVoucher>();
         for (int i = 0; i < ShowingReport.Count; i++)
         {
             spr.Add(ShowingReport[i]);
         }
         spr.Sort((x, y) => string.Compare(x.contructor, y.contructor));
         ShowingReport.Clear();
         for (int i = 0; i < spr.Count; i++)
         {
             ShowingReport.Add(spr[i]);
         }
         con = 1;
     }
     else if (itemorder == 1)
     {
         List <ReturnVoucher> spr = new List <ReturnVoucher>();
         for (int i = 0; i < ShowingReport.Count; i++)
         {
             spr.Add(ShowingReport[i]);
         }
         spr.Sort((y, x) => string.Compare(x.contructor, y.contructor));
         ShowingReport.Clear();
         for (int i = 0; i < spr.Count; i++)
         {
             ShowingReport.Add(spr[i]);
         }
         con = 0;
     }
 }
 public void SortItemName(int itemorder)
 {
     if (itemorder == 0)
     {
         List <IssueVoucher> spr = new List <IssueVoucher>();
         for (int i = 0; i < ShowingReport.Count; i++)
         {
             spr.Add(ShowingReport[i]);
         }
         spr.Sort((x, y) => string.Compare(x.itemNumber, y.itemNumber));
         ShowingReport.Clear();
         for (int i = 0; i < spr.Count; i++)
         {
             ShowingReport.Add(spr[i]);
         }
         itemOrder = 1;
     }
     else if (itemorder == 1)
     {
         List <IssueVoucher> spr = new List <IssueVoucher>();
         for (int i = 0; i < ShowingReport.Count; i++)
         {
             spr.Add(ShowingReport[i]);
         }
         spr.Sort((y, x) => string.Compare(x.itemNumber, y.itemNumber));
         ShowingReport.Clear();
         for (int i = 0; i < spr.Count; i++)
         {
             ShowingReport.Add(spr[i]);
         }
         itemOrder = 0;
     }
 }
 public void SortSL(int order)
 {
     if (order == 0)
     {
         List <IssueVoucher> spr = new List <IssueVoucher>();
         for (int i = 0; i < ShowingReport.Count; i++)
         {
             spr.Add(ShowingReport[i]);
         }
         spr = spr.OrderByDescending(o => o.SL).ToList();
         ShowingReport.Clear();
         for (int i = 0; i < spr.Count; i++)
         {
             ShowingReport.Add(spr[i]);
         }
         slOrder = 1;
     }
     else if (order == 1)
     {
         List <IssueVoucher> spr = new List <IssueVoucher>();
         for (int i = 0; i < ShowingReport.Count; i++)
         {
             spr.Add(ShowingReport[i]);
         }
         spr = spr.OrderBy(o => o.SL).ToList();
         ShowingReport.Clear();
         for (int i = 0; i < spr.Count; i++)
         {
             ShowingReport.Add(spr[i]);
         }
         slOrder = 0;
     }
 }
 public void SortRcvQuentity(int order)
 {
     if (order == 0)
     {
         List <PeriodicRecieptReportModel> spr = new List <PeriodicRecieptReportModel>();
         for (int i = 0; i < ShowingReport.Count; i++)
         {
             spr.Add(ShowingReport[i]);
         }
         spr = spr.OrderByDescending(o => o.RCVQuantity).ToList();
         ShowingReport.Clear();
         for (int i = 0; i < spr.Count; i++)
         {
             ShowingReport.Add(spr[i]);
         }
         rcvOrder = 1;
     }
     else if (order == 1)
     {
         List <PeriodicRecieptReportModel> spr = new List <PeriodicRecieptReportModel>();
         for (int i = 0; i < ShowingReport.Count; i++)
         {
             spr.Add(ShowingReport[i]);
         }
         spr = spr.OrderBy(o => o.RCVQuantity).ToList();
         ShowingReport.Clear();
         for (int i = 0; i < spr.Count; i++)
         {
             ShowingReport.Add(spr[i]);
         }
         rcvOrder = 0;
     }
 }
Exemple #6
0
 public void SortTotQuentity(int order)
 {
     if (order == 0)
     {
         List <WOWisePeriodicIssueStatementModel> wos = new List <WOWisePeriodicIssueStatementModel>();
         for (int i = 0; i < ShowingReport.Count; i++)
         {
             wos.Add(ShowingReport[i]);
         }
         wos = wos.OrderByDescending(o => o.netIssueQnty).ToList();
         ShowingReport.Clear();
         for (int i = 0; i < wos.Count; i++)
         {
             ShowingReport.Add(wos[i]);
         }
         netIss = 1;
     }
     else if (order == 1)
     {
         List <WOWisePeriodicIssueStatementModel> wos = new List <WOWisePeriodicIssueStatementModel>();
         for (int i = 0; i < ShowingReport.Count; i++)
         {
             wos.Add(ShowingReport[i]);
         }
         wos = wos.OrderBy(o => o.netIssueQnty).ToList();
         ShowingReport.Clear();
         for (int i = 0; i < wos.Count; i++)
         {
             ShowingReport.Add(wos[i]);
         }
         netIss = 0;
     }
 }
Exemple #7
0
 public void SortStQuentity(int order)
 {
     if (order == 0)
     {
         List <StockData> spr = new List <StockData>();
         for (int i = 0; i < ShowingReport.Count; i++)
         {
             spr.Add(ShowingReport[i]);
         }
         spr = spr.OrderByDescending(o => o.currentBalance).ToList();
         ShowingReport.Clear();
         for (int i = 0; i < spr.Count; i++)
         {
             ShowingReport.Add(spr[i]);
         }
         iqOrder = 1;
     }
     else if (order == 1)
     {
         List <StockData> spr = new List <StockData>();
         for (int i = 0; i < ShowingReport.Count; i++)
         {
             spr.Add(ShowingReport[i]);
         }
         spr = spr.OrderBy(o => o.currentBalance).ToList();
         ShowingReport.Clear();
         for (int i = 0; i < spr.Count; i++)
         {
             ShowingReport.Add(spr[i]);
         }
         iqOrder = 0;
     }
 }