Exemplo n.º 1
0
        public ActionResult Edit(string organizationId)
        {
            try
            {
                RequestResult requestResult = new RequestResult();
                requestResult = OrganizationDataAccessor.GetEditFormModel(new Guid(organizationId));

                if (requestResult.IsSuccess)
                {
                    Session["OrganizationFormAction"]    = Define.EnumFormAction.Edit;
                    Session["OrganizationEditFormModel"] = requestResult.Data;

                    return(PartialView("_Edit", Session["OrganizationEditFormModel"]));
                }
                else
                {
                    return(PartialView("_Error", requestResult.Error));
                }
            }
            catch (Exception e)
            {
                var error = new Error(MethodBase.GetCurrentMethod(), e);
                Logger.Log(error);
                return(PartialView("_Error", error));
                //throw;
            }
        }