예제 #1
0
        public static CustomList <SalaryProcess> deleteTempEmpListSalary(int ID)
        {
            ConnectionManager          conManager            = new ConnectionManager(ConnectionName.HR);
            CustomList <SalaryProcess> ShiftRosterCollection = new CustomList <SalaryProcess>();


            IDataReader reader = null;
            String      sql    = "exec spDeleteTempEmpListForSalary '" + ID + "'";

            try
            {
                conManager.OpenDataReader(sql, out reader);
                while (reader.Read())
                {
                    SalaryProcess newShiftRoster = new SalaryProcess();
                    newShiftRoster.SetData(reader);
                    ShiftRosterCollection.Add(newShiftRoster);
                }
                ShiftRosterCollection.InsertSpName = "spInsertTempEmpListForSalary";
                ShiftRosterCollection.DeleteSpName = "spDeleteTempEmpListForSalary";
                return(ShiftRosterCollection);
            }
            catch (Exception ex)
            {
                throw (ex);
            }
            finally
            {
                if (reader != null && !reader.IsClosed)
                {
                    reader.Close();
                }
            }
        }
예제 #2
0
        public static CustomList <SalaryProcess> doSalaryProcess(string spName, string YearNo, string MonthNo, string fromdate, string toDate, string tableName)
        {
            ConnectionManager          conManager = new ConnectionManager(ConnectionName.HR);
            CustomList <SalaryProcess> SalaryProcessCollection = new CustomList <SalaryProcess>();
            IDataReader reader = null;
            String      sql    = "exec " + spName + "'" + YearNo + "','" + MonthNo + "','" + fromdate + "','" + toDate + "','" + tableName + "'";

            try
            {
                conManager.OpenDataReader(sql, out reader);
                while (reader.Read())
                {
                    SalaryProcess newSalaryProcess = new SalaryProcess();
                    newSalaryProcess.SetData(reader);
                    SalaryProcessCollection.Add(newSalaryProcess);
                }
                SalaryProcessCollection.InsertSpName = "spInsertSalaryProcess";
                SalaryProcessCollection.UpdateSpName = "spUpdateSalaryProcess";
                SalaryProcessCollection.DeleteSpName = "spDeleteSalaryProcess";
                return(SalaryProcessCollection);
            }
            catch (Exception ex)
            {
                throw (ex);
            }
            finally
            {
                if (reader != null && !reader.IsClosed)
                {
                    reader.Close();
                }
            }
        }
예제 #3
0
        public static CustomList <SalaryProcess> deleteProcessedSalary(string tableName, string yearno, string month)
        {
            ConnectionManager          conManager            = new ConnectionManager(ConnectionName.HR);
            CustomList <SalaryProcess> ShiftRosterCollection = new CustomList <SalaryProcess>();


            IDataReader reader = null;
            String      sql    = "exec spDeleteSalaryProcessTableWise '" + yearno + "','" + month + "','" + tableName + "'";

            try
            {
                conManager.OpenDataReader(sql, out reader);
                while (reader.Read())
                {
                    SalaryProcess newShiftRoster = new SalaryProcess();
                    newShiftRoster.SetData(reader);
                    ShiftRosterCollection.Add(newShiftRoster);
                }
                ShiftRosterCollection.InsertSpName = "spInsertShiftRoster";
                ShiftRosterCollection.UpdateSpName = "spUpdateShiftRoster";
                ShiftRosterCollection.DeleteSpName = "spDeleteShiftRoster";
                return(ShiftRosterCollection);
            }
            catch (Exception ex)
            {
                throw (ex);
            }
            finally
            {
                if (reader != null && !reader.IsClosed)
                {
                    reader.Close();
                }
            }
        }
예제 #4
0
        public static CustomList <SalaryProcess> GetAllSalaryProcess()
        {
            ConnectionManager          conManager = new ConnectionManager(ConnectionName.HR);
            CustomList <SalaryProcess> SalaryProcessCollection = new CustomList <SalaryProcess>();
            IDataReader  reader = null;
            const String sql    = "select * from SalaryProcess";

            try
            {
                conManager.OpenDataReader(sql, out reader);
                while (reader.Read())
                {
                    SalaryProcess newSalaryProcess = new SalaryProcess();
                    newSalaryProcess.SetData(reader);
                    SalaryProcessCollection.Add(newSalaryProcess);
                }
                SalaryProcessCollection.InsertSpName = "spInsertSalaryProcess";
                SalaryProcessCollection.UpdateSpName = "spUpdateSalaryProcess";
                SalaryProcessCollection.DeleteSpName = "spDeleteSalaryProcess";
                return(SalaryProcessCollection);
            }
            catch (Exception ex)
            {
                throw (ex);
            }
            finally
            {
                if (reader != null && !reader.IsClosed)
                {
                    reader.Close();
                }
            }
        }