private LabTestRecord EntityToModel(HR_LABTESTRECORD entity)
        {
            if (entity != null)
            {
                var model = new LabTestRecord()
                {
                    RecordId   = entity.RECORDID,
                    RecordDate = entity.RECORDDATE,
                    Hospital   = entity.HOSPITAL,
                    LabDoctor  = entity.LABDOCTOR,
                    ItemId     = entity.ITEMID,
                    Report     = entity.REPORT,
                    //Attachment = entity.ATTACHMENT,
                    Itemname   = entity.ITEMNAME,
                    ItemNo     = entity.ITEMNO,
                    RecordNo   = entity.RECORDNO,
                    CreateDate = entity.CREATEDATE,
                    CreateBy   = entity.CREATEBY,
                    UpdateDate = entity.UPDATEDATE,
                    UpdateBy   = entity.UPDATEBY,
                    Status     = entity.STATUS
                };

                return(model);
            }
            return(null);
        }
        private HR_LABTESTRECORD ModelToEntity(LabTestRecord model)
        {
            if (model != null)
            {
                var entity = new HR_LABTESTRECORD()
                {
                    RECORDID   = model.RecordId,
                    RECORDDATE = model.RecordDate,
                    HOSPITAL   = model.Hospital,
                    LABDOCTOR  = model.LabDoctor,
                    ITEMID     = model.ItemId,
                    REPORT     = model.Report,
                    //ATTACHMENT=model.Attachment,
                    ITEMNAME   = model.Itemname,
                    ITEMNO     = model.ItemNo,
                    RECORDNO   = model.RecordNo,
                    CREATEDATE = model.CreateDate,
                    CREATEBY   = model.CreateBy,
                    UPDATEDATE = model.UpdateDate,
                    UPDATEBY   = model.UpdateBy,
                    STATUS     = model.Status
                };

                return(entity);
            }
            return(null);
        }