예제 #1
0
        internal static void UpdateSAPStatus(SAPStatuses status, string staffUsername, bool isAdHoc, int eventId)
        {
            using (SqlConnection conn = UtilityDb.GetConnectionESS())
            {
                string whereClause = string.Format(" StaffUsername='******' AND IsAdHoc='{1}' AND EventID={2}",
                    staffUsername, isAdHoc, eventId);

                string sql = string.Format("UPDATE REQ_PrebookedEvents SET SAPStatus={0}, RequestDate=GetDate() WHERE {1}",
                    Convert.ToInt32(status).ToString(), whereClause);
                UtilityDb.ExecuteSql(sql, conn);
            }
        }
예제 #2
0
        public static void UpdateSAPStatus(SAPStatuses status, string staffUsername, int eventDateId)
        {
            using (SqlConnection conn = UtilityDb.GetConnectionESS())
            {
                string whereClause = string.Format(" UPPER(StaffUsername)='{0}' AND EventDateID={1}",
                    staffUsername.ToUpper(), eventDateId);

                string sql = string.Format("UPDATE REQ_BookedEvents SET SAPStatus={0}, RequestDate=GetDate() WHERE {1}",
                    Convert.ToInt32(status).ToString(), whereClause);
                UtilityDb.ExecuteSql(sql, conn);
            }
        }