Пример #1
0
        public async Task <ActionResult> NewKeyDate(KeyDate model)
        {
            if (ModelState.IsValid)
            {
                ClaimTeamLoginModel    login   = Session[SessionHelper.claimTeamLogin] as ClaimTeamLoginModel;
                KeyContactDateServices service = new KeyContactDateServices();

                bool result;

                if (string.IsNullOrEmpty(model.H_Keydatesid))
                {
                    result = await service.InsertKeyDate(model, login.UserId);
                }
                else
                {
                    result = await service.UpdateKeyDate(model, login.UserId);
                }

                if (result)
                {
                    return(Redirect(Session[SessionHelper.FromURL].ToString()));
                }
            }
            PicklistServicecs pickListServices = new PicklistServicecs();

            model.Key_Date_Description_List = pickListServices.GetPickListItems("Key Date Description");

            return(View(model));
        }
Пример #2
0
        public async Task <ActionResult> _KeyDateDetail(KeyDate model)
        {
            if (ModelState.IsValid)
            {
                ClaimTeamLoginModel    login   = Session[SessionHelper.claimTeamLogin] as ClaimTeamLoginModel;
                KeyContactDateServices service = new KeyContactDateServices();

                bool result;

                if (string.IsNullOrEmpty(model.H_Keydatesid))
                {
                    result = await service.InsertKeyDate(model, login.UserId);
                }
                else
                {
                    result = await service.UpdateKeyDate(model, login.UserId);
                }

                if (result)
                {
                    return(Json("success", JsonRequestBehavior.AllowGet));
                }
            }
            pickListServices = new PicklistServicecs();
            model.Key_Date_Description_List = pickListServices.GetPickListItems("Key Date Description");

            return(PartialView(model));
        }