Exemplo n.º 1
0
        /// <summary>
        /// 作用:主要针对袁洋  查询公司未登记编号的项目 (公司未登记项目查询)
        /// </summary>
        /// <param name="name"></param>
        /// <param name="town"></param>
        /// <param name="year"></param>
        /// <param name="cityName"></param>
        /// <param name="fid"></param>
        /// <param name="order"></param>
        /// <param name="page"></param>
        /// <param name="rows"></param>
        /// <returns></returns>
        public ActionResult Manager(
            string name = null, string town        = null, string number    = null,
            int?year    = null, string cityName    = null, string groupName = null,
            int?fid     = null, ProjectOrder order = ProjectOrder.SerialDescending, int?chargeId = null,
            int page    = 1, int rows              = 20)
        {
            var parameter = new ProjectParameter
            {
                Name          = name,
                Town          = town,
                Year          = year,
                CityName      = cityName,
                GroupName     = groupName,
                FID           = fid,
                Order         = order,
                ChargeID      = chargeId,
                IsRecord      = false,
                Number        = number,
                NumberIsNull  = true,
                FlowDataState = FlowwDataState.Done,
                Page          = new PageParameter(page, rows)
            };

            SearchBase(parameter);
            ViewBag.Group   = Core.UserGroupManager.Get();
            ViewBag.Charges = Core.UserManager.GetAllUsers();
            return(View());
        }
Exemplo n.º 2
0
        /// <summary>
        /// 作用:高级查询   当前公司所有项目(登记编号已登记)
        /// </summary>
        /// <param name="name"></param>
        /// <param name="town"></param>
        /// <param name="year"></param>
        /// <param name="cityName"></param>
        /// <param name="fid"></param>
        /// <param name="groupName"></param>
        /// <param name="order"></param>
        /// <param name="chargeId"></param>
        /// <param name="page"></param>
        /// <param name="rows"></param>
        /// <returns></returns>
        // GET: Project/Home
        public ActionResult Index(
            string name        = null, string town     = null,
            int?year           = null, string cityName = null, string number    = null,
            int?fid            = null, int?seid        = null, string groupName = null,
            ProjectOrder order = ProjectOrder.SerialDescending, int?chargeId = null,
            int page           = 1, int rows = 20
            )
        {
            var parameter = new ProjectParameter
            {
                Name         = name,
                Town         = town,
                Year         = year,
                CityName     = cityName,
                GroupName    = groupName,
                FID          = fid,
                SEID         = seid,
                Order        = order,
                ChargeID     = chargeId,
                IsRecord     = true,
                Number       = number,
                NumberIsNull = false
                               //Page = new PageParameter(page, rows)
            };
            var stringkey = Identity.UserID + ParameterManager.ParameterKey;

            SessionHelper.SetSession(stringkey, parameter);
            parameter.Page = new PageParameter(page, rows);
            SearchBase(parameter);
            ViewBag.Group   = Core.UserGroupManager.Get();
            ViewBag.Charges = Core.ProjectUserManager.GetChargeList(groupName);
            //var manager = Core.UserGroupManager.GetManager(Identity.UserID);
            //ViewBag.Manager = manager;
            return(View());
        }
Exemplo n.º 3
0
        public ActionResult ChargeSearch(
            string name = null, string town        = null,
            int?year    = null, string cityName    = null,
            int?fid     = null, ProjectOrder order = ProjectOrder.ID,
            int page    = 1, int rows              = 20)
        {
            var parameter = new ProjectParameter
            {
                Name     = name,
                Town     = town,
                Year     = year,
                CityName = cityName,
                FID      = fid,
                Order    = order,
                ChargeID = Identity.UserID,
                IsRecord = true,
                // Page = new PageParameter(page, rows)
            };
            var stringkey = Identity.UserID + ParameterManager.ParameterKey;

            SessionHelper.SetSession(stringkey, parameter);
            parameter.Page = new PageParameter(page, rows);
            SearchBase(parameter);
            return(View());
        }
