public static IList <BO_SubscriptoinPayment> LoadSubscriptionPaymentVoucher(JQueryDataTableParamModel Param) { List <BO_SubscriptoinPayment> lst_SubscriptionPaymentVoucherTable = new List <BO_SubscriptoinPayment>(); using (AprosysAccountingEntities db_aa = new AprosysAccountingEntities()) { BO_SubscriptoinPayment obj; var lst = db_aa.GetSubscriptionVoucherList("", Param.Start_Date, Param.End_Date); foreach (var item in lst.ToList()) { obj = new BO_SubscriptoinPayment(); obj.invoiceNo = item.InvoiceNo; obj.activityDate = item.ActivityTimestamp; obj.customerName = item.Customer; obj.paidAmount = item.Amount; // obj.sort = item.sort??0; obj.totalDues = item.Amount;//Farooq lst_SubscriptionPaymentVoucherTable.Add(obj); } } if (Param.SearchType != 0) { } // List<BO_ReceiptVoucherTable> ListtoReturn = new List<BO_ReceiptVoucherTable>(); // ListtoReturn = lst_receiptVoucherTable; return(lst_SubscriptionPaymentVoucherTable); }
public static IList <BO_ReceiptVoucherTable> LoadReceiptVoucher(JQueryDataTableParamModel Param) { List <BO_ReceiptVoucherTable> lst_receiptVoucherTable = new List <BO_ReceiptVoucherTable>(); //Param.Start_Date = Param.Start_Date.AddHours(-12); Param.End_Date = Param.End_Date.AddDays(1); using (AprosysAccountingEntities db_aa = new AprosysAccountingEntities()) { BO_ReceiptVoucherTable obj; if (Param.Searchcheckbox) { var lst = db_aa.GetSubscriptionVoucherList("", Param.Start_Date, Param.End_Date); foreach (var item in lst.ToList()) { obj = new BO_ReceiptVoucherTable(); obj.invoiceNo = item.InvoiceNo; obj.activityDate = item.ActivityTimestamp; obj.customerName = item.Customer; obj.amount = item.Amount; lst_receiptVoucherTable.Add(obj); } } else { var lst = db_aa.GetReceiptVoucherList("", 1, Param.Start_Date, Param.End_Date); foreach (var item in lst.ToList()) { obj = new BO_ReceiptVoucherTable(); obj.invoiceNo = item.InvoiceNo; obj.activityDate = item.ActivityTimestamp; obj.customerName = item.Customer; obj.amount = item.Amount; lst_receiptVoucherTable.Add(obj); } } } if (Param.SearchType != 0) { } // List<BO_ReceiptVoucherTable> ListtoReturn = new List<BO_ReceiptVoucherTable>(); // ListtoReturn = lst_receiptVoucherTable; return(lst_receiptVoucherTable.OrderByDescending(x => (Convert.ToInt32(x.invoiceNo.Remove(0, 4)))).ToList()); }