Beispiel #1
0
        public void AddBasicDetail()
        {
            var detail = new InsurrerDetail();

            detail.FirstName    = "Charles";
            detail.MiddleName   = detail.MiddleName == null ? "" : detail.MiddleName;
            detail.LastName     = "J";
            detail.TempPolicyNo = 0;
            detail.CreatedBy    = 1;
            detail.CreatedDate  = DateTime.Now;
            detail.ModifyDate   = DateTime.Now;
            detail.PolicyStatus = 1;
            long result = repository.AddBasicDetail(detail);
        }
        public string CreateBasicDetail([FromBody] InsurrerDetail detail)
        {
            long result = 0;

            try
            {
                detail.MiddleName   = detail.MiddleName == null ? "" : detail.MiddleName;
                detail.TempPolicyNo = 0;
                detail.CreatedBy    = detail.AgentId;
                detail.CreatedDate  = DateTime.Now;
                detail.ModifyDate   = DateTime.Now;
                detail.PolicyStatus = 1;
                result = repository.AddBasicDetail(detail);
            }
            catch (Exception dbEx)
            {
                return(Convert.ToString(result));
            }
            return(Convert.ToString(result));
        }