Exemplo n.º 4
0
        public ActionResult DeleteConfirmed(int id)
        {
            ProjectOrder projectOrder = db.ProjectOrders.Find(id);

            db.ProjectOrders.Remove(projectOrder);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemplo n.º 5
0
        public ActionResult Create([Bind(Include = "OrderId,OrderStatus,TotalPrice,DeliveryDateTime,UserId,PizzaID")] ProjectOrder projectOrder)
        {
            if (ModelState.IsValid)
            {
                db.ProjectOrders.Add(projectOrder);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.PizzaID = new SelectList(db.ProjectPizzas, "PizzaID", "PName", projectOrder.PizzaID);
            ViewBag.UserId  = new SelectList(db.ProjectUsers, "UserId", "FName", projectOrder.UserId);
            return(View(projectOrder));
        }
Exemplo n.º 6
0
        //public ActionResult Search(string SearchBy, int? search)
        //{
        //    if (SearchBy == "PizzaId")
        //    {
        //        var model = db.ProjectOrders.Where(emp => emp.OrderId == search || search == null).ToList();
        //        View(model);
        //    }
        //    else
        //    {
        //        var model = db.ProjectOrders.Where(emp => emp.PizzaID == search || search == null).ToList();
        //        View(model);
        //    }
        //    return View();
        //}

        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ProjectOrder projectOrder = db.ProjectOrders.Find(id);

            if (projectOrder == null)
            {
                return(HttpNotFound());
            }
            return(View(projectOrder));
        }
Exemplo n.º 7
0
        // GET: ProjectOrders/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ProjectOrder projectOrder = db.ProjectOrders.Find(id);

            if (projectOrder == null)
            {
                return(HttpNotFound());
            }

            ViewBag.PizzaID = new SelectList(db.ProjectPizzas, "PizzaID", "PName", projectOrder.PizzaID);
            ViewBag.UserId  = new SelectList(db.ProjectUsers, "UserId", "FName", projectOrder.UserId);
            return(View(projectOrder));
        }
Exemplo n.º 8
0
        public ActionResult PartSearch(string name = null, string town        = null,
                                       int?year    = null, string cityName    = null,
                                       int?fid     = null, ProjectOrder order = ProjectOrder.ID,
                                       int page    = 1, int rows              = 20)
        {
            var parameter = new ProjectParameter
            {
                Name          = name,
                Town          = town,
                Year          = year,
                CityName      = cityName,
                FID           = fid,
                Order         = order,
                Participation = Identity.Name,
                IsRecord      = true,
                Page          = new PageParameter(page, rows)
            };

            SearchBase(parameter);
            return(View());
        }
Exemplo n.º 9
0
        /// <summary>
        /// 作用:个人录入未登记编号的项目 (未登记项目查询)
        /// </summary>
        /// <returns></returns>
        public ActionResult Search(
            string name = null, string town        = null,
            int?year    = null, string cityName    = null,
            int?fid     = null, ProjectOrder order = ProjectOrder.SerialDescending, int page = 1, int rows = 20)
        {
            var parameter = new ProjectParameter
            {
                Name     = name,
                Town     = town,
                Year     = year,
                CityName = cityName,
                FID      = fid,
                Order    = order,
                ChargeID = Identity.UserID,
                IsRecord = false,
                Page     = new PageParameter(page, rows)
            };

            SearchBase(parameter);

            return(View());
        }
Exemplo n.º 10
0
        public static Task <IEnumerable <Project> > GetProjectsAsync(this FreeAgentClient client, ProjectFilter filterBy = ProjectFilter.All, ProjectOrder orderBy = ProjectOrder.Name)
        {
            var view = filterBy.GetMemberValue();
            var sort = orderBy.GetMemberValue();

            return(client.GetOrCreateAsync(c => c.ProjectList(client.Configuration.CurrentHeader, view, sort, null), r => r.Projects));
        }
Exemplo n.º 11
0
 public ProjectConnection Projects(int?first = null, string after = null, int?last = null, string before = null, ProjectOrder orderBy = null, string search = null, IQueryable <ProjectState> states = null) => this.CreateMethodCall(x => x.Projects(first, after, last, before, orderBy, search, states), Octokit.GraphQL.ProjectConnection.Create);