Exemple #1
0
        public bool removeSesssionRegistered(List <decimal> SessionId, string wslxid)
        {
            bool flag = false;

            using (LBCData context = new LBCData(ConnectionHelper.getConnectionString()))
            {
                List <LBC_GUEST_REGD_SESSION> _sesssion = (from p in context.LBC_GUEST_REGD_SESSION
                                                           where p.WSLX_ID == wslxid && SessionId.Contains(p.SESSION_ID)
                                                           select p).ToList <LBC_GUEST_REGD_SESSION>();

                if (_sesssion.Count() > 0)
                {
                    try
                    {
                        foreach (LBC_GUEST_REGD_SESSION item in _sesssion)
                        {
                            context.LBC_GUEST_REGD_SESSION.Remove(item);
                            context.SaveChanges();
                            flag = true;
                        }
                    }
                    catch (Exception ex)
                    {
                        flag = false;
                    }
                }
                else
                {
                    flag = true;
                }
            }
            return(flag);
        }
        /// <summary>
        /// Updates the shipping status in the checkpointCompleted entity
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public bool UpdateCheckpointStatus(CheckpointReportModel model)
        {
            bool save = true;

            try
            {
                using (LBCData context = new LBCData(ConnectionHelper.getConnectionString()))
                {
                    var _chk = (from lcc in context.LBC_CHECKPOINT_COMPLETED
                                where lcc.STARS_ID == model.STARS_ID && lcc.CHECKPOINT_ID == model.CHECKPOINT_ID
                                select lcc).FirstOrDefault();

                    _chk.SHIPPING_STATUS = model.SHIPPING_STATUS;
                    _chk.UPDATED_DATE    = DateTime.Now;
                    _chk.UPDATED_BY      = System.Web.HttpContext.Current.Session["w_user"].ToString();

                    context.SaveChanges();
                }
            }
            catch (Exception ex)
            {
                throw ex;
                // save = false;
            }
            return(save);
        }
Exemple #3
0
        public bool UpdateHotelInfo(HotelCarModel model)
        {
            bool save = true;

            try
            {
                using (LBCData context = new LBCData(ConnectionHelper.getConnectionString()))
                {
                    var _hotel = (from p in context.LBC_HOTEL_CAR_INFO
                                  where p.STARS_ID == model.STARS_ID && p.EVENT_ID == model.EVENT_ID
                                  select p).FirstOrDefault();



                    _hotel.HOTEL_NAME      = model.HOTEL_NAME;
                    _hotel.HOTEL_CONF      = model.HOTEL_CONF;
                    _hotel.HOTEL_CHECK_IN  = model.HOTEL_CHECK_IN;
                    _hotel.HOTEL_CHECK_OUT = model.HOTEL_CHECK_OUT;
                    _hotel.CAR_CONFIRM     = model.CAR_CONFIRM;
                    _hotel.CAR_NOTES       = model.CAR_NOTES;
                    _hotel.ADMIN_NOTES     = model.ADMIN_NOTES;
                    _hotel.UPDATE_DATE     = model.UPDATE_DATE;
                    _hotel.UPDATED_BY      = model.UPDATED_BY;

                    context.SaveChanges();
                }
            }
            catch (Exception ex)
            {
                throw ex;
                // save = false;
            }
            return(save);
        }
Exemple #4
0
        /// <summary>
        /// Method to add the Story
        /// </summary>
        /// <param name="model"></param>
        public void SaveStory(StoryModel model)
        {
            using (LBCData context = new LBCData(ConnectionHelper.getConnectionString()))
            {
                LBC_STORY _story = new LBC_STORY()
                {
                    STARS_ID          = model.STARS_ID,
                    PA_CODE           = model.PA_CODE,
                    STORY_TITLE       = model.STORY_TITLE,
                    STORY_CONTENT     = model.STORY_CONTENT,
                    STORY_RATING      = model.STORY_RATING,
                    STORY_STATUS      = model.STORY_STATUS,
                    STORY_CATEGORY    = model.STORY_CATEGORY,
                    STORY_SUBCATEGORY = model.STORY_SUBCATEGORY,
                    SUBMISION_DATE    = model.SUBMISION_DATE,
                    IMG_1             = model.IMG_1,
                    IMG_2             = model.IMG_2,
                    IMG_3             = model.IMG_3,
                    CREATED_DATE      = model.CREATED_DATE,
                    CREATED_BY        = model.CREATED_BY
                };

                context.LBC_STORY.Add(_story);
                context.SaveChanges();
            }
        }
