// GET: Corporate/Home public ActionResult Home() { Session.Remove("BranchId"); Session.Remove("Branch"); int companyId = Convert.ToInt32(Session["CompanyId"]); var branches = _iBranchManager.GetAllBranches(); ViewTotalOrder totalOrder = _iReportManager.GetTotalOrdersByCompanyIdAndYear(companyId, DateTime.Now.Year); var accountSummary = _iAccountsManager.GetAccountSummaryofCurrentMonthByCompanyId(companyId); var products = _iInventoryManager.GetStockProductByCompanyId(companyId); var orders = _iOrderManager.GetOrdersByCompanyId(companyId).ToList(); var topClients = _iReportManager.GetTopClientsByYear(DateTime.Now.Year).ToList(); var clients = _iClientManager.GetAllClientDetails(); var topProducts = _iReportManager.GetPopularBatteriesByYear(DateTime.Now.Year).ToList(); var employees = _iEmployeeManager.GetAllEmployeeWithFullInfo().ToList(); SummaryModel summary = new SummaryModel { Branches = branches.ToList(), CompanyId = companyId, TotalOrder = totalOrder, TopClients = topClients, Orders = orders, TopProducts = topProducts, Clients = clients, Employees = employees, Products = products, AccountSummary = accountSummary }; return(View(summary)); }
// GET: SCM/Home public ActionResult Home() { try { //Session.Remove("BranchId"); //Session.Remove("Branch"); int companyId = Convert.ToInt32(Session["CompanyId"]); var branches = _iBranchManager.GetAllBranches().ToList().FindAll(n => n.BranchId != 13).ToList(); foreach (ViewBranch branch in branches) { branch.Orders = _iOrderManager.GetOrdersByBranchId(branch.BranchId).ToList(); branch.Products = _iInventoryManager.GetStockProductByBranchAndCompanyId(branch.BranchId, companyId).ToList(); } var invoicedOrders = _iInvoiceManager.GetAllInvoicedOrdersByCompanyId(companyId).ToList(); // var todaysInvoceOrders= _iInvoiceManager.GetInvoicedOrdersByCompanyIdAndDate(companyId,DateTime.Now).ToList(); SummaryModel model = new SummaryModel { Branches = branches, InvoicedOrderList = invoicedOrders //OrderListByDate = todaysInvoceOrders }; return(View(model)); } catch (Exception exception) { Log.WriteErrorLog(exception); return(PartialView("_ErrorPartial", exception)); } }
public JsonResult BranchAutoComplete(string prefix) { var branchId = Convert.ToInt32(Session["BranchId"]); var branches = new List <ViewBranch>(); if (branchId != 0) { int corporateBarachIndex = _iBranchManager.GetAllBranches().ToList().FindIndex(n => n.BranchId == branchId); branches = _iBranchManager.GetAllBranches().ToList(); branches.RemoveAt(corporateBarachIndex); } else { branches = _iBranchManager.GetAllBranches().ToList(); } var branchList = (from c in branches.ToList() where c.BranchName.ToLower().Contains(prefix.ToLower()) select new { label = c.BranchName, val = c.BranchId }).ToList(); return(Json(branchList)); }
public ActionResult AssignRegionToBranch() { var branches = _iBranchManager.GetAllBranches(); ViewBag.AssignedRegions = _iBranchManager.GetAssignedRegionToBranchList(); return(View(branches)); }
public ActionResult Home() { Session.Remove("BranchId"); Session.Remove("Branch"); int companyId = Convert.ToInt32(Session["CompanyId"]); var branches = _iBranchManager.GetAllBranches(); ViewTotalOrder totalOrder = _iReportManager.GetTotalOrdersByCompanyIdAndYear(companyId, DateTime.Now.Year); var accountSummary = _iAccountsManager.GetAccountSummaryofCurrentMonthByCompanyId(companyId); var clients = _iReportManager.GetTopClients().ToList(); var batteries = _iReportManager.GetPopularBatteries().ToList(); SummaryModel summary = new SummaryModel { Branches = branches.ToList(), CompanyId = companyId, TotalOrder = totalOrder, Clients = clients, Products = batteries, AccountSummary = accountSummary }; var aModel = new MessageModel { PhoneNumber = "01841000307", CustomerName = "Abdus Salam", TotalQuantity = 1, Amount = 38000, TransactionDate = DateTime.Now, TransactionRef = "192022500" }; aModel.MessageBody = aModel.GetMessageForDistribution(); //var res = _iCommonManager.SendSms(aModel); return(View(summary)); }
// GET: Sales/Client/AddNewClient public ActionResult AddNewClient() { ViewBag.BranchId = new SelectList(_iBranchManager.GetAllBranches(), "BranchId", "BranchName"); ViewBag.RegionId = new SelectList(_iRegionManager.GetAll(), "RegionId", "RegionName"); ViewBag.ClientTypeId = new SelectList(_iCommonManager.GetAllClientType(), "ClientTypeId", "ClientTypeName"); ViewBag.DistrictId = new SelectList(_iDistrictManager.GetAll().ToList(), "DistrictId", "DistrictName"); ViewBag.UpazillaId = new SelectList(new List <Upazilla>(), "UpazillaId", "UpzillaName"); ViewBag.PostOfficeId = new SelectList(new List <PostOffice>(), "PostOfficeId", "PostOfficeName"); ViewBag.TerritoryId = new SelectList(new List <Territory>(), "TerritoryId", "TerritoryName"); return(View()); }
// GET: CommonArea/ShowInfo public PartialViewResult ViewBranch() { try { var branches = _iBranchManager.GetAllBranches().ToList(); return(PartialView("_ViewBranchPartialPage", branches)); } catch (Exception exception) { Log.WriteErrorLog(exception); return(PartialView("_ErrorPartial", exception)); } }
public ActionResult Approve(int id) { try { var order = _iOrderManager.GetOrderByOrderId(id); order.Client = _iClientManager.GetById(order.ClientId); ViewBag.DistributionPointId = new SelectList(_iBranchManager.GetAllBranches(), "BranchId", "BranchName", order.DistributionPointId); return(View(order)); } catch (Exception exception) { Log.WriteErrorLog(exception); return(PartialView("_ErrorPartial", exception)); } }
public JsonResult BranchAutoComplete(string prefix) { int corporateBarachIndex = _iBranchManager.GetAllBranches().ToList().FindIndex(n => n.BranchName.Contains("Corporate")); var branches = _iBranchManager.GetAllBranches().ToList(); branches.RemoveAt(corporateBarachIndex); var branchList = (from c in branches.ToList() where c.BranchName.ToLower().Contains(prefix.ToLower()) select new { label = c.BranchName, val = c.BranchId }).ToList(); return(Json(branchList)); }
// GET: Accounts/Home public ActionResult Home() { try { var companyId = Convert.ToInt32(Session["CompanyId"]); int branchId = Convert.ToInt32(Session["BranchId"]); var clients = _iReportManager.GetTopClients().ToList(); var batteries = _iReportManager.GetPopularBatteries().ToList(); ViewTotalOrder totalOrder = _iReportManager.GetTotalOrderByBranchIdCompanyIdAndYear(branchId, companyId, DateTime.Now.Year); var accountSummary = _iAccountsManager.GetAccountSummaryofCurrentMonthByBranchAndCompanyId(branchId, companyId); var branches = _iBranchManager.GetAllBranches(); SummaryModel aModel = new SummaryModel { Branches = branches.ToList(), BranchId = branchId, CompanyId = companyId, TotalOrder = totalOrder, AccountSummary = accountSummary, Clients = clients, Products = batteries }; return(View(aModel)); } catch (Exception exception) { Log.WriteErrorLog(exception); return(PartialView("_ErrorPartial", exception)); } }
// GET: Sales/Client/AddNewClient public ActionResult AddNewClient() { try { int branchId = Convert.ToInt32(Session["BranchId"]); ViewBag.BranchId = new SelectList(_iBranchManager.GetAllBranches(), "BranchId", "BranchName", branchId); ViewBag.RegionId = new SelectList(_iRegionManager.GetAll(), "RegionId", "RegionName"); ViewBag.ClientTypeId = new SelectList(_iCommonManager.GetAllClientType(), "ClientTypeId", "ClientTypeName"); ViewBag.DistrictId = new SelectList(_iDistrictManager.GetAll().ToList(), "DistrictId", "DistrictName"); ViewBag.UpazillaId = new SelectList(new List <Upazilla>(), "UpazillaId", "UpzillaName"); ViewBag.PostOfficeId = new SelectList(new List <PostOffice>(), "PostOfficeId", "PostOfficeName"); ViewBag.TerritoryId = new SelectList(new List <Territory>(), "TerritoryId", "TerritoryName"); return(View()); } catch (Exception exception) { Log.WriteErrorLog(exception); return(PartialView("_ErrorPartial", exception)); } }
// GET: Services/Replace public ActionResult Entry() { // CreateTempReplaceProductXmlFile(); try { //var user = (ViewUser)Session["user"]; //var replace = _iProductReplaceManager.GetAllReplaceList(2).ToList(); //foreach (var item in replace) //{ // var warrantyBatteryModel = new WarrantyBatteryModel // { // ReceiveDatetime = item.EntryDate, // ClientId = item.ClientId, // ReceiveByBranchId = item.BranchId, // EntryByUserId = item.UserId, // DelivaryRef = DateTime.Now.Year.ToString().Substring(2, 2) + "FAKE", // TransactionRef = item.ReplaceRef, // ReplaceRef = item.ReplaceRef, // ReportByEmployeeId = user.EmployeeId, // ReceiveRemarks = item.Remarks, // ProductId = item.ProductId, // IsManualEntry = "Y", // Status = 2, // ExpiryDate = item.ExpiryDate, // Barcode = "FAKE" + Guid.NewGuid().ToString().ToUpper().Substring(0, 9) // }; // var resultTest = _iServiceManager.ReceiveServiceProductTemp(warrantyBatteryModel); //} int branchId = Convert.ToInt32(Session["BranchId"]); ViewBag.DistributionPointId = new SelectList(_iBranchManager.GetAllBranches(), "BranchId", "BranchName", branchId); return(View()); } catch (Exception exception) { Log.WriteErrorLog(exception); return(PartialView("_ErrorPartial", exception)); } }
public ActionResult ViewRequisitionDetails(long id) { try { var requisiton = _iProductManager.GetTransferRequsitionByStatus(0).ToList().ToList() .Find(n => n.TransferRequisitionId == id); ICollection <TransferRequisitionDetails> requisitions = _iProductManager.GetTransferRequsitionDetailsById(id).ToList(); ViewTransferRequisition model = new ViewTransferRequisition { TtransferRequisitions = requisitions, Branch = _iBranchManager.GetAllBranches().ToList() .Find(n => n.BranchId == requisiton.RequisitionByBranchId), TransferRequisition = requisiton }; return(View(model)); } catch (Exception exception) { Log.WriteErrorLog(exception); return(PartialView("_ErrorPartial", exception)); } }
//---------------------Client Report---------// public ActionResult ClientReoprt() { try { ViewBag.BranchId = _iBranchManager.GetAllBranches(); return(View()); } catch (Exception exception) { Log.WriteErrorLog(exception); return(PartialView("_ErrorPartial", exception)); } }
public IActionResult GetAllBranchs() { var branches = BranchManager.GetAllBranches(); if (branches == null) { return(NotFound()); } else { return(Ok(branches)); } }
public ActionResult AddEmployee() { ViewBag.EmployeeTypeId = new SelectList(_iEmployeeTypeManager.GetAll(), "EmployeeTypeId", "EmployeeTypeName"); ViewBag.BranchId = new SelectList(_iBranchManager.GetAllBranches(), "BranchId", "BranchName"); ViewBag.DepartmentId = new SelectList(_iDepartmentManager.GetAll(), "DepartmentId", "DepartmentName"); ViewBag.DesignationId = new SelectList(_iDesignationManager.GetAll(), "DesignationId", "DesignationName"); return(View()); }
public ActionResult Home() { Session.Remove("BranchId"); Session.Remove("Branch"); int companyId = Convert.ToInt32(Session["CompanyId"]); var branches = _iBranchManager.GetAllBranches(); ViewTotalOrder totalOrder = _iReportManager.GetTotalOrdersByCompanyIdAndYear(companyId, DateTime.Now.Year); var accountSummary = _iAccountsManager.GetAccountSummaryofCurrentMonthByCompanyId(companyId); var clients = _iReportManager.GetTopClients().ToList(); var batteries = _iReportManager.GetPopularBatteries().ToList(); SummaryModel summary = new SummaryModel { Branches = branches.ToList(), CompanyId = companyId, TotalOrder = totalOrder, Clients = clients, Products = batteries, AccountSummary = accountSummary }; return(View(summary)); }
// GET: Editor/Home public ActionResult Home() { Session.Remove("BranchId"); Session.Remove("Branch"); SummaryModel model = new SummaryModel { Clients = _iClientManager.GetAllClientDetails().ToList(), Employees = _iEmployeeManager.GetAllEmployeeWithFullInfo(), Departments = _iDepartmentManager.GetAll(), Branches = _iBranchManager.GetAllBranches(), Regions = _iRegionManager.GetAll(), Territories = _iTerritoryManager.GetAll() }; return(View(model)); }
public ActionResult GeneralRequisitionDetails(long id) { try { ICollection <ApprovalDetails> approval = _iCommonManager.GetAllApprovalDetailsByRequistionId(id); var model = new ViewGeneralRequisitionModel { GeneralRequistionDetails = _iProductManager.GetGeneralRequisitionDetailsById(id), GeneralRequisitionModel = _iProductManager.GetGeneralRequisitionById(id), ApprovalDetails = approval }; ViewBag.DistributionPointId = new SelectList(_iBranchManager.GetAllBranches(), "BranchId", "BranchName", "--Select--"); return(View(model)); } catch (Exception e) { Log.WriteErrorLog(e); return(PartialView("_ErrorPartial", e)); } }
public ActionResult DeliveryTransferProduct(long id) { int branchId = Convert.ToInt32(Session["BranchId"]); int companyId = Convert.ToInt32(Session["CompanyId"]); var stock = _iInventoryManager.GetStockProductInBranchByBranchAndCompanyId(branchId, companyId); Session["Branch_stock1"] = stock; var requisiton = _iProductManager.GetTransferRequsitionByStatus(1).ToList().ToList() .Find(n => n.TransferRequisitionId == id); ICollection <TransferRequisitionDetails> requisitions = _iProductManager.GetTransferRequsitionDetailsById(id).ToList(); ViewTransferRequisition model = new ViewTransferRequisition { TtransferRequisitions = requisitions, Branch = _iBranchManager.GetAllBranches().ToList() .Find(n => n.BranchId == requisiton.RequisitionByBranchId), TransferRequisition = requisiton }; return(View(model)); }
// GET: Services/WarrantyBattery public ActionResult Receive() { try { var user = (ViewUser)Session["user"]; var actionModel = _iCommonManager.GetActionListModelByAreaControllerActionName("Services", "WarrantyBattery", "Receive"); var model = new WarrantyBatteryModel { PhysicalConditions = _iCommonManager.GetAllPhysicalConditions().ToList(), ServicingModels = _iCommonManager.GetAllServicingStatus().ToList(), ChargingStatus = _iCommonManager.GetAllCharginStatus().ToList(), ForwardToModels = _iCommonManager.GetAllForwardToModelsByUserAndActionId(user.UserId, actionModel.Id).ToList(), DistributionPoints = _iBranchManager.GetAllBranches().ToList() }; return(View(model)); } catch (Exception exception) { Log.WriteErrorLog(exception); return(PartialView("_ErrorPartial", exception)); } }
// GET: Corporate/Home public ActionResult Home() { try { int companyId = Convert.ToInt32(Session["CompanyId"]); var topClients = _iReportManager.GetTopClientsByYear(DateTime.Now.Year); var topProducts = _iReportManager.GetPopularBatteriesByYear(DateTime.Now.Year).ToList(); var totalProduction = _iReportManager.GetTotalProductionCompanyIdAndYear(companyId, DateTime.Now.Year); var totalDispatch = _iReportManager.GetTotalDispatchCompanyIdAndYear(companyId, DateTime.Now.Year); var torders = _iReportManager.GetTotalOrdersByYear(DateTime.Now.Year); var accountSummary = _iAccountsManager.GetAccountSummaryofCurrentMonthByCompanyId(companyId); var branches = _iBranchManager.GetAllBranches().ToList().FindAll(n => n.BranchId != 13).ToList(); foreach (ViewBranch branch in branches) { branch.Orders = _iOrderManager.GetOrdersByBranchId(branch.BranchId).ToList(); branch.Products = _iInventoryManager.GetStockProductByBranchAndCompanyId(branch.BranchId, companyId).ToList(); } var invoicedOrders = _iInvoiceManager.GetAllInvoicedOrdersByCompanyId(companyId).ToList(); // var todaysInvoceOrders= _iInvoiceManager.GetInvoicedOrdersByCompanyIdAndDate(companyId,DateTime.Now).ToList(); SummaryModel model = new SummaryModel { Branches = branches, InvoicedOrderList = invoicedOrders, Production = totalProduction, Dispatch = totalDispatch, TotalOrder = torders, AccountSummary = accountSummary, TopClients = topClients, TopProducts = topProducts //OrderListByDate = todaysInvoceOrders }; return(View(model)); } catch (Exception exception) { Log.WriteErrorLog(exception); return(PartialView("_ErrorPartial", exception)); } }
public ActionResult ViewBranch() { var branches = _iBranchManager.GetAllBranches().ToList(); return(View(branches)); }
public PartialViewResult ViewBranch() { var branches = _iBranchManager.GetAllBranches().ToList(); return(PartialView("_ViewBranchPartialPage", branches)); }