public JsonResult Update(OrganizationInfoDto dto)
        {
            if (!menu.AdminAccess)
            {
                return(null);
            }
            string message = _organizationInfoService.Update(dto);

            return(Json(message, JsonRequestBehavior.AllowGet));
        }
        public string Update(OrganizationInfoDto dto)
        {
            string message = "";

            try
            {
                int result = _organizationInfoRepository.Update(dto.ToEntity());
                message = _messageClass.ShowSuccessMessage(result);
            }
            catch (SqlException ex)
            {
                message = _messageClass.ShowErrorMessage(string.Format("{0} ~ {1}", ex.Number.ToString(), ex.Message));
            }
            return(message);
        }
示例#3
0
        public static OrganizationInfo ToEntity(this OrganizationInfoDto dto)
        {
            if (dto == null)
            {
                return(null);
            }

            return(new OrganizationInfo
            {
                OrganizationInfoId = dto.OrganizationInfoId,
                OrganizationName = dto.OrganizationName,
                AppName = dto.AppName,
                Address = dto.Address,
                ContactNumber1 = dto.ContactNumber1,
                ContactNumber2 = dto.ContactNumber2,
                TelephoneNumber = dto.TelephoneNumber,
                EmailAddress = dto.EmailAddress,
                FaxNumber = dto.FaxNumber,
                POBoxNumber = dto.POBoxNumber,
                Logo = dto.Logo,
                Favicon = dto.Favicon,
                NormalizedName = dto.NormalizedName,
            });
        }