示例#1
0
        public IHttpActionResult Gets(DTO.Search searchInput)
        {
            Library.DTO.Notification notification;

            // authentication
            Module.Framework.BLL fwBll = new Module.Framework.BLL();
            if (!fwBll.CanPerformAction(ControllerContext.GetAuthUserId(), moduleCode, Library.DTO.ModuleAction.CanRead))
            {
                notification         = new Library.DTO.Notification();
                notification.Type    = Library.DTO.NotificationType.Error;
                notification.Message = Properties.Resources.NOT_AUTHORIZED;
                return(Ok(new Library.DTO.ReturnData <DTO.UserGroupMng.SearchFormData>()
                {
                    Data = null, Message = notification, TotalRows = 0
                }));
            }

            BLL.UserGroupMng bll = new BLL.UserGroupMng();
            int totalRows        = 0;

            DTO.UserGroupMng.SearchFormData data = bll.GetDataWithFilter(ControllerContext.GetAuthUserId(), searchInput.Filters, searchInput.PageSize, searchInput.PageIndex, searchInput.SortedBy, searchInput.SortedDirection, out totalRows, out notification);
            return(Ok(new Library.DTO.ReturnData <DTO.UserGroupMng.SearchFormData>()
            {
                Data = data, Message = notification, TotalRows = totalRows
            }));
        }
示例#2
0
        public IHttpActionResult GetExcelReportData(DTO.Search searchInput)
        {
            // authentication
            if (!fwBll.CanPerformAction(ControllerContext.GetAuthUserId(), moduleCode, Library.DTO.ModuleAction.CanRead))
            {
                return(InternalServerError(new Exception(Properties.Resources.NOT_AUTHORIZED)));
            }

            executor.identifier = Helper.AuthHelper.GetCurrentUserFolder(ControllerContext);
            Library.DTO.Notification     notification;
            System.Collections.Hashtable inputs = new System.Collections.Hashtable();

            inputs["SortedBy"]          = searchInput.SortedBy;
            inputs["SortedDirection"]   = searchInput.SortedDirection;
            inputs["Season"]            = searchInput.Filters["Season"];
            inputs["SaleID"]            = searchInput.Filters["SaleID"];
            inputs["ProformaInvoiceNo"] = searchInput.Filters["ProformaInvoiceNo"];
            inputs["ClientUD"]          = searchInput.Filters["ClientUD"];
            inputs["FactoryUD"]         = searchInput.Filters["FactoryUD"];
            inputs["ApprovedName"]      = searchInput.Filters["ApprovedName"];

            string dataFileName = executor.CustomFunction(ControllerContext.GetAuthUserId(), "getexcelreport", inputs, out notification).ToString();

            return(Ok(new Library.DTO.ReturnData <string>()
            {
                Data = dataFileName, Message = notification
            }));
        }
示例#3
0
        public IHttpActionResult GetFilterClientcontact(DTO.Search searchInput)
        {
            object data = executor.CustomFunction(ControllerContext.GetAuthUserId(), "GetFilterClientcontact", searchInput.Filters, out Library.DTO.Notification notification);

            return(Ok(new Library.DTO.ReturnData <object> {
                Data = data, Message = notification
            }));
        }
        public IHttpActionResult ExportCashBook(DTO.Search searchInput)
        {
            object rptFile = executor.CustomFunction(ControllerContext.GetAuthUserId(), "ExportCashBook", searchInput.Filters, out Library.DTO.Notification notification);

            return(Ok(new Library.DTO.ReturnData <object> {
                Data = rptFile, Message = notification
            }));
        }
示例#5
0
        public IHttpActionResult GetItemDeltaNeedAttention(DTO.Search searchInput)
        {
            object data = executor.CustomFunction(ControllerContext.GetAuthUserId(), "get-item-delta-need-attention", searchInput.Filters, out Library.DTO.Notification notification);

            return(Ok(new Library.DTO.ReturnData <Object>()
            {
                Data = data, Message = notification, TotalRows = 0
            }));
        }
示例#6
0
        public IHttpActionResult GetSearchFilterData(DTO.Search input)
        {
            object data = this.executor.GetDataWithFilter(this.ControllerContext.GetAuthUserId(), input.Filters, input.PageSize, input.PageIndex, input.SortedBy, input.SortedDirection, out int totalRows, out Library.DTO.Notification notification);

            return(Ok(new Library.DTO.ReturnData <object>()
            {
                Data = data, Message = notification, TotalRows = totalRows
            }));
        }
        public IHttpActionResult GetDataForPopupWithFilters(DTO.Search filters)
        {
            object data = executor.CustomFunction(ControllerContext.GetAuthUserId(), "getdeliverynotelist", filters.Filters, out Library.DTO.Notification notification);

            return(Ok(new Library.DTO.ReturnData <object>()
            {
                Data = data, Message = notification
            }));
        }
 public static Domain.Model.Search ConvertToModel(this DTO.Search dto)
 {
     return(new Domain.Model.Search()
     {
         Id = dto.Id,
         SiteId = dto.SiteId,
         Url = dto.Url
     });
 }
