コード例 #1
0
 public long[][] EmployeeTimeSaldoGet(long[] employeeIDList, EmployeeTimeSaldoType employeeTimeSaldoType,
                                      DateTime date)
 {
     try
     {
         return(_EmployeeTimeDao.EmployeeTimeSaldoGet(employeeIDList, employeeTimeSaldoType, date));
     }
     catch (Exception ex)
     {
         throw new LoadException(ex);
     }
 }
コード例 #2
0
        public long[][] EmployeeTimeSaldoGet(long[] employeeIDList, EmployeeTimeSaldoType employeeTimeSaldoType, DateTime date)
        {
            long[][] result;
            if (employeeIDList != null && employeeIDList.Length > 0)
            {
                using (IDbCommand command = Session.Connection.CreateCommand())
                {
                    Session.Transaction.Enlist(command);
                    command.CommandTimeout = 0;
                    command.CommandText    = "spEmployeeTimeSaldo";
                    command.CommandType    = CommandType.StoredProcedure;
                    SqlParameter typeParam = new SqlParameter("@type", SqlDbType.Int, 4);
                    typeParam.Value = employeeTimeSaldoType;
                    command.Parameters.Add(typeParam);

                    SqlParameter xmlDocument = new SqlParameter("@xmlDocument", SqlDbType.NText);
                    xmlDocument.Value = Utils.GetParamsInXml(employeeIDList, "Employee", "EmployeeID");
                    command.Parameters.Add(xmlDocument);

                    SqlParameter dateParam = new SqlParameter("@Date", SqlDbType.SmallDateTime, 4);
                    dateParam.Value = date;
                    command.Parameters.Add(dateParam);
                    using (IDataReader reader = command.ExecuteReader(CommandBehavior.SequentialAccess))
                    {
                        List <EmployeeSaldo> list = Map.ToList <EmployeeSaldo>(reader);
                        result = new long[list.Count][];
                        for (int i = 0; i < list.Count; i++)
                        {
                            result[i]    = new long[2];
                            result[i][0] = list[i].EmployeeID;
                            result[i][1] = list[i].Saldo;
                        }
                    }
                }
            }
            else
            {
                result = new long[0][];
            }
            return(result);
        }
コード例 #3
0
        public long[][] EmployeeTimeSaldoGet(long[] employeeIDList, EmployeeTimeSaldoType employeeTimeSaldoType, DateTime date)
        {
            long[][] result;
            if (employeeIDList != null && employeeIDList.Length > 0)
            {
                using (IDbCommand command = Session.Connection.CreateCommand())
                {
                    Session.Transaction.Enlist(command);
                    command.CommandTimeout = 0;
                    command.CommandText = "spEmployeeTimeSaldo";
                    command.CommandType = CommandType.StoredProcedure;
                    SqlParameter typeParam = new SqlParameter("@type", SqlDbType.Int, 4);
                    typeParam.Value = employeeTimeSaldoType;
                    command.Parameters.Add(typeParam);

                    SqlParameter xmlDocument = new SqlParameter("@xmlDocument", SqlDbType.NText);
                    xmlDocument.Value = Utils.GetParamsInXml(employeeIDList, "Employee", "EmployeeID");
                    command.Parameters.Add(xmlDocument);

                    SqlParameter dateParam = new SqlParameter("@Date", SqlDbType.SmallDateTime, 4);
                    dateParam.Value = date;
                    command.Parameters.Add(dateParam);
                    using (IDataReader reader = command.ExecuteReader(CommandBehavior.SequentialAccess))
                    {
                        List<EmployeeSaldo> list = Map.ToList<EmployeeSaldo>(reader);
                        result = new long[list.Count][];
                        for (int i = 0; i < list.Count; i++)
                        {
                            result[i] = new long[2];
                            result[i][0] = list[i].EmployeeID;
                            result[i][1] = list[i].Saldo;
                        }
                    }

                }
            }
            else
                result = new long[0][];
            return result;
        }
コード例 #4
0
 public long[][] EmployeeTimeSaldoGet(long[] employeeIDList, EmployeeTimeSaldoType employeeTimeSaldoType,
                                      DateTime date)
 {
     return
         ((IEmployeeTimeService) _remoteService).EmployeeTimeSaldoGet(employeeIDList, employeeTimeSaldoType, date);
 }
コード例 #5
0
ファイル: EmployeeTimeService.cs プロジェクト: 5509850/baumax
 public long[][] EmployeeTimeSaldoGet(long[] employeeIDList, EmployeeTimeSaldoType employeeTimeSaldoType,
                                      DateTime date)
 {
     try
     {
         return _EmployeeTimeDao.EmployeeTimeSaldoGet(employeeIDList, employeeTimeSaldoType, date);
     }
     catch (Exception ex)
     {
         throw new LoadException(ex);
     }
 }
コード例 #6
0
 public long[][] EmployeeTimeSaldoGet(long[] employeeIDList, EmployeeTimeSaldoType employeeTimeSaldoType,
                                      DateTime date)
 {
     return
         (((IEmployeeTimeService)_remoteService).EmployeeTimeSaldoGet(employeeIDList, employeeTimeSaldoType, date));
 }