public JsonResult AddAssignee(string data, string matterNumber)
        {
            //List<string> assigneeList = new List<string>();
            string[]    assigneeStaffList = data.Split(',');
            StaffMatter staffMatter       = new StaffMatter();

            foreach (var staffId in assigneeStaffList)
            {
                staffMatter.MatterNumber = matterNumber;
                staffMatter.StaffId      = staffId;
                db.StaffMatters.Add(staffMatter);
                db.SaveChanges();
            }
            return(Json(0, JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 2
0
        public ActionResult Register(LoginUser model)
        {
            if (ModelState.IsValid)
            {
                model.CreatedBy = model.Username;
                model.CreatedOn = DateTime.Today.Date;
                //model.Password = LegalGuideUtility.Encrypt(model.Password);
                db.LoginUsers.Add(model);
                db.SaveChanges();

                return(RedirectToAction("Login", "Account"));
            }

            // If we got this far, something failed, redisplay form
            return(View(model));
        }