コード例 #1
0
ファイル: Tailoring.cs プロジェクト: amitdumka/eStore
        public XLWorkbook ToExcel(AprajitaRetailsDbContext db, string path)
        {
            XSheet xs = new XSheet(path, "Tailoring");

            xs.AddSheet <TalioringBooking>("Bookings", db.TalioringBookings.OrderBy(c => c.BookingDate));
            xs.AddSheet <TalioringDelivery>("Deliveries", db.TailoringDeliveries.OrderBy(c => c.DeliveryDate));
            return(xs.WB);
        }
コード例 #2
0
        public XLWorkbook ToExcel(AprajitaRetailsDbContext db, string path)
        {
            XSheet XS = new XSheet(path, "Stores");

            XS.AddSheet <Store>("Stores", db.Stores.OrderBy(c => c.City));
            XS.AddSheet <EndOfDay>("EndOfDays", db.EndOfDays.OrderBy(c => c.EOD_Date));
            XS.AddSheet <Shared.Models.Stores.Customer>("Customers", db.Customers.OrderBy(c => c.FirstName));
            XS.AddSheet <Contact>("Contacts", db.Contact.OrderBy(c => c.FirstName));
            XS.AddSheet <CashDetail>("CashDetails", db.CashDetail.OrderBy(c => c.OnDate));

            return(XS.WB);
        }
コード例 #3
0
        public async System.Threading.Tasks.Task <XLWorkbook> ToExcelAsync(AprajitaRetailsDbContext db, string path)
        {
            XSheet XS = new XSheet(path, "Stores");

            XS.AddSheet <Store>("Stores", await db.Stores.OrderBy(c => c.City).ToListAsync());
            XS.AddSheet <EndOfDay>("EndOfDays", db.EndOfDays.OrderBy(c => c.EOD_Date));
            XS.AddSheet <Shared.Models.Stores.Customer>("Customers", db.Customers.OrderBy(c => c.FirstName));
            XS.AddSheet <Contact>("Contacts", db.Contact.OrderBy(c => c.FirstName));
            XS.AddSheet <CashDetail>("CashDetails", db.CashDetail.OrderBy(c => c.OnDate));

            return(XS.WB);
        }
コード例 #4
0
ファイル: Payroll.cs プロジェクト: amitdumka/eStore
        public XLWorkbook ToExcel(AprajitaRetailsDbContext db, string path)
        {
            XSheet xs       = new XSheet(path, "PayRoll");
            var    empList1 = db.Employees.OrderBy(c => c.EmployeeId);

            xs.AddSheet <Employee>("Employees", empList1);
            var empList = empList1.ToList();

            var CSList = db.CurrentSalaries.OrderBy(c => c.EmployeeId).ThenBy(c => c.EffectiveDate);

            if (CSList != null)
            {
                xs.AddSheet <CurrentSalary>("CurrentSalaries", CSList);//, $"CurrSal_{emp.StaffName}", "CurrentSalary_" + emp.StaffName, info);
            }
            var PSList = db.PaySlips.OrderBy(c => c.EmployeeId).ThenBy(c => c.OnDate);

            if (PSList != null)
            {
                xs.AddSheet <PaySlip>("PaySlip", PSList);//, $"PS_{emp.StaffName}", "PaySlip" + emp.StaffName, info);
            }
            var AdvPayList = db.StaffAdvancePayments.OrderBy(c => c.PaymentDate);

            if (AdvPayList != null)
            {
                xs.AddSheet <StaffAdvancePayment>("StaffAdvancePayments", AdvPayList);//, $"AdvPay_{emp.StaffName}", "AdvancePay_" + emp.StaffName, info);
            }
            var AdvList = db.StaffAdvanceReceipts.OrderBy(c => c.ReceiptDate);

            if (AdvList != null && AdvList.Count() > 0)
            {
                xs.AddSheet <StaffAdvanceReceipt>("StaffAdvanceReceipts", AdvList);//, $"Adv_{emp.StaffName}", "Advance_" + emp.StaffName, info);
            }
            foreach (var emp in empList)
            {
                SortedList <string, string> info = new SortedList <string, string>();
                info.Add("EmployeeId", emp.EmployeeId.ToString());
                info.Add("EmployeeName", emp.StaffName);

                var attList = db.Attendances.Where(c => c.EmployeeId == emp.EmployeeId).OrderBy(c => c.AttDate);
                if (attList != null)
                {
                    xs.AddSheet <Attendance>("Attendance", attList, $"Att_{emp.StaffName}", "Attendance_" + emp.StaffName, info);
                }

                var SalList = db.SalaryPayments.Where(c => c.EmployeeId == emp.EmployeeId).OrderBy(c => c.PaymentDate);
                if (SalList != null)
                {
                    xs.AddSheet <SalaryPayment>("SalaryPayments", SalList, $"Sal_{emp.StaffName}", "Salary_" + emp.StaffName, info);
                }
            }
            return(xs.WB);
        }
コード例 #5
0
        public XLWorkbook ToExcel(AprajitaRetailsDbContext db, string path)
        {
            XSheet xs = new XSheet(path, "Daily Sales");

            xs.AddSheet <DailySale>("DailySales", db.DailySales.OrderBy(c => c.SaleDate));
            xs.AddSheet <DueRecoverd>("DueRecovereds", db.DueRecoverds.OrderBy(c => c.PaidDate));
            xs.AddSheet <DuesList>("DueLists", db.DuesLists.OrderBy(c => c.DailySaleId));

            xs.AddSheet <EDCTranscation>("CardTranscations", db.CardTranscations.OrderBy(c => c.OnDate));
            xs.AddSheet <EDC>("CardMachine", db.CardMachine.OrderBy(c => c.EDCId));
            xs.AddSheet <Salesman>("Salesmans", db.Salesmen.OrderBy(c => c.SalesmanId));
            return(xs.WB);
        }
