示例#1
0
 public int UpdateDepartmentDetails(HolidayMasterModel objHolidayMasterModel)
 {
     SqlParameter[] paramAdd = new SqlParameter[5];
     paramAdd[0]       = new SqlParameter("@HolidaysId", SqlDbType.Int);
     paramAdd[0].Value = objHolidayMasterModel.HolidayID;
     paramAdd[1]       = new SqlParameter("@HolidaysDate", SqlDbType.DateTime);
     paramAdd[1].Value = objHolidayMasterModel.HolidayDate;
     paramAdd[2]       = new SqlParameter("@HolidaysDescription", SqlDbType.VarChar, 100);
     paramAdd[2].Value = objHolidayMasterModel.HolidayDescription;
     paramAdd[3]       = new SqlParameter("@IsHolidayForShift", SqlDbType.Bit);
     paramAdd[3].Value = objHolidayMasterModel.isHolidayForShift;
     paramAdd[4]       = new SqlParameter("@OfficeLocation", SqlDbType.TinyInt);
     paramAdd[4].Value = objHolidayMasterModel.OfficeLocation;
     try
     {
         return(SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, "UpdateHolidaysList", paramAdd));
     }
     catch (V2Exceptions ex)
     {
         throw;
     }
     catch (System.Exception ex)
     {
         FileLog objFileLog = FileLog.GetLogger();
         objFileLog.WriteLine(LogType.Error, ex.Message, "Holidayslist.cs", "UpdateDepartmentDetails", ex.StackTrace);
         throw new V2Exceptions(ex.ToString(), ex);
     }
 }
示例#2
0
        public DataSet bindHolidaysForLeaveApprovals(HolidayMasterModel objHolidayMasterModel)
        {
            SqlParameter[] paramAdd = new SqlParameter[3];

            paramAdd[0]       = new SqlParameter("@StartDate", SqlDbType.DateTime);
            paramAdd[0].Value = objHolidayMasterModel.StartDate;
            paramAdd[1]       = new SqlParameter("@EndDate", SqlDbType.DateTime);
            paramAdd[1].Value = objHolidayMasterModel.EndDate;
            paramAdd[2]       = new SqlParameter("@UserID", SqlDbType.Int);
            paramAdd[2].Value = objHolidayMasterModel.UserID;

            //paramAdd[0] = new SqlParameter("@StartDate", SqlDbType.DateTime);
            //paramAdd[0].Value ="5/30/2016";
            //paramAdd[1] = new SqlParameter("@EndDate", SqlDbType.DateTime);
            //paramAdd[1].Value = "5/30/2016";
            //paramAdd[2] = new SqlParameter("@UserID", SqlDbType.Int);
            //paramAdd[2].Value = objHolidayMasterModel.UserID;
            try
            {
                return(SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure, "sp_GetHolidaysListforLeaveApprovals", paramAdd));
            }
            catch (V2Exceptions ex)
            {
                throw;
            }
            catch (System.Exception ex)
            {
                FileLog objFileLog = FileLog.GetLogger();
                objFileLog.WriteLine(LogType.Error, ex.Message, "HolidayMasterDAL .cs", "bindHolidaysForLeaveApprovals", ex.StackTrace);
                throw new V2Exceptions(ex.ToString(), ex);
            }
        }
示例#3
0
 public int UpdateDepartmentDetails(HolidayMasterModel objHolidayMasterModel)
 {
     try
     {
         return(objHolidayMasterDAL.UpdateDepartmentDetails(objHolidayMasterModel));
     }
     catch (V2Exceptions ex)
     {
         throw;
     }
     catch (System.Exception ex)
     {
         FileLog objFileLog = FileLog.GetLogger();
         objFileLog.WriteLine(LogType.Error, ex.Message, "HolidayMasterBOL.cs", "UpdateDepartmentDetails", ex.StackTrace);
         throw new V2Exceptions(ex.ToString(), ex);
     }
 }
示例#4
0
        public DataSet SearchHolidayList(HolidayMasterModel objHolidayMasterModel)
        {
            SqlParameter[] paramAdd = new SqlParameter[2];

            paramAdd[0]       = new SqlParameter("@Year", SqlDbType.Int);
            paramAdd[0].Value = objHolidayMasterModel.Year;
            paramAdd[1]       = new SqlParameter("@UserID", SqlDbType.Int);
            paramAdd[1].Value = objHolidayMasterModel.UserID;
            try
            {
                return(SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure, "SearchHolidaysList", paramAdd));
            }
            catch (V2Exceptions ex)
            {
                throw;
            }
            catch (System.Exception ex)
            {
                FileLog objFileLog = FileLog.GetLogger();
                objFileLog.WriteLine(LogType.Error, ex.Message, "HolidayMasterDAL .cs", "SearchHolidaysList", ex.StackTrace);
                throw new V2Exceptions(ex.ToString(), ex);
            }
        }
示例#5
0
 public DataSet bindHolidaysForLeaveApprovals(HolidayMasterModel objHolidayMasterModel)
 {
     DsHolidays = objHolidayMasterDAL.bindHolidaysForLeaveApprovals(objHolidayMasterModel);
     return(DsHolidays);
 }
示例#6
0
 public DataSet searchHolidayList(HolidayMasterModel objHolidayMasterModel)
 {
     DsHolidays = objHolidayMasterDAL.SearchHolidayList(objHolidayMasterModel);
     return(DsHolidays);
 }