示例#9
0
        public IHttpActionResult ExportToExcel(DTO.Search searchInput)
        {
            Library.DTO.Notification notification;
            object data = executor.CustomFunction(ControllerContext.GetAuthUserId(), "exporttoexcel", searchInput.Filters, out notification);

            return(Ok(new Library.DTO.ReturnData <object>()
            {
                Data = data, Message = notification
            }));
        }
        public IHttpActionResult Gets(DTO.Search searchInput)
        {
            searchInput.Filters.Add("userId", ControllerContext.GetAuthUserId());
            var data = executor.GetDataWithFilter(ControllerContext.GetAuthUserId(), searchInput.Filters, searchInput.PageSize, searchInput.PageIndex, searchInput.SortedBy, searchInput.SortedDirection, out int totalRows, out Notification notification);

            return(Ok(new ReturnData <Object>()
            {
                Data = data, Message = notification, TotalRows = totalRows
            }));
        }
示例#11
0
        public IHttpActionResult GetFactoryOrderDetail(DTO.Search searchInput)
        {
            Library.DTO.Notification notification = new Library.DTO.Notification();
            object data = executor.CustomFunction(ControllerContext.GetAuthUserId(), "GetFactoryOrderDetail", searchInput.Filters, out notification);

            return(Ok(new Library.DTO.ReturnData <object>()
            {
                Data = data, Message = notification
            }));
        }
        public IHttpActionResult ExportExcelClient(DTO.Search searchInput)
        {
            Library.DTO.Notification notification;
            BLL.ClientMng            bll = new BLL.ClientMng();
            string dataFileName          = bll.ExportExcelClient(ControllerContext.GetAuthUserId(), searchInput.Filters, out notification);

            return(Ok(new Library.DTO.ReturnData <string>()
            {
                Data = dataFileName, Message = notification
            }));
        }
示例#13
0
        public IHttpActionResult GetBillTransport(DTO.Search searchInput)
        {
            Library.DTO.Notification  notification;
            BLL.ECommercialInvoiceMng bll = new BLL.ECommercialInvoiceMng();
            object data = bll.GetBillTransport(searchInput.Filters, out notification);

            return(Ok(new Library.DTO.ReturnData <object>()
            {
                Data = data, Message = notification
            }));
        }
示例#14
0
        public IHttpActionResult QuickSearchShowroomAreaByPhysicalQnt(DTO.Search searchInput)
        {
            BLL.Support bll = new BLL.Support();
            Library.DTO.Notification notification;
            IEnumerable <DTO.Support.ShowroomAreaByPhysicalQnt> data = bll.QuickSearchShowroomAreaByPhysicalQnt(searchInput.Filters, out notification);

            return(Ok(new Library.DTO.ReturnData <IEnumerable <DTO.Support.ShowroomAreaByPhysicalQnt> >()
            {
                Data = data, Message = notification, TotalRows = data.Count()
            }));
        }
示例#15
0
        public IHttpActionResult QuickSearchRemainSparepart(DTO.Search searchInput)
        {
            BLL.WarehousePickingListMng bll = new BLL.WarehousePickingListMng();
            Library.DTO.Notification    notification;
            int totalRows = 0;
            List <DTO.WarehousePickingListMng.RemainSparepart> data = bll.QuickSearchRemainSparepart(ControllerContext.GetAuthUserId(), searchInput.Filters, searchInput.PageSize, searchInput.PageIndex, searchInput.SortedBy, searchInput.SortedDirection, out totalRows, out notification);

            return(Ok(new Library.DTO.ReturnData <List <DTO.WarehousePickingListMng.RemainSparepart> >()
            {
                Data = data, Message = notification, TotalRows = totalRows
            }));
        }
示例#16
0
        public IHttpActionResult QuickSearchOrderItem(DTO.Search searchInput)
        {
            BLL.FactoryProformaInvoiceMng bll = new BLL.FactoryProformaInvoiceMng(Helper.AuthHelper.GetCurrentUserFolder(ControllerContext));
            Library.DTO.Notification      notification;
            int totalRows = 0;
            IEnumerable <DTO.FactoryProformaInvoiceMng.FactoryOrderItemSearchResult> data = bll.QuickSearchItem(searchInput.Filters, searchInput.PageSize, searchInput.PageIndex, searchInput.SortedBy, searchInput.SortedDirection, out totalRows, out notification);

            return(Ok(new Library.DTO.ReturnData <IEnumerable <DTO.FactoryProformaInvoiceMng.FactoryOrderItemSearchResult> >()
            {
                Data = data, Message = notification, TotalRows = totalRows
            }));
        }
