-
Notifications
You must be signed in to change notification settings - Fork 0
/
AllotmentController.cs
45 lines (41 loc) · 1.52 KB
/
AllotmentController.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Denial_Coding.BAL.Generics;
using Denial_Coding.BAL.Managers;
using Denial_Coding.BAL.ViewModels;
namespace Denial_Coding.Controllers
{
public class AllotmentController : Controller
{
IAllotmentService managerObj = new AllotmentManager();
//
// GET: /Allotment/
public ActionResult CodingAllotment()
{
AllotmentModel model = new AllotmentModel();
model.CoderList = managerObj.getCoderNames(1, 2).OrderBy(x => x.Text).ToList();
model.PracticeList = managerObj.GetPracticeList();
return View(model);
}
public ActionResult GetAccountDetails(string status, string fromDos, string toDos, int practiceId)
{
return PartialView("_CoderAllotmentGrid", managerObj.GetAccountDetails(status, fromDos, toDos,practiceId));
}
[HttpPost]
public JsonResult CodingAllotment(string listOfAccounts, string practiceId,string codername, string buttonText)
{
if (buttonText == "Allot")
{
managerObj.AllotToCoder(listOfAccounts, practiceId,codername);
}
else if (buttonText == "Re-Allot")
{
managerObj.UpdateAllotToCoder(listOfAccounts, practiceId, codername);
}
return Json("", JsonRequestBehavior.AllowGet);
}
}
}