Exemple #5
0
        /// <summary>
        /// Method to update existing guest registration.
        /// </summary>
        /// <param name="model"></param>
        /// <returns>save</returns>
        public bool UpdateGuestRegistration(GuestRegistrationModel model)
        {
            bool save = true;

            try
            {
                using (LBCData context = new LBCData(ConnectionHelper.getConnectionString()))
                {
                    var _registration = (from p in context.LBC_GUEST_REGISTRATION
                                         where p.WSLX_ID == model.WSLX_ID
                                         select p).FirstOrDefault();

                    _registration.FIRST_NAME          = model.FIRST_NAME;
                    _registration.LAST_NAME           = model.LAST_NAME;
                    _registration.COMPANY_NAME        = model.COMPANY_NAME;
                    _registration.DEPARTMENT          = model.DEPARTMENT;
                    _registration.TITLE               = model.TITLE;
                    _registration.EMAIL_ID            = model.EMAIL_ID;
                    _registration.PHONE               = model.PHONE;
                    _registration.DIETARY_RESTRICTION = model.DIETARY_RESTRICTION;
                    _registration.PROFILE_NOTE        = model.PROFILE_NOTE;
                    _registration.HOTEL_REQUIRED      = model.HOTEL_REQUIRED;
                    _registration.UPDATED_BY          = model.UPDATED_BY;
                    _registration.UPDATE_DATE         = model.UPDATE_DATE;

                    context.SaveChanges();
                }
            }
            catch (Exception ex)
            {
                throw ex;
                // save = false;
            }
            return(save);
        }
Exemple #6
0
        public bool Update(ProfileRecognitionMasterModel model)
        {
            bool save = true;

            try
            {
                using (LBCData context = new LBCData(ConnectionHelper.getConnectionString()))
                {
                    var _profile = (from p in context.LBC_PROFILE_RECOGNITION_MASTER
                                    where p.RECOGNITION_ID == model.RECOGNITION_ID
                                    select p).FirstOrDefault();

                    _profile.CATEGORY          = model.CATEGORY;
                    _profile.CREATED_DATE      = model.CREATED_DATE;
                    _profile.CREATED_BY        = model.CREATED_BY;
                    _profile.RECOGNITION_DESC  = model.RECOGNITION_DESC;
                    _profile.RECOGNITION_ID    = model.RECOGNITION_ID;
                    _profile.RECOGNITION_TITLE = model.RECOGNITION_TITLE;
                    _profile.UPDATE_DATE       = model.UPDATE_DATE;
                    _profile.UPDATED_BY        = model.UPDATED_BY;

                    context.SaveChanges();
                }
            }
            catch (Exception ex)
            {
                save = false;
            }
            return(save);
        }
Exemple #7
0
        public bool Update(ProfileRecognition model)
        {
            bool save = true;

            try
            {
                using (LBCData context = new LBCData(ConnectionHelper.getConnectionString()))
                {
                    var _profile = (from p in context.LBC_PROFILE_RECOGNITION
                                    where p.STARS_ID == model.STARS_ID && p.RECOGNITION_ID == model.RECOGNITION_ID
                                    select p).FirstOrDefault();



                    _profile.STATUS = model.STATUS;
                    // _profile.RECOGNITION_ID = model.RECOGNITION_ID;
                    _profile.UPDATE_DATE = model.UPDATE_DATE;
                    _profile.UPDATED_BY  = model.UPDATED_BY;

                    context.SaveChanges();
                }
            }
            catch (Exception ex)
            {
                throw ex;
                // save = false;
            }
            return(save);
        }