示例#17
0
        public IHttpActionResult ExportExcelModel(DTO.Search searchInput)
        {
            Library.DTO.Notification notification;
            BLL.ModelMng             bll = new BLL.ModelMng(Helper.AuthHelper.GetCurrentUserFolder(ControllerContext));
            string dataFileName          = bll.ExportExcelModel(searchInput.Filters, out notification);

            //string dataFileName = string.Empty;
            return(Ok(new Library.DTO.ReturnData <string>()
            {
                Data = dataFileName, Message = notification
            }));
        }
示例#18
0
        public IHttpActionResult GetClient(DTO.Search searchInput)
        {
            BLL.ECommercialInvoiceMng bll = new BLL.ECommercialInvoiceMng();
            Library.DTO.Notification  notification;
            int totalRows = 0;
            IEnumerable <DTO.ECommercialInvoiceMng.Client> data = bll.GetClient(ControllerContext.GetAuthUserId(), searchInput.Filters, searchInput.PageSize, searchInput.PageIndex, searchInput.SortedBy, searchInput.SortedDirection, out totalRows, out notification);

            return(Ok(new Library.DTO.ReturnData <IEnumerable <DTO.ECommercialInvoiceMng.Client> >()
            {
                Data = data, Message = notification, TotalRows = totalRows
            }));
        }
        public IHttpActionResult ExportExcel(DTO.Search searchInput)
        {
            Library.DTO.Notification   notification;
            BLL.ShippingInstructionMng bll = new BLL.ShippingInstructionMng();
            string dataFileName            = bll.ExportExcel(searchInput.Filters, out notification);

            //string dataFileName = string.Empty;
            return(Ok(new Library.DTO.ReturnData <string>()
            {
                Data = dataFileName, Message = notification
            }));
        }
示例#20
0
        public IHttpActionResult QuickSearchWarehouseItem(DTO.Search searchInput)
        {
            BLL.Support bll = new BLL.Support();
            Library.DTO.Notification notification;
            int totalRows = 0;
            IEnumerable <DTO.Support.WarehouseItem> data = bll.QuickSearchWarehouseItem(searchInput.Filters, searchInput.PageSize, searchInput.PageIndex, searchInput.SortedBy, searchInput.SortedDirection, out totalRows, out notification);

            return(Ok(new Library.DTO.ReturnData <IEnumerable <DTO.Support.WarehouseItem> >()
            {
                Data = data, Message = notification, TotalRows = totalRows
            }));
        }
示例#21
0
        public IHttpActionResult GetProductionItemToDeliveryFromTeamToTeamToAmend(DTO.Search searchInput)
        {
            //get support instant
            Library.Base.IExecutor executor = Library.Helper.GetDynamicObject("Module.Support.Executor, Module.Support");
            //get data
            Library.DTO.Notification notification = new Library.DTO.Notification();
            object data = executor.CustomFunction(ControllerContext.GetAuthUserId(), "GetProductionItemToDeliveryFromTeamToTeamToAmend", searchInput.Filters, out notification);

            return(Ok(new Library.DTO.ReturnData <object>()
            {
                Data = data, Message = notification
            }));
        }
        public IHttpActionResult GetDataWithFilter(DTO.Search searchInput)
        {
            if (!fwBLL.CanPerformAction(ControllerContext.GetAuthUserId(), moduleCode, Library.DTO.ModuleAction.CanRead))
            {
                return(InternalServerError(new Exception(Properties.Resources.NOT_AUTHORIZED)));
            }

            object data = executor.GetDataWithFilter(ControllerContext.GetAuthUserId(), searchInput.Filters, searchInput.PageSize, searchInput.PageIndex, searchInput.SortedBy, searchInput.SortedDirection, out int totalRows, out Library.DTO.Notification notification);

            return(Ok(new Library.DTO.ReturnData <object> {
                Data = data, TotalRows = totalRows, Message = notification
            }));
        }
        public IHttpActionResult getProductionItemTypeCost(DTO.Search searchInput)
        {
            //get support instant
            Library.Base.IExecutor executor = Library.Helper.GetDynamicObject("Module.WorkOrderCostMng.Executor, Module.WorkOrderCostMng");
            //get data
            Library.DTO.Notification notification = new Library.DTO.Notification();
            object data = executor.CustomFunction(ControllerContext.GetAuthUserId(), "getProductionItemTypeCost", searchInput.Filters, out notification);

            return(Ok(new Library.DTO.ReturnData <object>()
            {
                Data = data, Message = notification
            }));
        }
        public IHttpActionResult QuickSearchSampleProduct(DTO.Search searchInput)
        {
            Module.Framework.BLL     fwBll = new Module.Framework.BLL();
            BLL.ShowroomItemMng      bll   = new BLL.ShowroomItemMng();
            Library.DTO.Notification notification;
            int totalRows = 0;
            List <DTO.ShowroomItemMng.SampleProduct> data = bll.QuickSearchSampleProduct(ControllerContext.GetAuthUserId(), searchInput.Filters, searchInput.PageSize, searchInput.PageIndex, searchInput.SortedBy, searchInput.SortedDirection, out totalRows, out notification);

            return(Ok(new Library.DTO.ReturnData <List <DTO.ShowroomItemMng.SampleProduct> >()
            {
                Data = data, Message = notification, TotalRows = totalRows
            }));
        }
