Ejemplo n.º 1
0
        public DataSet GetEmployeeShiftDetail(RosterPlanningModel objRosterPlanningModel)
        {
            try
            {
                SqlParameter[] objParam = new SqlParameter[3];
                //objParam[0] = new SqlParameter("@EmployeeID", DbType.Int32);

                objParam[0]       = new SqlParameter("@UserID", DbType.Int32);
                objParam[0].Value = objRosterPlanningModel.UserId;


                objParam[1]       = new SqlParameter("@FromDate", DbType.DateTime);
                objParam[1].Value = objRosterPlanningModel.FromDate;


                objParam[2]       = new SqlParameter("@ToDate", DbType.DateTime);
                objParam[2].Value = objRosterPlanningModel.ToDate;

                dsRosterPlanningDAL = SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure, "GetEmployeeShiftDetail", objParam);
                return(dsRosterPlanningDAL);
            }
            catch (V2Exceptions ex)
            {
                throw;
            }
            catch (System.Exception ex)
            {
                FileLog objFileLog = FileLog.GetLogger();
                objFileLog.WriteLine(LogType.Error, ex.Message, "RosterPlanningDAL.cs", "GetEmployeeShiftDetail", ex.StackTrace);
                throw new V2Exceptions(ex.ToString(), ex);
            }
        }
Ejemplo n.º 2
0
        public DataSet GetRosterDataReport(RosterPlanningModel objRosterPlanningModel)
        {
            try
            {
                SqlParameter[] objParam = new SqlParameter[5];
                objParam[0] = new SqlParameter("@UserID", objRosterPlanningModel.UserId);
                objParam[1] = new SqlParameter("@ShiftID", objRosterPlanningModel.ShiftID);
                objParam[2] = new SqlParameter("@StartDate", objRosterPlanningModel.FromDate);
                objParam[3] = new SqlParameter("@EndDate", objRosterPlanningModel.ToDate);
                objParam[4] = new SqlParameter("@LoggedUserId", objRosterPlanningModel.LoggedUserId);

                dsRosterPlanningDAL = SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure, "GetRosterDataReport", objParam);
                return(dsRosterPlanningDAL);
            }
            catch (V2Exceptions ex)
            {
                throw;
            }
            catch (System.Exception ex)
            {
                FileLog objFileLog = FileLog.GetLogger();
                objFileLog.WriteLine(LogType.Error, ex.Message, "RosterPlanningDAL.cs", "GetRosterDataReport", ex.StackTrace);
                throw new V2Exceptions(ex.ToString(), ex);
            }
        }
Ejemplo n.º 3
0
        public DataSet GetEmployeeRole(RosterPlanningModel objRosterPlanningModel)
        {
            string V2toolsDBEntity = "";

            V2toolsDBEntity = ConfigurationManager.AppSettings["V2toolsDBEntity"].ToString();

            try
            {
                SqlParameter[] objParam = new SqlParameter[2];

                objParam[0]       = new SqlParameter("@ApplicationName", DbType.String);
                objParam[0].Value = "V2ToolsApp";

                objParam[1]       = new SqlParameter("@UserName", DbType.String);
                objParam[1].Value = objRosterPlanningModel.UserId;


                dsRosterPlanningDAL = SqlHelper.ExecuteDataset(V2toolsDBEntity, CommandType.StoredProcedure, "aspnet_UsersInRoles_GetRolesForUser", objParam);
                return(dsRosterPlanningDAL);
            }
            catch (V2Exceptions ex)
            {
                throw;
            }
            catch (System.Exception ex)
            {
                FileLog objFileLog = FileLog.GetLogger();
                objFileLog.WriteLine(LogType.Error, ex.Message, "RosterPlanningDAL.cs", "GetEmployeeRole", ex.StackTrace);
                throw new V2Exceptions(ex.ToString(), ex);
            }
        }
Ejemplo n.º 4
0
        public void InsertEmployeeeShiftDetails(RosterPlanningModel objRosterPlanningModel)
        {
            try
            {
                SqlParameter[] objParam = new SqlParameter[6];
                objParam[0] = new SqlParameter("@UserID", objRosterPlanningModel.UserId);
                objParam[1] = new SqlParameter("@ShiftId", objRosterPlanningModel.ShiftID);
                objParam[2] = new SqlParameter("@WeekOff1", objRosterPlanningModel.WeekOffDate1);
                objParam[3] = new SqlParameter("@WeekOff2", objRosterPlanningModel.WeekOffDate2);
                objParam[4] = new SqlParameter("@StartDate", objRosterPlanningModel.FromDate);
                objParam[5] = new SqlParameter("@EndDate", objRosterPlanningModel.ToDate);

                SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure, "sp_Insert_Update_EmployeeShiftDetail", objParam);
            }
            catch (V2Exceptions ex)
            {
                throw;
            }
            catch (System.Exception ex)
            {
                FileLog objFileLog = FileLog.GetLogger();
                objFileLog.WriteLine(LogType.Error, ex.Message, "RosterPlanningDAL.cs", "sp_Insert_Update_EmployeeShiftDetail", ex.StackTrace);
                throw new V2Exceptions(ex.ToString(), ex);
            }
        }
Ejemplo n.º 5
0
 public void InsertEmployeeeShiftDetails(RosterPlanningModel objRosterPlanningModel)
 {
     try
     {
         objRosterPlanningDAL.InsertEmployeeeShiftDetails(objRosterPlanningModel);
     }
     catch (V2Exceptions ex)
     {
         throw;
     }
     catch (System.Exception ex)
     {
         FileLog objFileLog = FileLog.GetLogger();
         objFileLog.WriteLine(LogType.Error, ex.Message, "RosterPlanningBOL.cs", "sp_Insert_Update_EmployeeShiftDetail", ex.StackTrace);
         throw new V2Exceptions(ex.ToString(), ex);
     }
 }
Ejemplo n.º 6
0
 public DataSet GetEmployeeShiftDetail(RosterPlanningModel objRosterPlanningModel)
 {
     try
     {
         return(objRosterPlanningDAL.GetEmployeeShiftDetail(objRosterPlanningModel));
     }
     catch (V2Exceptions ex)
     {
         throw;
     }
     catch (System.Exception ex)
     {
         FileLog objFileLog = FileLog.GetLogger();
         objFileLog.WriteLine(LogType.Error, ex.Message, "RosterPlanningBOL.cs", "sp_FillShiftData", ex.StackTrace);
         throw new V2Exceptions(ex.ToString(), ex);
     }
 }
Ejemplo n.º 7
0
 public DataSet GetRosterDataReport(RosterPlanningModel objRosterPlanningModel)
 {
     try
     {
         dsRosterPlanningBOL = objRosterPlanningDAL.GetRosterDataReport(objRosterPlanningModel);
         return(dsRosterPlanningBOL);
     }
     catch (V2Exceptions ex)
     {
         throw;
     }
     catch (System.Exception ex)
     {
         FileLog objFileLog = FileLog.GetLogger();
         objFileLog.WriteLine(LogType.Error, ex.Message, "RosterPlanningBOL.cs", "GetRosterData", ex.StackTrace);
         throw new V2Exceptions(ex.ToString(), ex);
     }
 }