Exemple #8
0
        public bool Save(ProfileRecognitionMasterModel model)
        {
            bool save = true;

            try
            {
                using (LBCData context = new LBCData(ConnectionHelper.getConnectionString()))
                {
                    LBC_PROFILE_RECOGNITION_MASTER _profileM = new LBC_PROFILE_RECOGNITION_MASTER()
                    {
                        CATEGORY          = model.CATEGORY,
                        CREATED_DATE      = model.CREATED_DATE,
                        CREATED_BY        = model.CREATED_BY,
                        RECOGNITION_DESC  = model.RECOGNITION_DESC,
                        RECOGNITION_ID    = model.RECOGNITION_ID,
                        RECOGNITION_TITLE = model.RECOGNITION_TITLE,
                        UPDATE_DATE       = model.UPDATE_DATE,
                        UPDATED_BY        = model.UPDATED_BY
                    };

                    context.LBC_PROFILE_RECOGNITION_MASTER.Add(_profileM);
                    context.SaveChanges();
                }
            }
            catch (Exception ex)
            {
                save = false;
            }
            return(save);
        }
        /// <summary>
        /// Method to Insert the data on the FlightInfo table
        /// </summary>
        /// <param name="model"></param>
        public void SaveFlightInfo(FlightInfoModel model)
        {
            using (LBCData context = new LBCData(ConnectionHelper.getConnectionString()))
            {
                LBC_FLIGHT_INFO _flightInfo = new LBC_FLIGHT_INFO()
                {
                    //REGD_SEQ_NUM = model.REGD_SEQ_NUM,
                    STARS_ID                = model.STARS_ID,
                    EVENT_ID                = model.EVENT_ID,
                    ARR_DATE                = model.ARR_DATE,
                    ARR_TIME                = model.ARR_TIME,
                    ARR_AIRLINE             = model.ARR_AIRLINE,
                    ARR_FLIGHT_NUM          = model.ARR_FLIGHT_NUM,
                    ARR_CITY                = model.ARR_CITY,
                    DEP_DATE                = model.DEP_DATE,
                    DEP_TIME                = model.DEP_TIME,
                    DEP_AIRLINE             = model.DEP_AIRLINE,
                    DEP_FLIGHT_NUM          = model.DEP_FLIGHT_NUM,
                    DEP_CITY                = model.DEP_CITY,
                    DEP_DEST_CITY           = model.DEP_DEST_CITY,
                    MULTI_FLAG              = model.MULTI_FLAG,
                    CREATED_DATE            = model.CREATED_DATE,
                    CREATED_BY              = model.CREATED_BY,
                    ARR_DEP_CITY            = model.ARR_DEP_CITY,
                    ARR_TERMINAL            = model.ARR_TERMINAL,
                    CONNECTING_FLIGHT_NOTES = model.CONNECTING_FLIGHT_NOTES,
                };

                context.LBC_FLIGHT_INFO.Add(_flightInfo);
                context.SaveChanges();
            }
        }
