public IHttpActionResult Revise(int id, DTO.SaleOrderMng.SaleOrder dtoItem) { // authentication Module.Framework.BLL fwBll = new Module.Framework.BLL(); if (!fwBll.CanPerformAction(ControllerContext.GetAuthUserId(), moduleCode, Library.DTO.ModuleAction.CanReset)) { return(InternalServerError(new Exception(Properties.Resources.NOT_AUTHORIZED))); } BLL.SaleOrderMng bll = new BLL.SaleOrderMng(); Library.DTO.Notification notification; bll.Revise(id, ref dtoItem, ControllerContext.GetAuthUserId(), out notification); return(Ok(new Library.DTO.ReturnData <DTO.SaleOrderMng.SaleOrder>() { Data = dtoItem, Message = notification })); }
public IHttpActionResult Delete(int id) { // authentication Module.Framework.BLL fwBll = new Module.Framework.BLL(); if (!fwBll.CanPerformAction(ControllerContext.GetAuthUserId(), moduleCode, Library.DTO.ModuleAction.CanDelete)) { return(InternalServerError(new Exception(Properties.Resources.NOT_AUTHORIZED))); } Library.DTO.Notification notification; executor.DeleteData(id, ControllerContext.GetAuthUserId(), out notification); return(Ok(new Library.DTO.ReturnData <int>() { Data = id, Message = notification })); }
public IHttpActionResult Get(int id) { // authentication Module.Framework.BLL fwBll = new Module.Framework.BLL(); if (!fwBll.CanPerformAction(ControllerContext.GetAuthUserId(), moduleCode, Library.DTO.ModuleAction.CanRead)) { return(InternalServerError(new Exception(Properties.Resources.NOT_AUTHORIZED))); } BLL.FactoryPaymentMng bll = new BLL.FactoryPaymentMng(); Library.DTO.Notification notification; DTO.FactoryPaymentMng.EditData data = bll.GetData(id, ControllerContext.GetAuthUserId(), out notification); return(Ok(new Library.DTO.ReturnData <DTO.FactoryPaymentMng.EditData>() { Data = data, Message = notification })); }
public IHttpActionResult GetPrinOutHTML(int loadingPlanID) { //authentication Module.Framework.BLL fwBLL = new Module.Framework.BLL(); if (!fwBLL.CanPerformAction(ControllerContext.GetAuthUserId(), moduleCode, Library.DTO.ModuleAction.CanPrint)) { return(InternalServerError(new Exception(Properties.Resources.NOT_AUTHORIZED))); } Library.DTO.Notification notification = new Library.DTO.Notification(); BLL.LoadingPlanMng bll = new BLL.LoadingPlanMng(Helper.AuthHelper.GetCurrentUserFolder(ControllerContext)); object data = bll.GetReportHTML(loadingPlanID, out notification); return(Ok(new Library.DTO.ReturnData <object>() { Data = data, Message = notification })); }
public IHttpActionResult Gets(DTO.Search searchInput) { Module.Framework.BLL fwBll = new Module.Framework.BLL(); if (!fwBll.CanPerformAction(ControllerContext.GetAuthUserId(), moduleCode, Library.DTO.ModuleAction.CanRead)) { return(InternalServerError(new Exception(Properties.Resources.NOT_AUTHORIZED))); } BLL.ReportFreeToSaleOverview bll = new BLL.ReportFreeToSaleOverview(); Library.DTO.Notification notification; int totalRows = 0; DTO.ReportFreeToSale.SearchFormData data = bll.GetFreeToSaleSearch(ControllerContext.GetAuthUserId(), searchInput.Filters, searchInput.PageSize, searchInput.PageIndex, searchInput.SortedBy, searchInput.SortedDirection, out totalRows, out notification); return(Ok(new Library.DTO.ReturnData <DTO.ReportFreeToSale.SearchFormData>() { Data = data, Message = notification, TotalRows = totalRows })); }
public IHttpActionResult Get(int id, int modelID) { // authentication Module.Framework.BLL fwBll = new Module.Framework.BLL(); if (!fwBll.CanPerformAction(ControllerContext.GetAuthUserId(), moduleCode, Library.DTO.ModuleAction.CanRead)) { return(InternalServerError(new Exception(Properties.Resources.NOT_AUTHORIZED))); } BLL.ProductMng bll = new BLL.ProductMng(Helper.AuthHelper.GetCurrentUserFolder(ControllerContext)); Library.DTO.Notification notification; DTO.ProductMng.EditFormData data = bll.GetData(id, modelID, ControllerContext.GetAuthUserId(), out notification); return(Ok(new Library.DTO.ReturnData <DTO.ProductMng.EditFormData>() { Data = data, Message = notification, TotalRows = 0 })); }
public IHttpActionResult Gets(DTO.Search searchInput) { // authentication Module.Framework.BLL fwBll = new Module.Framework.BLL(); if (!fwBll.CanPerformAction(ControllerContext.GetAuthUserId(), moduleCode, Library.DTO.ModuleAction.CanRead)) { return(InternalServerError(new Exception(Properties.Resources.NOT_AUTHORIZED))); } Library.DTO.Notification notification; int totalRows = 0; Object data = executor.GetDataWithFilter(ControllerContext.GetAuthUserId(), searchInput.Filters, searchInput.PageSize, searchInput.PageIndex, searchInput.SortedBy, searchInput.SortedDirection, out totalRows, out notification); return(Ok(new Library.DTO.ReturnData <Object>() { Data = data, Message = notification, TotalRows = totalRows })); }
public IHttpActionResult Get(int id, Hashtable param) { // authentication if (!fwBll.CanPerformAction(ControllerContext.GetAuthUserId(), moduleCode, Library.DTO.ModuleAction.CanRead)) { return(InternalServerError(new Exception(Properties.Resources.NOT_AUTHORIZED))); } Library.DTO.Notification notification = new Library.DTO.Notification(); param["id"] = id; object data = executor.CustomFunction(ControllerContext.GetAuthUserId(), "GetData", param, out notification); return(Ok(new Library.DTO.ReturnData <object>() { Data = data, Message = notification })); }
public IHttpActionResult GetPurchasingQnt(int eCommercialInvoiceID) { // authentication Module.Framework.BLL fwBll = new Module.Framework.BLL(); if (!fwBll.CanPerformAction(ControllerContext.GetAuthUserId(), moduleCode, Library.DTO.ModuleAction.CanApprove)) { return(InternalServerError(new Exception(Properties.Resources.NOT_AUTHORIZED))); } BLL.ECommercialInvoiceMng bll = new BLL.ECommercialInvoiceMng(); Library.DTO.Notification notification; List <DTO.ECommercialInvoiceMng.ECommercialInvoicePurchasing> data = bll.GetPurchasingQnt(eCommercialInvoiceID, out notification); return(Ok(new Library.DTO.ReturnData <List <DTO.ECommercialInvoiceMng.ECommercialInvoicePurchasing> >() { Data = data, Message = notification })); }
public IHttpActionResult ExportExactOnlineSoftware(string ecommercialInvoiceIds) { Library.DTO.Notification notification; // authentication Module.Framework.BLL fwBll = new Module.Framework.BLL(); if (!fwBll.CanPerformAction(ControllerContext.GetAuthUserId(), moduleCode, Library.DTO.ModuleAction.CanPrint)) { return(InternalServerError(new Exception(Properties.Resources.NOT_AUTHORIZED))); } BLL.ECommercialInvoiceMng bll = new BLL.ECommercialInvoiceMng(); string reportFileName = bll.ExportExactOnlineSoftware(ecommercialInvoiceIds, out notification); return(Ok(new Library.DTO.ReturnData <string>() { Data = reportFileName, Message = notification })); }
public IHttpActionResult GetOverview(int id, int?typOfInvoice, int?internalCompanyID, int?clientID, int?parentID) { // authentication Module.Framework.BLL fwBll = new Module.Framework.BLL(); if (!fwBll.CanPerformAction(ControllerContext.GetAuthUserId(), moduleCode, Library.DTO.ModuleAction.CanRead)) { return(InternalServerError(new Exception(Properties.Resources.NOT_AUTHORIZED))); } BLL.ECommercialInvoiceMng bll = new BLL.ECommercialInvoiceMng(); Library.DTO.Notification notification; DTO.ECommercialInvoiceMng.DataOverview ECommercialInvoice = bll.GetDataOverview(id, typOfInvoice, internalCompanyID, clientID, parentID, ControllerContext.GetAuthUserId(), out notification); return(Ok(new Library.DTO.ReturnData <DTO.ECommercialInvoiceMng.DataOverview>() { Data = ECommercialInvoice, Message = notification })); }
public IHttpActionResult GetLoadingPlanSparepartDetails(int bookingID) { // authentication Module.Framework.BLL fwBll = new Module.Framework.BLL(); if (!fwBll.CanPerformAction(ControllerContext.GetAuthUserId(), moduleCode, Library.DTO.ModuleAction.CanRead)) { return(InternalServerError(new Exception(Properties.Resources.NOT_AUTHORIZED))); } BLL.PurchasingInvoiceMng bll = new BLL.PurchasingInvoiceMng(); Library.DTO.Notification notification; int totalRows = 0; IEnumerable <DTO.PurchasingInvoiceMng.LoadingPlanSparepartDetail> data = bll.GetLoadingPlanSparepartDetails(ControllerContext.GetAuthUserId(), bookingID, out totalRows, out notification); return(Ok(new Library.DTO.ReturnData <IEnumerable <DTO.PurchasingInvoiceMng.LoadingPlanSparepartDetail> >() { Data = data, Message = notification, TotalRows = totalRows })); }
public IHttpActionResult Gets() { // authentication Module.Framework.BLL fwBll = new Module.Framework.BLL(); if (!fwBll.CanPerformAction(ControllerContext.GetAuthUserId(), moduleCode, Library.DTO.ModuleAction.CanRead)) { return(InternalServerError(new Exception(Properties.Resources.NOT_AUTHORIZED))); } BLL.OrderQuantityCheckingRpt bll = new BLL.OrderQuantityCheckingRpt(); Library.DTO.Notification notification; List <DTO.OrderQuantityCheckingRpt.SaleOrder> data = bll.GetOrderQuantityCheckings(out notification); return(Ok(new Library.DTO.ReturnData <List <DTO.OrderQuantityCheckingRpt.SaleOrder> >() { Data = data, Message = notification })); }
public IHttpActionResult GetViewData(int id, int offerID) { // authentication Module.Framework.BLL fwBll = new Module.Framework.BLL(); if (!fwBll.CanPerformAction(ControllerContext.GetAuthUserId(), moduleCode, Library.DTO.ModuleAction.CanRead)) { return(InternalServerError(new Exception(Properties.Resources.NOT_AUTHORIZED))); } BLL.SaleOrderMng bll = new BLL.SaleOrderMng(); Library.DTO.Notification notification; DTO.SaleOrderMng.DataContainerOverview SaleOrder = bll.GetViewData(id, offerID, ControllerContext.GetAuthUserId(), out notification); return(Ok(new Library.DTO.ReturnData <DTO.SaleOrderMng.DataContainerOverview>() { Data = SaleOrder, Message = notification })); }
public IHttpActionResult GetBookings(DTO.Search searchInput) { // authentication Module.Framework.BLL fwBll = new Module.Framework.BLL(); if (!fwBll.CanPerformAction(ControllerContext.GetAuthUserId(), moduleCode, Library.DTO.ModuleAction.CanRead)) { return(InternalServerError(new Exception(Properties.Resources.NOT_AUTHORIZED))); } BLL.PurchasingInvoiceMng bll = new BLL.PurchasingInvoiceMng(); Library.DTO.Notification notification; int totalRows = 0; IEnumerable <DTO.PurchasingInvoiceMng.Booking> data = bll.GetBookings(ControllerContext.GetAuthUserId(), searchInput.Filters, searchInput.PageSize, searchInput.PageIndex, searchInput.SortedBy, searchInput.SortedDirection, out totalRows, out notification); return(Ok(new Library.DTO.ReturnData <IEnumerable <DTO.PurchasingInvoiceMng.Booking> >() { Data = data, Message = notification, TotalRows = totalRows })); }
public IHttpActionResult GetReportOutStanding(string season, int supplierID) { // authentication Module.Framework.BLL fwBll = new Module.Framework.BLL(); if (!fwBll.CanPerformAction(ControllerContext.GetAuthUserId(), moduleCode, Library.DTO.ModuleAction.CanPrint)) { return(InternalServerError(new Exception(Properties.Resources.NOT_AUTHORIZED))); } BLL.FactoryPaymentMng bll = new BLL.FactoryPaymentMng(); Library.DTO.Notification notification; string reportname = bll.GetReportOutStanding(season, supplierID, out notification); return(Ok(new Library.DTO.ReturnData <string>() { Data = reportname, Message = notification })); }
public IHttpActionResult GetModelDefaultoptionByPreviousSeason(int id, string season) { //authencation Module.Framework.BLL fwBll = new Module.Framework.BLL(); if (!fwBll.CanPerformAction(ControllerContext.GetAuthUserId(), moduleCode, Library.DTO.ModuleAction.CanUpdate)) { return(InternalServerError(new Exception(Properties.Resources.NOT_AUTHORIZED))); } BLL.ModelMng bll = new BLL.ModelMng(Helper.AuthHelper.GetCurrentUserFolder(ControllerContext)); Library.DTO.Notification notification; List <DTO.ModelMng.ModelDefaultOptionDTO> data = bll.GetDefaultOptionByPreviousSeason(ControllerContext.GetAuthUserId(), id, season, out notification); return(Ok(new Library.DTO.ReturnData <List <DTO.ModelMng.ModelDefaultOptionDTO> >() { Data = data, Message = notification })); }
public IHttpActionResult ExportExcelClientComplaintItem(int clientComplaintItemID) { Module.Framework.BLL fwBll = new Module.Framework.BLL(); if (!fwBll.CanPerformAction(ControllerContext.GetAuthUserId(), moduleCode, Library.DTO.ModuleAction.CanRead)) { return(InternalServerError(new Exception(Properties.Resources.NOT_AUTHORIZED))); } BLL.FactoryOrderMng bll = new BLL.FactoryOrderMng(); Library.DTO.Notification notification; var dataFileName = bll.ExportExcelClientComplaintItem(ControllerContext.GetAuthUserId(), clientComplaintItemID, out notification); return(Ok(new ReturnData <string>() { Data = dataFileName.ToString(), Message = notification })); }
public IHttpActionResult GetReportData(string season, int saleID) { Library.DTO.Notification notification; // authentication Module.Framework.BLL fwBll = new Module.Framework.BLL(); if (!fwBll.CanPerformAction(ControllerContext.GetAuthUserId(), moduleCode, Library.DTO.ModuleAction.CanPrint)) { return(InternalServerError(new Exception(Properties.Resources.NOT_AUTHORIZED))); } BLL.ReportSalePerCountry bll = new BLL.ReportSalePerCountry(); string reportFileName = bll.GetReportData(season, saleID, ControllerContext.GetAuthUserId(), out notification); return(Ok(new Library.DTO.ReturnData <string>() { Data = reportFileName, Message = notification })); }
public IHttpActionResult QuickSearchProduct(DTO.Search searchInput) { // authentication Module.Framework.BLL fwBll = new Module.Framework.BLL(); if (!fwBll.CanPerformAction(ControllerContext.GetAuthUserId(), moduleCode, Library.DTO.ModuleAction.CanCreate)) { return(InternalServerError(new Exception(Properties.Resources.NOT_AUTHORIZED))); } BLL.WarehouseTransportMng bll = new BLL.WarehouseTransportMng(); Library.DTO.Notification notification; int totalRows = 0; IEnumerable <DTO.WarehouseTransportMng.PhysicalStock> searchResult = bll.QuickSearchProduct(ControllerContext.GetAuthUserId(), searchInput.Filters, searchInput.PageSize, searchInput.PageIndex, searchInput.SortedBy, searchInput.SortedDirection, out totalRows, out notification); return(Ok(new Library.DTO.ReturnData <IEnumerable <DTO.WarehouseTransportMng.PhysicalStock> >() { Data = searchResult, Message = notification, TotalRows = totalRows })); }
public IHttpActionResult SaveLDSClient(int saleOrderID, string ldsDate, string remark) { // authentication Module.Framework.BLL fwBll = new Module.Framework.BLL(); if (!fwBll.CanPerformAction(ControllerContext.GetAuthUserId(), moduleCode, Library.DTO.ModuleAction.CanUpdate)) { return(InternalServerError(new Exception(Properties.Resources.NOT_AUTHORIZED))); } BLL.SaleOrderMng bll = new BLL.SaleOrderMng(); Library.DTO.Notification notification; bll.SaveLDSClient(saleOrderID, ldsDate, remark, ControllerContext.GetAuthUserId(), out notification); return(Ok(new Library.DTO.ReturnData <int>() { Data = saleOrderID, Message = notification })); }
public IHttpActionResult GetOfferLineSample(int offerId, string orderType, string searchSample) { // authentication Module.Framework.BLL fwBll = new Module.Framework.BLL(); if (!fwBll.CanPerformAction(ControllerContext.GetAuthUserId(), moduleCode, Library.DTO.ModuleAction.CanRead)) { return(InternalServerError(new Exception(Properties.Resources.NOT_AUTHORIZED))); } BLL.SaleOrderMng bll = new BLL.SaleOrderMng(); Library.DTO.Notification notification; List <DTO.SaleOrderMng.SaleOrderDetailSample> data = bll.GetOfferLineSample(offerId, orderType, searchSample, out notification); return(Ok(new Library.DTO.ReturnData <List <DTO.SaleOrderMng.SaleOrderDetailSample> >() { Data = data, Message = notification })); }
public IHttpActionResult MultiDelete(List <int> ids) { // authentication Module.Framework.BLL fwBll = new Module.Framework.BLL(); if (!fwBll.CanPerformAction(ControllerContext.GetAuthUserId(), moduleCode, Library.DTO.ModuleAction.CanDelete)) { return(InternalServerError(new Exception(Properties.Resources.NOT_AUTHORIZED))); } BLL.FactoryOrderMng bll = new BLL.FactoryOrderMng(); Library.DTO.Notification notification; IEnumerable <int> factoryOrderIDSuccess = bll.MultiDelete(ids, ControllerContext.GetAuthUserId(), out notification); return(Ok(new Library.DTO.ReturnData <IEnumerable <int> >() { Data = factoryOrderIDSuccess, Message = notification })); }
public IHttpActionResult GetAdminDashboardData() { // authentication Module.Framework.BLL fwBll = new Module.Framework.BLL(); if (!fwBll.CanPerformAction(ControllerContext.GetAuthUserId(), moduleCode, Library.DTO.ModuleAction.CanRead)) { return(InternalServerError(new Exception(Properties.Resources.NOT_AUTHORIZED))); } Library.DTO.Notification notification = new Library.DTO.Notification(); BLL.ModelMng bll = new BLL.ModelMng(Helper.AuthHelper.GetCurrentUserFolder(ControllerContext)); object data = bll.GetModelNoFactory(ControllerContext.GetAuthUserId(), out notification); return(Ok(new Library.DTO.ReturnData <object>() { Data = data, Message = notification })); }
public IHttpActionResult GetClientComplaintData(int ClientComplaintID) { // authentication Module.Framework.BLL fwBll = new Module.Framework.BLL(); if (!fwBll.CanPerformAction(ControllerContext.GetAuthUserId(), moduleCode, Library.DTO.ModuleAction.CanRead)) { return(InternalServerError(new Exception(Properties.Resources.NOT_AUTHORIZED))); } BLL.FactoryOrderMng bll = new BLL.FactoryOrderMng(); Library.DTO.Notification notification; var data = bll.GetClientComplaintData(ClientComplaintID, out notification); return(Ok(new ReturnData <object>() { Data = data, Message = notification })); }
public IHttpActionResult GetReport(string season) { // authentication if (!fwBll.CanPerformAction(ControllerContext.GetAuthUserId(), moduleCode, Library.DTO.ModuleAction.CanRead)) { return(InternalServerError(new Exception(Properties.Resources.NOT_AUTHORIZED))); } Library.DTO.Notification notification = new Library.DTO.Notification(); System.Collections.Hashtable inputs = new System.Collections.Hashtable(); inputs["Season"] = season; Object data = executor.CustomFunction(ControllerContext.GetAuthUserId(), "getreportdata", inputs, out notification); return(Ok(new Library.DTO.ReturnData <Object>() { Data = data, Message = notification })); }
public IHttpActionResult Get(int id, int purchasingInvoiceID) { // authentication Module.Framework.BLL fwBll = new Module.Framework.BLL(); if (!fwBll.CanPerformAction(ControllerContext.GetAuthUserId(), moduleCode, Library.DTO.ModuleAction.CanRead)) { return(InternalServerError(new Exception(Properties.Resources.NOT_AUTHORIZED))); } BLL.PackingListMng bll = new BLL.PackingListMng(); Library.DTO.Notification notification; DTO.PackingListMng.DataContainer PackingList = bll.GetDataContainer(id, purchasingInvoiceID, ControllerContext.GetAuthUserId(), out notification); return(Ok(new Library.DTO.ReturnData <DTO.PackingListMng.DataContainer>() { Data = PackingList, Message = notification })); }
public IHttpActionResult CreateWexCSVFile(int warehouseImportID) { Library.DTO.Notification notification; // authentication Module.Framework.BLL fwBll = new Module.Framework.BLL(); if (!fwBll.CanPerformAction(ControllerContext.GetAuthUserId(), getModuleCode(), Library.DTO.ModuleAction.CanPrint)) { return(InternalServerError(new Exception(Properties.Resources.NOT_AUTHORIZED))); } BLL.WarehouseImportMng bll = new BLL.WarehouseImportMng(); string data = bll.CreateWexCSVFile(ControllerContext.GetAuthUserId(), warehouseImportID, out notification); return(Ok(new Library.DTO.ReturnData <string>() { Data = data, Message = notification })); }
public IHttpActionResult GetExcelReportData(int clientId) { // authentication if (!fwBll.CanPerformAction(ControllerContext.GetAuthUserId(), moduleCode, Library.DTO.ModuleAction.CanRead)) { return(InternalServerError(new Exception(Properties.Resources.NOT_AUTHORIZED))); } Library.DTO.Notification notification = new Library.DTO.Notification(); System.Collections.Hashtable inputs = new System.Collections.Hashtable(); inputs["ClientID"] = clientId; string dataFileName = executor.CustomFunction(ControllerContext.GetAuthUserId(), "getexcelreport", inputs, out notification).ToString(); return(Ok(new Library.DTO.ReturnData <string>() { Data = dataFileName, Message = notification })); }
public IHttpActionResult getOfferMarginDetail(int id, string season, int status, int clientID) { // authentication Module.Framework.BLL fwBll = new Module.Framework.BLL(); if (!fwBll.CanPerformAction(ControllerContext.GetAuthUserId(), moduleCode, Library.DTO.ModuleAction.CanRead)) { return(InternalServerError(new Exception(Properties.Resources.NOT_AUTHORIZED))); } BLL.ClientMng bll = new BLL.ClientMng(); Library.DTO.Notification notification; List <DTO.ClientMng.Overview.Offer.OfferMarginDetailDTO> data = bll.GetOfferMarginDetail(id, season, status, clientID, ControllerContext.GetAuthUserId(), out notification); return(Ok(new Library.DTO.ReturnData <List <DTO.ClientMng.Overview.Offer.OfferMarginDetailDTO> >() { Data = data, Message = notification })); }