Esempio n. 1
0
        public override Request TranslateToModel(REQUEST entity)
        {
            try
            {
                Request model = null;
                if (entity != null)
                {
                    model                = new Request();
                    model.Id             = entity.Request_Id;
                    model.FromPerson     = _personTranslator.Translate(entity.PERSON);
                    model.ToPerson       = _personTranslator.Translate(entity.PERSON1);
                    model.RequestMessage = _messageTranslator.Translate(entity.MESSAGE);
                    model.ReplyMessage   = _messageTranslator.Translate(entity.MESSAGE1);
                    model.ServiceCharge  = _serviceChargeTranslator.Translate(entity.SERVICE_CHARGE);
                    model.Status         = _requestStatusTranslator.Translate(entity.REQUEST_STATUS);
                    model.Date           = entity.Request_Date;
                    model.ReplyDate      = entity.Reply_Date;
                }

                return(model);
            }
            catch (Exception)
            {
                throw;
            }
        }
Esempio n. 2
0
        public override Payment TranslateToModel(PAYMENT entity)
        {
            try
            {
                Payment model = null;
                if (entity != null)
                {
                    model               = new Payment();
                    model.Id            = entity.Payment_Id;
                    model.Person        = _personTranslator.Translate(entity.PERSON);
                    model.Mode          = _paymentModeTranslator.Translate(entity.PAYMENT_MODE);
                    model.ServiceCharge = _serviceChargeTranslator.Translate(entity.SERVICE_CHARGE);
                    model.SerialNumber  = entity.Serial_Number;
                    model.InvoiceNumber = entity.Invoice_Number;
                    model.DateEntered   = entity.Date_Entered;
                    model.Paid          = entity.Paid;
                    model.DatePaid      = entity.Date_Paid;
                }

                return(model);
            }
            catch (Exception)
            {
                throw;
            }
        }