Exemple #10
0
        /// <summary>
        /// Method to insert to the Profile recognition
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public bool Save(ProfileRecognition model)
        {
            bool save = true;

            try
            {
                using (LBCData context = new LBCData(ConnectionHelper.getConnectionString()))
                {
                    LBC_PROFILE_RECOGNITION _profileM = new LBC_PROFILE_RECOGNITION()
                    {
                        CREATED_DATE   = model.CREATED_DATE,
                        CREATED_BY     = model.CREATED_BY,
                        RECOGNITION_ID = model.RECOGNITION_ID,
                        STARS_ID       = model.STARS_ID,
                        STATUS         = model.STATUS
                    };

                    context.LBC_PROFILE_RECOGNITION.Add(_profileM);
                    context.SaveChanges();
                }
            }
            catch (Exception ex)
            {
                throw ex;
                //   save = false;
            }
            return(save);
        }
        /// <summary>
        /// Method to Update the Registration Table
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public bool UpdateRegistration(RegistrationModel model)
        {
            bool save = true;

            try
            {
                using (LBCData context = new LBCData(ConnectionHelper.getConnectionString()))
                {
                    var _registration = (from p in context.LBC_REGISTRATION
                                         where p.STARS_ID == model.STARS_ID && p.EVENT_ID == model.EVENT_ID
                                         select p).FirstOrDefault();



                    _registration.ATTENDED            = model.ATTENDED;
                    _registration.TRANSPORTATION_MODE = model.TRANSPORTATION_MODE;
                    _registration.TRANSPORTATION_NEED = model.TRANSPORTATION_NEED;
                    _registration.REGD_STATUS         = model.REGD_STATUS;
                    _registration.UPDATE_DATE         = model.UPDATE_DATE;
                    _registration.UPDATED_BY          = model.UPDATED_BY;
                    _registration.NOTES         = model.NOTES;
                    _registration.ADMIN_NOTES   = model.ADMIN_NOTES;
                    _registration.CANCEL_REASON = model.CANCEL_REASON;

                    context.SaveChanges();
                }
            }
            catch (Exception ex)
            {
                throw ex;
                // save = false;
            }
            return(save);
        }
        /// <summary>
        /// MEthod to set the attendance for a registration
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public bool UpdateAttendanceInfo(AttendanceReportModel model)
        {
            bool save = true;

            try
            {
                using (LBCData context = new LBCData(ConnectionHelper.getConnectionString()))
                {
                    var _attend = (from rg in context.LBC_REGISTRATION
                                   where rg.STARS_ID == model.STARS_ID && rg.EVENT_ID == model.EVENT_ID
                                   select rg).FirstOrDefault();



                    _attend.ATTENDED    = model.ATTENDED;
                    _attend.UPDATE_DATE = DateTime.Now;
                    _attend.UPDATED_BY  = System.Web.HttpContext.Current.Session["w_user"].ToString();

                    context.SaveChanges();
                }
            }
            catch (Exception ex)
            {
                throw ex;
                // save = false;
            }
            return(save);
        }
Exemple #13
0
        /// <summary>
        /// Insert the guest registration record
        /// </summary>
        /// <param name="model"></param>
        public void SaveGuestRegistration(GuestRegistrationModel model)
        {
            using (LBCData context = new LBCData(ConnectionHelper.getConnectionString()))
            {
                LBC_GUEST_REGISTRATION _registration = new LBC_GUEST_REGISTRATION()
                {
                    WSLX_ID             = model.WSLX_ID,
                    FIRST_NAME          = model.FIRST_NAME,
                    LAST_NAME           = model.LAST_NAME,
                    COMPANY_NAME        = model.COMPANY_NAME,
                    DEPARTMENT          = model.DEPARTMENT,
                    TITLE               = model.TITLE,
                    EMAIL_ID            = model.EMAIL_ID,
                    PHONE               = model.PHONE,
                    DIETARY_RESTRICTION = model.DIETARY_RESTRICTION,
                    PROFILE_NOTE        = model.PROFILE_NOTE,
                    HOTEL_REQUIRED      = model.HOTEL_REQUIRED,
                    CREATED_BY          = model.CREATED_BY,
                    CREATED_DATE        = model.CREATED_DATE
                };

                context.LBC_GUEST_REGISTRATION.Add(_registration);
                context.SaveChanges();
            }
        }
        public void SaveProfileWslxId(ProfileModel model)
        {
            LBC_PROFILE _profile = new LBC_PROFILE();

            using (LBCData context = new LBCData(ConnectionHelper.getConnectionString()))
            {
                _profile              = MapLBC_PROFILEFromModel(model);
                _profile.CREATED_BY   = _profile.WSLX_ID;
                _profile.CREATED_DATE = DateTime.Now;
                context.LBC_PROFILE.Add(_profile);
                context.SaveChanges();
            }
        }
        public void SaveProfilUploadImage(string photoPath, string starsId)
        {
            using (LBCData context = new LBCData(ConnectionHelper.getConnectionString()))
            {
                var _profile = (from p in context.LBC_PROFILE
                                where p.STARS_ID == starsId
                                select p).FirstOrDefault();

                _profile.PHOTO_PATH  = photoPath;
                _profile.UPDATED_BY  = _profile.WSLX_ID;
                _profile.UPDATE_DATE = DateTime.Now;
                context.SaveChanges();
            }
        }
        public void UpdateWSLXByStarsId(ProfileModel model)
        {
            using (LBCData context = new LBCData(ConnectionHelper.getConnectionString()))
            {
                var _profile = (from p in context.LBC_PROFILE
                                where p.STARS_ID == model.STARS_ID
                                select p).FirstOrDefault();

                _profile.WSLX_ID     = model.WSLX_ID;
                _profile.UPDATED_BY  = model.WSLX_ID;
                _profile.UPDATE_DATE = DateTime.Now;

                context.SaveChanges();
            }
        }