示例#25
0
        public IHttpActionResult GetSearchSupport(DTO.Search searchInput)
        {
            BLL.WarehouseImportMng   bll = new BLL.WarehouseImportMng();
            Library.DTO.Notification notification;
            int totalRows = 0;

            DTO.WarehouseImportMng.SearchFormData data = bll.GetSearchSupport(out notification);

            return(Ok(new Library.DTO.ReturnData <DTO.WarehouseImportMng.SearchFormData>()
            {
                Data = data, Message = notification, TotalRows = totalRows
            }));
        }
        public IHttpActionResult GetDropDownContainer(DTO.Search searchInput)
        {
            var filters = searchInput.Filters;

            Notification notification;

            var data = _executor.CustomFunction(ControllerContext.GetAuthUserId(), "getdropdowncontainer", filters, out notification);

            return(Ok(new ReturnData <object>()
            {
                Data = data, Message = notification
            }));
        }
        public IHttpActionResult ExportOutsourceReport(DTO.Search searchInput)
        {
            if (!fwBll.CanPerformAction(ControllerContext.GetAuthUserId(), moduleCode, Library.DTO.ModuleAction.CanRead))
            {
                return(InternalServerError(new Exception(Properties.Resources.NOT_AUTHORIZED)));
            }
            object data = executor.CustomFunction(ControllerContext.GetAuthUserId(), "ExportOutsourceReport", searchInput.Filters, out Library.DTO.Notification notification);

            return(Ok(new Library.DTO.ReturnData <object>()
            {
                Data = data, Message = notification
            }));
        }
        public IHttpActionResult GetSearchDefaultPrice(DTO.Search inputSearch)
        {
            if (!fwBLL.CanPerformAction(ControllerContext.GetAuthUserId(), ModuleCode, ModuleAction.CanRead))
            {
                return(InternalServerError(new Exception(Properties.Resources.NOT_AUTHORIZED)));
            }

            object data = executor.CustomFunction(ControllerContext.GetAuthUserId(), "PreparingDefaultPriceData", inputSearch.Filters, out Notification notification);

            return(Ok(new ReturnData <object>()
            {
                Data = data, Message = notification
            }));
        }
示例#29
0
        public IHttpActionResult GetUserFilter(DTO.Search filters)
        {
            if (!fwBll.CanPerformAction(ControllerContext.GetAuthUserId(), moduleCode, Library.DTO.ModuleAction.CanUpdate))
            {
                return(InternalServerError(new Exception(Properties.Resources.NOT_AUTHORIZED)));
            }

            object data = executor.CustomFunction(ControllerContext.GetAuthUserId(), "getuserfilter", filters.Filters, out Notification notification);

            return(Ok(new Library.DTO.ReturnData <object>()
            {
                Data = data, Message = notification
            }));
        }
        public IHttpActionResult GetAllSupportWithSeason(DTO.Search searchInput)
        {
            //Notification notification = null;

            //if (!bll.CanPerformAction(ControllerContext.GetAuthUserId(), moduleCode, ModuleAction.CanRead))
            //    return InternalServerError(new Exception(Properties.Resources.NOT_AUTHORIZED));

            //SetModuleIdentifier(executor);

            //int totalRows = 0;
            //var data = executor.GetDataWithFilter(ControllerContext.GetAuthUserId(), searchInput.Filters, searchInput.PageSize, searchInput.PageIndex, searchInput.SortedBy, searchInput.SortedDirection, out totalRows, out notification);

            return(Ok(/*new ReturnData<object>() { Data = data, Message = notification, TotalRows = totalRows }*/));
        }