为员工分配多个任务 [英] Assigning multiple tasks to employees

查看:199
本文介绍了为员工分配多个任务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想一次为一个员工分配多个任务,一次为多个员工分配一个任务我是asp.net MVC的新手我希望得到一些代码示例的帮助或者什么能更好地解释这个概念? />


我尝试了什么:



我所做的就是管理员可以创建任务并一次分配给一个员工,员工可以看到我的创建任务代码的任务是

I want to assign multiple tasks to one employee at a time and one task to multiple employees at a time I am new in asp.net MVC I want some help some code example or whatever which can better explain the concept?

What I have tried:

What I have done is that the admin can create task and assign to one employee at a time and employee can see the tasks my code for create task is

public ActionResult Create()
      {
          var s = new SelectList(db.Accounts, "AccountId", "Name");
          ViewData["assitask.AccountId"] = s;
          ViewBag.TaskId = new SelectList(db.Tasks, "TaskId", "TaskName");
          return View();
      }



和为员工分配任务的代码是


and the code for assign task to employee is

public ActionResult Create()
      {
          var s= new SelectList(db.Accounts, "AccountId", "Name");
          ViewBag.AccountId = s;
          ViewBag.TaskId = new SelectList(db.Tasks, "TaskId", "TaskName");
          return View();
      }



希望专家做出更好,更积极的回应。


Hope for the better and positive response from experts.

推荐答案

如果你问1000个开发者这个问题,你会得到1000个不同的答案。您在问如何设计您的应用。好吧,一种方法是有一个复选框列表,以便他们可以选择多个。你也可以采取其他方式。由你决定。但是没有自动插件代码可以复制和粘贴以使其工作。你必须决定你希望它如何工作,然后编写代码来执行它。
If you ask 1000 developers this question you'll get 1000 different answers. You are asking how to design your app. Well, one way is to have a list of checkboxes so that they can pick multiple. You could do it other ways too. It's up to you. But there is no automatic plugin code that you can copy and paste to make this work. You have to decide how you want it to work and then write the code to do it.


Quote:

我想一次为一个员工分配多个任务,一次为一个员工分配一个任务

I want to assign multiple tasks to one employee at a time and one task to multiple employees at a time

这是对您的任务的模糊描述,涵盖了两个极端之间的任何内容。你甚至没有提供有关约束的细节。这只是你家庭作业的一个非常糟糕的描述。

this is a vague description of your assignment which covers anything between the 2 extremes. You didn't even give details on the constraints. It is just a very bad description of your HomeWork.

Quote:

我是asp.net MVC的新手

I am new in asp.net MVC

这不是问题!

问题是你必须设计项目必须如何工作,设计你显然还没有做过。

This is not the problem !
The problem is that you have to design how things must work in the project, design that you obviously haven't done.

引用:

希望专家做出更好,更积极的回应。

Hope for the better and positive response from experts.

你的问题对这里的每个人都很粗鲁。

开始工作!

Your question is just rude to everyone here.
Start working !


这篇关于为员工分配多个任务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