Exemple #17
0
        public void SaveGuestRegistrationSession(GuestSessionModel model)
        {
            using (LBCData context = new LBCData(ConnectionHelper.getConnectionString()))
            {
                LBC_GUEST_REGD_SESSION _registration = new LBC_GUEST_REGD_SESSION()
                {
                    WSLX_ID      = model.WSLX_ID,
                    SESSION_ID   = model.SESSION_ID,
                    CREATED_BY   = model.CREATED_BY,
                    CREATED_DATE = model.CREATED_DATE
                };

                context.LBC_GUEST_REGD_SESSION.Add(_registration);
                context.SaveChanges();
            }
        }
Exemple #18
0
        public bool SaveSurvey(List <SurveyTakenModel> lst, SurveyCompledModel _model)
        {
            bool flag = false;

            try
            {
                using (LBCData context = new LBCData(ConnectionHelper.getConnectionString()))
                {
                    foreach (var item in lst)
                    {
                        LBC_SURVEY_TAKEN _survey = new LBC_SURVEY_TAKEN()
                        {
                            STARS_ID     = item.STARS_ID,
                            SURVEY_ID    = item.SURVEY_ID,
                            QUESTION_ID  = item.QUESTION_ID,
                            ANSWER_ID    = item.ANSWER_ID,
                            ANSWER_MSG   = item.ANSWER_MSG,
                            CREATED_BY   = item.CREATED_BY,
                            CREATED_DATE = DateTime.Now
                        };
                        context.LBC_SURVEY_TAKEN.Add(_survey);
                    }
                    LBC_SURVERY_COMPLETED _survey_completed = new LBC_SURVERY_COMPLETED()
                    {
                        COMPLETED_DATE = DateTime.Now,
                        SURVEY_ID      = _model.SURVEY_ID,
                        STARS_ID       = _model.STARS_ID,
                        PA_CODE        = _model.PA_CODE,
                        CREATED_DATE   = _model.CREATED_DATE,
                        CREATED_BY     = _model.CREATED_BY
                    };

                    context.LBC_SURVERY_COMPLETED.Add(_survey_completed);

                    context.SaveChanges();
                    flag = true;
                }
            }

            catch (Exception ex)
            {
                flag = false;
            }

            return(flag);
        }
        public void UpdateProfileByStarsIdAdmin(ProfileModel model)
        {
            using (LBCData context = new LBCData(ConnectionHelper.getConnectionString()))
            {
                var _profile = (from p in context.LBC_PROFILE
                                where p.STARS_ID == model.STARS_ID
                                select p).FirstOrDefault();
                _profile.EMAIL_ID    = model.EMAIL_ID;
                _profile.PHONE       = model.PHONE;
                _profile.SHIRT_SIZE  = model.SHIRT_SIZE;
                _profile.ADMIN_NOTES = model.ADMIN_NOTES;
                _profile.UPDATED_BY  = model.WSLX_ID;
                _profile.UPDATE_DATE = DateTime.Now;

                context.SaveChanges();
            }
        }
 /// <summary>
 /// Save the checkpoint tracking
 /// </summary>
 /// <param name="model"></param>
 public void SaveCheckpointTracking(CheckpointTracking model)
 {
     using (LBCData context = new LBCData(ConnectionHelper.getConnectionString()))
     {
         LBC_CHECKPOINT_TRACKING _checkpointTrack = new LBC_CHECKPOINT_TRACKING()
         {
             STARS_ID      = model.STARS_ID,
             PA_CODE       = model.PA_CODE,
             DOC_URL       = model.DOC_URL,
             FILE_NAME     = model.FILE_NAME,
             DOWNLOAD_TIME = model.DOWNLOAD_TIME,
             CHECKPOINT_ID = model.CHECKPOINT_ID,
             CREATED_DATE  = model.CREATED_DATE,
             CREATED_BY    = model.CREATED_BY
         };
         context.LBC_CHECKPOINT_TRACKING.Add(_checkpointTrack);
         context.SaveChanges();
     }
 }
 /// <summary>
 /// Saves the user entered checkpoint info.
 /// </summary>
 /// <param name="model"></param>
 public void SaveCheckpointOrder(CheckpointCompletedModel model)
 {
     using (LBCData context = new LBCData(ConnectionHelper.getConnectionString()))
     {
         LBC_CHECKPOINT_COMPLETED _checkOrder = new LBC_CHECKPOINT_COMPLETED()
         {
             STARS_ID        = model.STARS_ID,
             PA_CODE         = model.PA_CODE,
             SHIPPING_STATUS = "Submitted",
             CHECKPOINT_ID   = model.CHECKPOINT_ID,
             EMAIL_ID        = model.EMAIL_ID,
             TOOL_ORDERED    = model.TOOL_ORDERED,
             CREATED_DATE    = model.CREATED_DATE,
             CREATED_BY      = model.CREATED_BY
         };
         context.LBC_CHECKPOINT_COMPLETED.Add(_checkOrder);
         context.SaveChanges();
     }
 }
