コード例 #1
0
        public IHttpActionResult GetDataWithIDs(DTO.Search searchInput)
        {
            if (!bLL.CanPerformAction(ControllerContext.GetAuthUserId(), moduleCode, ModuleAction.CanRead))
            {
                return(InternalServerError(new Exception(Properties.Resources.NOT_AUTHORIZED)));
            }

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

            return(Ok(new ReturnData <object> {
                Data = data, Message = notification
            }));
        }
コード例 #2
0
        public IHttpActionResult Get(int id)
        {
            if (!fwBLL.CanPerformAction(ControllerContext.GetAuthUserId(), moduleCode, ModuleAction.CanRead))
            {
                return(InternalServerError(new Exception(Properties.Resources.NOT_AUTHORIZED)));
            }

            Hashtable filters = new Hashtable();

            filters["id"] = id;

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

            return(Ok(new ReturnData <object>()
            {
                Data = data, Message = notification
            }));
        }
コード例 #3
0
        public IHttpActionResult PostComment(object dtoItem)
        {
            Notification notification;

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

            Hashtable input = new Hashtable();

            input["data"] = dtoItem;

            object data = iExecutor.CustomFunction(ControllerContext.GetAuthUserId(), "PostComment", input, out notification);

            return(Ok(new ReturnData <object>()
            {
                Data = data, Message = notification
            }));
        }
コード例 #4
0
        public IHttpActionResult UpdatePostCostData(object dtoItem)
        {
            Hashtable input = new Hashtable
            {
                ["data"] = dtoItem
            };

            object data = executor.CustomFunction(ControllerContext.GetAuthUserId(), "UpdatePostCostData", input, out Library.DTO.Notification notification);

            return(Ok(new Library.DTO.ReturnData <object> {
                Data = data, Message = notification
            }));
        }
コード例 #5
0
        public IHttpActionResult ExportCostInvoice2(string season)
        {
            if (!framework.CanPerformAction(ControllerContext.GetAuthUserId(), ModuleCode, Library.DTO.ModuleAction.CanRead))
            {
                return(InternalServerError(new Exception(Properties.Resources.NOT_AUTHORIZED)));
            }

            System.Collections.Hashtable filters = new System.Collections.Hashtable();
            filters["Season"] = season;
            //filters["endDate"] = endDate;

            object data = executor.CustomFunction(ControllerContext.GetAuthUserId(), "exportcostinvoice2", filters, out Library.DTO.Notification notification);

            return(Ok(new Library.DTO.ReturnData <object> {
                Data = data, Message = notification
            }));
        }
コード例 #6
0
        public IHttpActionResult ExportInventoryReport(int factoryWarehouseID, int productionTeamID, string startDate, string endDate)
        {
            if (!fwBLL.CanPerformAction(ControllerContext.GetAuthUserId(), moduleCode, Library.DTO.ModuleAction.CanRead))
            {
                return(InternalServerError(new Exception(Properties.Resources.NOT_AUTHORIZED)));
            }

            System.Collections.Hashtable filters = new System.Collections.Hashtable();
            filters["factoryWarehouseID"] = factoryWarehouseID;
            filters["productionTeamID"]   = productionTeamID;
            filters["startDate"]          = startDate;
            filters["endDate"]            = endDate;

            object data = executor.CustomFunction(ControllerContext.GetAuthUserId(), "exportinventoryreport", filters, out Library.DTO.Notification notification);

            return(Ok(new Library.DTO.ReturnData <object> {
                Data = data, Message = notification
            }));
        }