示例#1
0
        public object SaveActionPendingCbsAccounts(BatchUpdateModel model)
        {
            try
            {
                var mtcbsinfos = ConvertBatchUpdateModelToMtCbsinfoModelForCheck(model);

                foreach (MtCbsinfo mtcbsinfo in mtcbsinfos)
                {
                    if (String.IsNullOrEmpty(mtcbsinfo.CheckBy))
                    {
                        return(HttpStatusCode.Unauthorized);
                    }
                    if (mtcbsinfo.CheckStatus != null && mtcbsinfo.CheckStatus != "P")
                    {
                        var cbsInfoPrev = _repository.GetMappedAccountByAccNo(mtcbsinfo.Accno);
                        _repository.ChekCbsAccuntByAccNo(mtcbsinfo);
                        var cbsInfoCurrent = _repository.GetMappedAccountByAccNo(mtcbsinfo.Accno);
                        auditTrailService.InsertUpdatedModelToAuditTrail(cbsInfoCurrent, cbsInfoPrev, mtcbsinfo.CheckBy, 8, 4, "Acc Mapping Check", mtcbsinfo.Mphone, "Successfully Checked");
                    }
                }
                return(HttpStatusCode.OK);
            }
            catch (Exception ex)
            {
                throw;
            }
        }