Esempio n. 1
0
        public TClientInfo enrollClient(IModel model)
        {


            try
            {
                _model = (ClientInfoModel)model;

                entity.BPAN = _model.BPAN;
                entity.BusinessName = _model.BusinessName;
                entity.BusinessType = _model.BusinessType;
                entity.DateOfEstablishment = _model.DateOfEstablishment;
                entity.BusinessContactNo = _model.BusinessContactNo;
                entity.BusinessEmailId = _model.BusinessEmailId;


                _dataContext.ClientInfos.InsertOnSubmit(entity);
                _dataContext.SubmitChanges();


                tClientInfoData.SuccessCode = SuccessCodes.RECORD_SAVED_SUCCESSFULLY;
                tClientInfoData.SuccessMessage=SuccessMessages.RECORD_SAVED_SUCCESSFULLY_MSG;

                return tClientInfoData;
            }

            catch (Exception exp)
            {
                tClientInfoData.ErrorCode = ErrorCodes.DATA_ACCESS_ERROR;
                tClientInfoData.ErrorMessage = exp.StackTrace;

                return tClientInfoData;
            }

        }
Esempio n. 2
0
        public PersonalInfoDAL()
        {
            personalInfoModel = new PersonalInfoModel();
            _dataContext = new MDKDBMLDataContext();
            tPersonalInfoData = new TPersonalInfoData();
            personalInfoEntity = new PersonInfo();

            clients = new TClientInfo();
            clientModel = new ClientInfoModel();
        }