コード例 #6
0
ファイル: Banking.cs プロジェクト: amitdumka/eStore
        public XLWorkbook ToExcel(AprajitaRetailsDbContext db, string path)
        {
            XSheet xs = new XSheet(path, "Banking");

            xs.AddSheet <BankAccountInfo>("BankAccountInfo", db.BankAccountInfos.OrderBy(c => c.BankAccountInfoId));
            xs.AddSheet <BankDeposit>("BankDeposits", db.BankDeposits.OrderBy(c => c.DepoDate));
            xs.AddSheet <BankWithdrawal>("BankWithdrawal", db.BankWithdrawals.OrderBy(c => c.DepoDate));
            xs.AddSheet <AccountNumber>("AccountNumber", db.AccountNumbers.OrderBy(c => c.AccountNumberId));
            xs.AddSheet <ChequesLog>("ChequeLogs", db.ChequesLogs.OrderBy(c => c.ChequesDate));
            xs.AddSheet <Bank>("Bank", db.Banks.OrderBy(c => c.BankId));

            return(xs.WB);
        }
コード例 #7
0
        public XLWorkbook ToExcel(AprajitaRetailsDbContext db, string path)
        {
            XSheet xs = new XSheet(path, "Purchase");

            xs.AddSheet("Brand" /*Expenses*/, db.Brands.OrderBy(c => c.BrandId));
            xs.AddSheet("Category" /*Payments*/, db.Categories.OrderBy(c => c.CategoryId));
            xs.AddSheet("ProductItem" /*Receipts*/, db.ProductItems.OrderBy(c => c.Barcode));
            xs.AddSheet("Supplier" /*CashReceipts*/, db.Suppliers.OrderBy(c => c.SuppilerName));
            xs.AddSheet("Stock" /*CashPayments*/, db.Stocks.OrderBy(c => c.ProductItemId));
            xs.AddSheet("PurchaseItem" /*PettyCashExpenses*/, db.PurchaseItems.OrderBy(c => c.PurchaseItemId));
            xs.AddSheet("PurchaseTaxType" /*ArvindPayments*/, db.PurchaseTaxTypes.OrderBy(c => c.PurchaseTaxTypeId));

            return(xs.WB);
        }
コード例 #8
0
        public XLWorkbook ToExcel(AprajitaRetailsDbContext db, string path)
        {
            XSheet xs = new XSheet(path, "Imports");

            xs.AddSheet("ImportInWards", db.ImportInWards.OrderBy(c => c.InvoiceDate));
            xs.AddSheet("ImportPurchases", db.ImportPurchases.OrderBy(c => c.InvoiceDate));
            xs.AddSheet("ImportSaleItemWises", db.ImportSaleItemWises.OrderBy(c => c.InvoiceDate));
            xs.AddSheet("ImportSaleRegisters", db.ImportSaleRegisters.OrderBy(c => c.InvoiceDate));
            xs.AddSheet("ImportBookEntries", db.ImportBookEntries.OrderBy(c => c.OnDate));
            xs.AddSheet("BankStatements", db.BankStatements.OrderBy(c => c.OnDateTranscation).ThenBy(c => c.OnDateValue));
            xs.AddSheet("ImportSearches", db.ImportSearches.OrderBy(c => c.OnDate));

            return(xs.WB);
        }
コード例 #9
0
ファイル: Expenses.cs プロジェクト: amitdumka/eStore
        public XLWorkbook ToExcel(AprajitaRetailsDbContext db, string path)
        {
            XSheet xs = new XSheet(path, "Expenses");

            xs.AddSheet <Expense>("Expenses", db.Expenses.OrderBy(c => c.ExpDate));
            xs.AddSheet <Payment>("Payments", db.Payments.OrderBy(c => c.PayDate));
            xs.AddSheet <Receipt>("Receipts", db.Receipts.OrderBy(c => c.RecieptDate));
            xs.AddSheet <CashReceipt>("CashReceipts", db.CashReceipts.OrderBy(c => c.InwardDate));
            xs.AddSheet <CashPayment>("CashPayments", db.CashPayments.OrderBy(c => c.PaymentDate));
            xs.AddSheet <PettyCashExpense>("PettyCashExpenses", db.PettyCashExpenses.OrderBy(c => c.ExpDate));
            xs.AddSheet <ArvindPayment>("ArvindPayments", db.ArvindPayments.OrderBy(c => c.OnDate));
            //Rent
            xs.AddSheet <Rent>("Rent", db.Rents.OrderBy(c => c.OnDate));
            xs.AddSheet <RentedLocation>("RentedLocation", db.RentedLocations.OrderBy(c => c.RentedLocationId));
            //Electricity
            xs.AddSheet <ElectricityConnection>("ElectricityConnection", db.ElectricityConnections.OrderBy(c => c.ConusumerId));
            xs.AddSheet <EletricityBill>("EletricityBill", db.EletricityBills.OrderBy(c => c.BillDate));
            xs.AddSheet <EBillPayment>("BillPayments", db.BillPayments.OrderBy(c => c.PaymentDate));
            return(xs.WB);
        }