Exemple #22
0
 public long AddLOGIN_TRACKING(LoginTrackingModel model)
 {
     try
     {
         LBC_LOGIN_TRACKING _login = new LBC_LOGIN_TRACKING();
         using (LBCData context = new LBCData(ConnectionHelper.getConnectionString()))
         {
             model.SEQ_ID = GetNextSeqLoginTracking();
             _login       = MapLBCLogInTrackingFromModel(model);
             context.LBC_LOGIN_TRACKING.Add(_login);
             context.SaveChanges();
         }
         return(1);
     }
     catch (Exception ex)
     {
         var exdata = ex.Data.ToString();
         return(0);
     }
 }
 /// <summary>
 /// Save all the clicks for the users when they download a document
 /// </summary>
 /// <param name="model"></param>
 public void SaveResourceTracking(ResourceTracking model)
 {
     using (LBCData context = new LBCData(ConnectionHelper.getConnectionString()))
     {
         LBC_RESOURCE_TRACKING _resourceTrack = new LBC_RESOURCE_TRACKING()
         {
             STARS_ID      = model.STARS_ID,
             WSL_ID        = model.WSL_ID,
             PA_CODE       = model.PA_CODE,
             DOC_URL       = model.DOC_URL,
             FILE_NAME     = model.FILE_NAME,
             DOWNLOAD_TIME = model.DOWNLOAD_TIME,
             SECTION       = model.SECTION,
             CREATED_DATE  = model.CREATED_DATE,
             CREATED_BY    = model.CREATED_BY
         };
         context.LBC_RESOURCE_TRACKING.Add(_resourceTrack);
         context.SaveChanges();
     }
 }
        public void UpdateProfileByStarsId(ProfileModel model)
        {
            using (LBCData context = new LBCData(ConnectionHelper.getConnectionString()))
            {
                var _profile = (from p in context.LBC_PROFILE
                                where p.STARS_ID == model.STARS_ID
                                select p).FirstOrDefault();

                _profile.BIOGRAPHY = model.BIOGRAPHY;
                //_profile.CREATED_BY = model.CREATED_BY;
                //_profile.CREATED_DATE = model.CREATED_DATE;
                _profile.DEPARTMENT          = model.DEPARTMENT;
                _profile.DIETARY_RESTRICTION = model.DIETARY_RESTRICTION;
                _profile.DLR_ADDRESS         = model.DLR_ADDRESS;
                _profile.DLR_CITY            = model.DLR_CITY;
                //_profile.DLR_NAME = model.DLR_NAME;
                //_profile.DLR_PHONE = model.DLR_PHONE;
                //_profile.DLR_REGION = model.DLR_REGION;
                _profile.DLR_STATE = model.DLR_STATE;
                _profile.DLR_ZIP   = model.DLR_ZIP;
                _profile.EMAIL_ID  = model.EMAIL_ID;
                //_profile.EMP_STATUS_CODE = model.EMP_STATUS_CODE;
                _profile.FIRST_NAME = model.FIRST_NAME;
                _profile.LAST_NAME  = model.LAST_NAME;
                _profile.BADGE_NAME = model.BADGE_NAME;
                //_profile.LBC_CERT = model.LBC_CERT;
                _profile.PA_CODE = model.PA_CODE;
                _profile.PHONE   = model.PHONE;
                //_profile.PHOTO_PATH = model.PHOTO_PATH;
                _profile.PROFILE_NOTE = model.PROFILE_NOTE;
                _profile.PROFILE_TYPE = model.PROFILE_TYPE;
                _profile.SHIRT_SIZE   = model.SHIRT_SIZE;
                _profile.TITLE        = model.TITLE;
                //_profile.STARS_ID = model.STARS_ID;
                //_profile.WSLX_ID = model.WSLX_ID;
                _profile.UPDATED_BY  = model.WSLX_ID;
                _profile.UPDATE_DATE = DateTime.Now;

                context.SaveChanges();
            }
        }
        /// <summary>
        /// Method to Update the FlightInfo Table
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public bool UpdateFlightInfo(FlightInfoModel model)
        {
            bool save = true;

            try
            {
                using (LBCData context = new LBCData(ConnectionHelper.getConnectionString()))
                {
                    var _flightInfo = (from p in context.LBC_FLIGHT_INFO
                                       where p.STARS_ID == model.STARS_ID && p.EVENT_ID == model.EVENT_ID
                                       select p).FirstOrDefault();
                    _flightInfo.ARR_DATE                = model.ARR_DATE;
                    _flightInfo.ARR_TIME                = model.ARR_TIME;
                    _flightInfo.ARR_AIRLINE             = model.ARR_AIRLINE;
                    _flightInfo.ARR_FLIGHT_NUM          = model.ARR_FLIGHT_NUM;
                    _flightInfo.ARR_CITY                = model.ARR_CITY;
                    _flightInfo.ARR_DEP_CITY            = model.ARR_DEP_CITY;
                    _flightInfo.ARR_TERMINAL            = model.ARR_TERMINAL;
                    _flightInfo.CONNECTING_FLIGHT_NOTES = model.CONNECTING_FLIGHT_NOTES;
                    _flightInfo.DEP_DATE                = model.DEP_DATE;
                    _flightInfo.DEP_AIRLINE             = model.DEP_AIRLINE;
                    _flightInfo.DEP_FLIGHT_NUM          = model.DEP_FLIGHT_NUM;
                    _flightInfo.DEP_CITY                = model.DEP_CITY;
                    _flightInfo.DEP_DEST_CITY           = model.DEP_DEST_CITY;
                    _flightInfo.DEP_TIME                = model.DEP_TIME;
                    _flightInfo.MULTI_FLAG              = model.MULTI_FLAG;
                    _flightInfo.UPDATE_DATE             = model.UPDATE_DATE;
                    _flightInfo.UPDATED_BY              = model.UPDATED_BY;

                    context.SaveChanges();
                }
            }
            catch (Exception ex)
            {
                throw ex;
                // save = false;
            }
            return(save);
        }
