private SEC000P001DTO GetByID(SEC000P001DTO dto)
 {
     dto.Model = _DBManger.VSMS_COMPANY
                 .Where(m => m.COM_CODE == dto.Model.COM_CODE && m.COM_BRANCH == dto.Model.COM_BRANCH)
                 .FirstOrDefault().ToNewObject(new SEC000P001Model());
     dto.Model.COM_CODE   = dto.Model.COM_CODE;
     dto.Model.COM_BRANCH = dto.Model.COM_BRANCH;
     return(dto);
 }
        private SEC000P001DTO GetComLicenseID(SEC000P001DTO dto)
        {
            dto.Model = _DBManger.VSMS_COMPANY
                        .Where(m => m.COM_CODE == dto.Model.COM_CODE)
                        .Select(m => new SEC000P001Model
            {
                COM_LICENSE_ID = m.COM_LICENSE_ID
            })
                        .FirstOrDefault().ToNewObject(new SEC000P001Model());

            return(dto);
        }
        private SEC000P001DTO GetAll(SEC000P001DTO dto)
        {
            dto.Models = _DBManger.VSMS_COMPANY
                         .Where((m => ((dto.Model.COM_CODE == null || dto.Model.COM_CODE == string.Empty) || m.COM_CODE.Contains(dto.Model.COM_CODE)) &&
                                 ((dto.Model.COM_BRANCH == null || dto.Model.COM_BRANCH == string.Empty) || m.COM_BRANCH.Contains(dto.Model.COM_BRANCH)) &&
                                 ((dto.Model.COM_NAME_E == null || dto.Model.COM_NAME_E == string.Empty) || m.COM_NAME_E.Contains(dto.Model.COM_NAME_E)) &&
                                 ((dto.Model.COM_FAC_NAME_E == null || dto.Model.COM_FAC_NAME_E == string.Empty) || m.COM_FAC_NAME_E.Contains(dto.Model.COM_FAC_NAME_E)) &&
                                 ((dto.Model.COM_BRANCH_E == null || dto.Model.COM_BRANCH_E == string.Empty) || m.COM_BRANCH_E.Contains(dto.Model.COM_BRANCH_E))
                                 ))
                         //.OrderBy(m => new { m.COM_CODE, m.COM_CODE })
                         .Select(m => new SEC000P001Model
            {
                COM_CODE     = m.COM_CODE,
                COM_BRANCH   = m.COM_BRANCH,
                COM_NAME_E   = m.COM_NAME_E,
                COM_NAME_T   = m.COM_NAME_T,
                COM_BRANCH_E = m.COM_BRANCH_E
            }).ToList();

            return(dto);
        }
 public SEC000P001DA()
 {
     DTO = new SEC000P001DTO();
 }