コード例 #1
0
        public int CheckUser()
        {
            var result = SprocHelper.ExecDANGNHAP(session, username, password);

            var temp = int.Parse(result.ResultSet[0].Rows[0].Values[0].ToString());

            if (temp == 1)
            {
                IdNV = int.Parse(result.ResultSet[0].Rows[0].Values[1].ToString());
            }
            return(temp);
        }
コード例 #2
0
        public int CreateEmployeeClassification(GetEmployeeClassificationsResult employeeClassification)
        {
            if (employeeClassification == null)
            {
                throw new ArgumentNullException(nameof(employeeClassification),
                                                $"{nameof(employeeClassification)} is null.");
            }

            using (var uow = new UnitOfWork())
            {
                var temp = SprocHelper.ExecHR_CreateEmployeeClassificationIntoObjects(
                    uow,
                    employeeClassification.EmployeeClassificationName,
                    employeeClassification.IsExempt,
                    employeeClassification.IsEmployee
                    );
                return(temp.Single().EmployeeClassificationKey);
            }
        }
コード例 #3
0
        public NHANVIEN_DTO getNhanVienById(int IdNV)
        {
            NHANVIEN_DTO dto    = new NHANVIEN_DTO();
            var          result = SprocHelper.ExecNHANVIEN_ById(session, IdNV);
            var          values = result.ResultSet[0].Rows[0].Values;

            try
            {
                dto.IdNV        = int.Parse(values[0].ToString());
                dto.HoTenNV     = values[1].ToString();
                dto.NgaySinhNV  = DateTime.Parse(values[2].ToString());
                dto.GioiTinhNV  = Boolean.Parse(values[3].ToString());
                dto.DiaChiNV    = values[4].ToString();
                dto.DienThoaiNV = values[5].ToString();
                dto.GhiChuNV    = values[6] == null ? null : values[6].ToString();
                dto.TenBP       = values[7].ToString();
                return(dto);
            }
            catch (Exception e)
            {
                throw e;
            }
        }
コード例 #4
0
 public static XPDataView ExecKHACHHANG_GetAll()
 {
     return(SprocHelper.ExecKHACHHANG_GetAllIntoDataView(session));
 }
コード例 #5
0
 public GetEmployeeClassificationsResult?GetEmployeeClassifications(int employeeClassificationKey)
 {
     return(SprocHelper.ExecHR_GetEmployeeClassificationsIntoObjects(Session.DefaultSession, employeeClassificationKey).SingleOrDefault());
 }
コード例 #6
0
 public IList <GetEmployeeClassificationsResult> GetEmployeeClassifications()
 {
     return(SprocHelper.ExecHR_GetEmployeeClassificationsIntoObjects(Session.DefaultSession, null).ToList());
 }
コード例 #7
0
 public IList <CountEmployeesByClassificationResult> CountEmployeesByClassification()
 {
     return(SprocHelper.ExecHR_CountEmployeesByClassificationIntoObjects(Session.DefaultSession).ToList());
 }