Exemple #26
0
        /// <summary>
        /// Update the event count to check the max;
        /// </summary>
        /// <param name="model"></param>
        public void UpdateEventCount(StoryCategoryModel model)
        {
            // LBC_STORY_CATEGORY _event = new LBC_STORY_CATEGORY();
            // bool flag = false;
            try
            {
                using (LBCData context = new LBCData(ConnectionHelper.getConnectionString()))
                {
                    var _event = (from p in context.LBC_STORY_CATEGORY
                                  where p.SEQ_ID == model.SEQ_ID
                                  select p).FirstOrDefault();

                    _event.CATEG_NAME = model.CATEG_NAME;
                    context.SaveChanges();
                }
            }

            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemple #27
0
        /// <summary>
        /// Method to Update the Registration Table
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public bool UpdateStory(StoryModel model)
        {
            bool save = true;

            try
            {
                using (LBCData context = new LBCData(ConnectionHelper.getConnectionString()))
                {
                    var _story = (from p in context.LBC_STORY
                                  where p.SEQ_ID == model.SEQ_ID
                                  select p).FirstOrDefault();



                    _story.STORY_TITLE       = model.STORY_TITLE;
                    _story.STORY_CONTENT     = model.STORY_CONTENT;
                    _story.STORY_RATING      = model.STORY_RATING;
                    _story.STORY_CATEGORY    = model.STORY_CATEGORY;
                    _story.STORY_SUBCATEGORY = model.STORY_SUBCATEGORY;
                    _story.SUBMISION_DATE    = model.SUBMISION_DATE;
                    _story.STORY_STATUS      = model.STORY_STATUS;
                    _story.UPDATED_DATE      = model.UPDATED_DATE;
                    _story.UPDATED_BY        = model.UPDATED_BY;
                    _story.IMG_1             = model.IMG_1;
                    _story.IMG_2             = model.IMG_2;
                    _story.IMG_3             = model.IMG_3;


                    context.SaveChanges();
                }
            }
            catch (Exception ex)
            {
                throw ex;
                // save = false;
            }
            return(save);
        }
Exemple #28
0
        /// <summary>
        /// Method to Create entry
        /// </summary>
        /// <param name="model"></param>
        public void SaveHotelInfo(HotelCarModel model)
        {
            using (LBCData context = new LBCData(ConnectionHelper.getConnectionString()))
            {
                LBC_HOTEL_CAR_INFO _hotel = new LBC_HOTEL_CAR_INFO()
                {
                    STARS_ID        = model.STARS_ID,
                    EVENT_ID        = model.EVENT_ID,
                    HOTEL_NAME      = model.HOTEL_NAME,
                    HOTEL_CONF      = model.HOTEL_CONF,
                    HOTEL_CHECK_IN  = model.HOTEL_CHECK_IN,
                    HOTEL_CHECK_OUT = model.HOTEL_CHECK_OUT,
                    CAR_CONFIRM     = model.CAR_CONFIRM,
                    ADMIN_NOTES     = model.ADMIN_NOTES,
                    CAR_NOTES       = model.CAR_NOTES,
                    CREATED_DATE    = model.CREATED_DATE,
                    CREATED_BY      = model.CREATED_BY
                };

                context.LBC_HOTEL_CAR_INFO.Add(_hotel);
                context.SaveChanges();
            }
        }
        /// <summary>
        /// Method that Provide the Stars Id validation on the pop up
        /// If the user Exist it will update other wise kick them out
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public bool UpdateProfileWslxIdByStarsId(ProfileModel model)
        {
            bool flag = false;

            using (LBCData context = new LBCData(ConnectionHelper.getConnectionString()))
            {
                var _profile = (from p in context.LBC_PROFILE
                                where p.STARS_ID == model.STARS_ID && p.PA_CODE == model.PA_CODE && p.EMP_STATUS_CODE == "A"
                                select p).FirstOrDefault();

                if (_profile != null)
                {
                    _profile.STARS_ID    = model.STARS_ID;
                    _profile.WSLX_ID     = model.WSLX_ID;
                    _profile.UPDATED_BY  = model.WSLX_ID;
                    _profile.UPDATE_DATE = DateTime.Now;

                    context.SaveChanges();
                    flag = true;
                }
            }
            return(flag);
        }
        /// <summary>
        /// Method to Insert the data on the Registration table
        /// </summary>
        /// <param name="model"></param>
        public void SaveRegistration(RegistrationModel model)
        {
            using (LBCData context = new LBCData(ConnectionHelper.getConnectionString()))
            {
                LBC_REGISTRATION _registration = new LBC_REGISTRATION()
                {
                    STARS_ID            = model.STARS_ID,
                    EVENT_ID            = model.EVENT_ID,
                    WSLX_ID             = model.WSLX_ID,
                    PA_CODE             = model.PA_CODE,
                    REGD_STATUS         = "A",
                    TRANSPORTATION_MODE = model.TRANSPORTATION_MODE,
                    TRANSPORTATION_NEED = model.TRANSPORTATION_NEED,
                    CREATED_DATE        = model.CREATED_DATE,
                    CREATED_BY          = model.CREATED_BY,
                    NOTES       = model.NOTES,
                    ADMIN_NOTES = model.ADMIN_NOTES
                };

                context.LBC_REGISTRATION.Add(_registration);
                context.SaveChanges();
            }
        }