예제 #1
0
        public bool CopyContacts(int SourceAccomodationId, int DestinationAccomodationId)
        {
            string          sProcName;
            DatabaseManager oDB;

            try
            {
                oDB = new DatabaseManager();

                sProcName = "up_Copy_AccomodationContacts";
                oDB.DbCmd = oDB.GetStoredProcCommand(sProcName);
                oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@iSourceAccomodationId", DbType.Int32, SourceAccomodationId);
                oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@iDestinationAccomodationId", DbType.Int32, DestinationAccomodationId);
                oDB.ExecuteNonQuery(oDB.DbCmd);
            }
            catch (Exception exp)
            {
                GF.LogError("clsAccomodationContact.CopyContacts", exp.Message.ToString());
                oDB = null;
                return(false);
            }
            finally
            {
                oDB = null;
            }
            return(true);
        }
예제 #2
0
        public bool Delete(EventMessageDTO oEventMessageData)
        {
            string          sProcName;
            DatabaseManager oDB;

            try
            {
                oDB = new DatabaseManager();

                sProcName = "up_Del_EventMessage";
                oDB.DbCmd = oDB.GetStoredProcCommand(sProcName);
                oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@iMessageId", DbType.Int32, oEventMessageData.MessageId);
                oDB.ExecuteNonQuery(oDB.DbCmd);
            }
            catch (Exception exp)
            {
                GF.LogError("clsEventMessage.Delete", exp.Message.ToString());
                oDB = null;
                return(false);
            }
            finally
            {
                oDB = null;
            }
            return(true);
        }
예제 #3
0
        public bool Delete(SMTPDTO SMTPDTO)
        {
            string          sProcName;
            DatabaseManager oDB;

            try
            {
                oDB = new DatabaseManager();

                sProcName = "up_Del_SMTPMaster";
                oDB.DbCmd = oDB.GetStoredProcCommand(sProcName);
                oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@SMTPID", DbType.String, SMTPDTO.SMTPId);
                oDB.ExecuteNonQuery(oDB.DbCmd);
            }
            catch (Exception exp)
            {
                GF.LogError("clsSMTPMaster.Delete", exp.Message.ToString());
                oDB = null;
                return(false);
            }
            finally
            {
                oDB = null;
            }
            return(true);
        }
예제 #4
0
    protected void dgBookings_ItemCommand(object source, DataGridCommandEventArgs e)
    {
        string cFormUrl = string.Empty;

        try
        {
            if (e.Item.ItemIndex >= 0)
            {
                int iBookingID = Convert.ToInt32(dgTouristCount.DataKeys[e.Item.ItemIndex].ToString());
                switch (e.CommandName.ToString().ToUpper())
                {
                case "VIEWBOOKING":
                    Response.Redirect("Booking.aspx?bid=" + iBookingID.ToString() + "&mode=view");
                    break;

                case "VIEWTOURIST":
                    Response.Redirect("ViewTourists.aspx?bid=" + iBookingID.ToString());
                    break;

                default:
                    break;
                }
            }
        }
        catch (Exception exp)
        {
            GF.LogError("TouristCount.dgBookings_ItemCommand", exp.Message);
            return;
        }
    }
예제 #5
0
        public bool CancelBookingConfirmation(int BookingId)
        {
            BookingMealPlanHandler oBMPH;
            string sProcName;

            try
            {
                if (oDB == null)
                {
                    oDB = new DatabaseManager();
                }
                oBMPH = new BookingMealPlanHandler();
                oBMPH.DeleteBookingMealPlan(BookingId);

                sProcName = "up_Booking_Confirmation_Cancel";
                oDB.DbCmd = oDB.GetStoredProcCommand(sProcName);
                oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@iBookingID", DbType.Int32, BookingId);
                oDB.ExecuteNonQuery(oDB.DbCmd);
            }
            catch (Exception exp)
            {
                GF.LogError("clsBookingConfirmationHandler.CancelBookingConfirmation", exp.Message);
                return(false);
            }
            return(true);
        }
예제 #6
0
        public bool Update(DepartmentDTO oDepartmentData)
        {
            string          sProcName;
            DatabaseManager oDB;

            try
            {
                oDB = new DatabaseManager();

                sProcName = "up_Upd_DepartmentMaster";
                oDB.DbCmd = oDB.GetStoredProcCommand(sProcName);
                oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@DepartmentId", DbType.Int32, oDepartmentData.DepartmentId);
                oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@sDepartmentCode", DbType.String, oDepartmentData.DepartmentCode);
                oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@sDepartmentName", DbType.String, oDepartmentData.DepartmentName);
                oDB.ExecuteNonQuery(oDB.DbCmd);
            }
            catch (Exception exp)
            {
                oDB             = null;
                oDepartmentData = null;
                GF.LogError("clsDepartmentMaster.Insert", exp.Message);
                return(false);
            }
            finally
            {
                oDepartmentData = null;
                oDB             = null;
            }
            return(true);
        }
예제 #7
0
        public TreeTypeDTO GetDefaultTreeType()
        {
            DataSet         dsTreeTypeDefault = null;
            DataRow         dr = null;
            DatabaseManager oDB;
            TreeTypeDTO     oTreeTypeDefault = null;
            string          sProcName;

            dsTreeTypeDefault = null;
            oTreeTypeDefault  = null;

            try
            {
                oDB               = new DatabaseManager();
                sProcName         = "up_Get_TreeTypeDefault";
                oDB.DbCmd         = oDB.GetStoredProcCommand(sProcName);
                dsTreeTypeDefault = oDB.ExecuteDataSet(oDB.DbCmd);

                if (dsTreeTypeDefault != null)
                {
                    oTreeTypeDefault = new TreeTypeDTO();
                    dr = dsTreeTypeDefault.Tables[0].Rows[0];
                    oTreeTypeDefault.TreeTypeId  = Convert.ToInt32(dr.ItemArray.GetValue(0));
                    oTreeTypeDefault.TreeType    = Convert.ToString(dr.ItemArray.GetValue(1));
                    oTreeTypeDefault.Description = Convert.ToString(dr.ItemArray.GetValue(2));
                    oTreeTypeDefault.Selected    = Convert.ToBoolean(dr.ItemArray.GetValue(3));
                }
            }
            catch (Exception exp)
            {
                GF.LogError("clsTreeTypeMaster.GetTreeType", exp.Message);
            }
            return(oTreeTypeDefault);
        }
예제 #8
0
        public bool Update(BookingStatusDTO oBookingStatusData)
        {
            string          sProcName;
            DatabaseManager oDB;

            try
            {
                oDB = new DatabaseManager();

                sProcName = "up_Upd_BookingStatusMaster";
                oDB.DbCmd = oDB.GetStoredProcCommand(sProcName);
                oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@iBookingStatusId", DbType.Int32, oBookingStatusData.BookingStatusId);
                oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@sBookingStatusType", DbType.String, oBookingStatusData.BookingStatusType);
                oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@iBookingStatusColor", DbType.Int64, oBookingStatusData.BookingStatusColor);
                oDB.ExecuteNonQuery(oDB.DbCmd);
            }
            catch (Exception exp)
            {
                oDB = null;
                oBookingStatusData = null;
                GF.LogError("clsBookingStatusMaster.Update", exp.Message);
                return(false);
            }
            finally
            {
                oBookingStatusData = null;
                oDB = null;
            }
            return(true);
        }
예제 #9
0
        public bool Insert(AccomodationDTO oAccomData)
        {
            string          sProcName;
            DatabaseManager oDB;

            try
            {
                oDB       = new DatabaseManager();
                sProcName = "up_Ins_AccomodationMaster";
                oDB.DbCmd = oDB.GetStoredProcCommand(sProcName);
                oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@iAccomodationTypeId", DbType.Int32, oAccomData.AccomodationTypeId);
                oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@sAccomodation", DbType.String, oAccomData.AccomodationName);
                oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@RegionId", DbType.Int32, oAccomData.RegionId);
                oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@AccomInitial", DbType.String, oAccomData.AccomInitial);
                oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@AccomPolicyUrl", DbType.String, oAccomData.AccomPolicyUrl);
                int accomId = Convert.ToInt32(oDB.ExecuteScalar(oDB.DbCmd));
            }
            catch (Exception exp)
            {
                GF.LogError("clsAccomodationMaster.Insert", exp.Message.ToString());
                oDB = null;
                return(false);
            }
            finally
            {
                oDB = null;
            }
            return(true);
        }
예제 #10
0
        public bool Insert(RoomTypeDTO oRoomTypeData)
        {
            string          sProcName;
            DatabaseManager oDB;

            try
            {
                oDB       = new DatabaseManager();
                sProcName = "up_Ins_RoomTypeMaster";
                oDB.DbCmd = oDB.GetStoredProcCommand(sProcName);
                oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@sRoomType", DbType.String, oRoomTypeData.RoomType.Trim());
                oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@iDefaultNoOfBeds", DbType.Int32, oRoomTypeData.DefaultNoOfBeds);
                oDB.ExecuteNonQuery(oDB.DbCmd);
            }
            catch (Exception exp)
            {
                oDB           = null;
                oRoomTypeData = null;
                GF.LogError("clsRoomtypeMaster.Insert", exp.Message);
                return(false);
            }
            finally
            {
                oDB           = null;
                oRoomTypeData = null;
            }
            return(true);
        }
예제 #11
0
        public bool Update(FloorDTO oFloorData)
        {
            string          sProcName;
            DatabaseManager oDB;

            try
            {
                oDB       = new DatabaseManager();
                sProcName = "up_Upd_FloorMaster";
                oDB.DbCmd = oDB.GetStoredProcCommand(sProcName);
                oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@iFloorID", DbType.Int32, oFloorData.FloorId);
                oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@iFloor", DbType.Int32, oFloorData.Floor);
                oDB.ExecuteNonQuery(oDB.DbCmd);
            }
            catch (Exception exp)
            {
                oDB        = null;
                oFloorData = null;
                GF.LogError("clsFloorMaster.Update", exp.Message);
                return(false);
            }
            finally
            {
                oDB        = null;
                oFloorData = null;
            }
            return(true);
        }
예제 #12
0
        public bool Insert(UserRoleDTO oUserRoleData)
        {
            string          sProcName;
            DatabaseManager oDB;

            try
            {
                oDB = new DatabaseManager();

                sProcName = "up_Ins_UserRoleMaster";
                oDB.DbCmd = oDB.GetStoredProcCommand(sProcName);
                oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@UserRoleName", DbType.String, oUserRoleData.UserRoleName);
                oDB.ExecuteNonQuery(oDB.DbCmd);
            }
            catch (Exception exp)
            {
                oDB           = null;
                oUserRoleData = null;
                GF.LogError("clsUserRoleMaster.Insert", exp.Message);
                return(false);
            }
            finally
            {
                oUserRoleData = null;
                oDB           = null;
            }
            return(true);
        }
예제 #13
0
        private bool GenerateCFormNumbers(int bookingId)
        {
            DatabaseManager oDB = null;

            try
            {
                if (oDB == null)
                {
                    oDB = new DatabaseManager();
                }
                string sProcName = "up_Upd_BookingCFormNos";
                oDB.DbCmd = oDB.GetStoredProcCommand(sProcName);
                oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@bookingId", DbType.Int32, bookingId);
                oDB.ExecuteNonQuery(oDB.DbCmd);
            }
            catch (Exception exp)
            {
                oDB = null;
                GF.LogError("clsBCFormReport.GenerateCFormNumbers", exp.Message);
                return(false);
            }
            finally
            {
                oDB = null;
            }
            return(true);
        }
예제 #14
0
        public bool DeleteRemovedRoomCategoryAndType(BookedRooms[] TotallyRemovedRCRT)
        {
            DatabaseManager oDB;

            try
            {
                oDB = new DatabaseManager();
                string sProcName = "up_DeleteRemovedRoomCategoryAndType";
                for (int i = 0; i < TotallyRemovedRCRT.Length; i++)
                {
                    oDB.DbCmd = oDB.GetStoredProcCommand(sProcName);
                    oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@BookingId", DbType.Int32, TotallyRemovedRCRT[i].BookingId);
                    oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@AccomID", DbType.Int32, TotallyRemovedRCRT[i].AccomodationId);
                    oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@RoomCategory", DbType.String, TotallyRemovedRCRT[i].RoomCategory);
                    oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@RoomType", DbType.String, TotallyRemovedRCRT[i].RoomType);
                    oDB.ExecuteNonQuery(oDB.DbCmd);
                    oDB.DbCmd.Parameters.Clear();
                }
            }
            catch (Exception exp)
            {
                oDB = null;
                //oRoomsDeletion = null;
                GF.LogError("clsBookingRoomHandler.DeleteBookings", exp.Message);
                return(false);
            }
            return(true);
        }
예제 #15
0
        public bool Update(AccomTypeDTO oAccomTypeData)
        {
            string          sProcName;
            DatabaseManager oDB;

            try
            {
                oDB       = new DatabaseManager();
                sProcName = "up_Upd_AccomodationTypeMaster";
                oDB.DbCmd = oDB.GetStoredProcCommand(sProcName);
                oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@iAccomTypeId", DbType.Int32, oAccomTypeData.AccomodationTypeId);
                oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@sAccomType", DbType.String, oAccomTypeData.AccomodationType);
                oDB.ExecuteNonQuery(oDB.DbCmd);
            }
            catch (Exception exp)
            {
                oDB = null;
                GF.LogError("clsAccomodationMaster.Update", exp.Message);
                return(false);
            }
            finally
            {
                oDB = null;
            }
            return(true);
        }
예제 #16
0
        public bool Update(CityDTO oCityData)
        {
            string          sProcName;
            DatabaseManager oDB;

            try
            {
                oDB = new DatabaseManager();

                sProcName = "up_Upd_CityMaster";
                oDB.DbCmd = oDB.GetStoredProcCommand(sProcName);
                oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@CityId", DbType.Int32, oCityData.CityId);
                oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@sCityCode", DbType.String, oCityData.CityCode);
                oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@sCityName", DbType.String, oCityData.CityName);
                oDB.ExecuteNonQuery(oDB.DbCmd);
            }
            catch (Exception exp)
            {
                oDB       = null;
                oCityData = null;
                GF.LogError("clsCityMaster.Update", exp.Message);
                return(false);
            }
            finally
            {
                oDB       = null;
                oCityData = null;
            }
            return(true);
        }
예제 #17
0
        public bool Update(MealPlanDTO oMealPlanData)
        {
            string          sProcName;
            DatabaseManager oDB;

            try
            {
                oDB = new DatabaseManager();

                sProcName = "up_Upd_MealPlanMaster";
                oDB.DbCmd = oDB.GetStoredProcCommand(sProcName);
                oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@MealPlanId", DbType.Int32, oMealPlanData.MealPlanId);
                oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@sMealPlanCode", DbType.String, oMealPlanData.MealPlanCode);
                oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@sMealPlan", DbType.String, oMealPlanData.MealPlan);
                oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@sMealPlanDesc", DbType.String, oMealPlanData.MealPlanDesc);
                oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@bWelcomeDrink", DbType.Boolean, oMealPlanData.WelcomeDrink);
                oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@bBreakFast", DbType.Boolean, oMealPlanData.Breakfast);
                oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@bLunch", DbType.Boolean, oMealPlanData.Lunch);
                oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@bEveSnacks", DbType.Boolean, oMealPlanData.EveningSnacks);
                oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@bDinner", DbType.Boolean, oMealPlanData.Dinner);
                oDB.ExecuteNonQuery(oDB.DbCmd);
            }
            catch (Exception exp)
            {
                oDB           = null;
                oMealPlanData = null;
                GF.LogError("clsMealPlanMaster.Update", exp.Message);
                return(false);
            }
            finally
            {
                oDB = null;
            }
            return(true);
        }
예제 #18
0
        public bool Delete(RoleRightsDTO roleRights)
        {
            string          sProcName;
            DatabaseManager oDB;

            try
            {
                oDB = new DatabaseManager();

                sProcName = "up_Del_RoleRightsMaster";
                oDB.DbCmd = oDB.GetStoredProcCommand(sProcName);
                oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@roleId", DbType.Int32, roleRights.RoleId);
                oDB.ExecuteNonQuery(oDB.DbCmd);
            }
            catch (Exception exp)
            {
                oDB = null;
                GF.LogError("RoleRightsMaster.Delete", exp.Message);
                throw exp;
            }
            finally
            {
                oDB = null;
            }
            return(true);
        }
예제 #19
0
        public bool Delete(UserAgentMapperDTO userAgentData)
        {
            string          sProcName;
            DatabaseManager oDB;

            try
            {
                oDB       = new DatabaseManager();
                sProcName = "up_Del_UserAgentMaster";

                foreach (AgentDTO agent in userAgentData.AgentList)
                {
                    oDB.DbCmd = oDB.GetStoredProcCommand(sProcName);
                    oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@UserId", DbType.String, userAgentData.UserId);
                    oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@AgentId", DbType.Int32, agent.AgentId);
                    oDB.ExecuteNonQuery(oDB.DbCmd);
                }
            }
            catch (Exception exp)
            {
                oDB           = null;
                userAgentData = null;
                GF.LogError("UserAgentMaster.Delete", exp.Message);
                return(false);
            }
            finally
            {
                oDB = null;
            }
            return(true);
        }
예제 #20
0
        public bool Update(RoomCategoryDTO oRoomCategoryData)
        {
            string          sProcName;
            DatabaseManager oDB;

            try
            {
                oDB       = new DatabaseManager();
                sProcName = "up_Upd_RoomCategoryMaster";
                oDB.DbCmd = oDB.GetStoredProcCommand(sProcName);
                oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@iRoomCategoryID", DbType.Int32, oRoomCategoryData.RoomCategoryId);
                oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@sRoomCategory", DbType.String, oRoomCategoryData.RoomCategory.Trim());
                oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@categoryAlias", DbType.String, oRoomCategoryData.CategoryAlias.Trim());
                oDB.ExecuteNonQuery(oDB.DbCmd);
            }
            catch (Exception exp)
            {
                oDB = null;
                oRoomCategoryData = null;
                GF.LogError("clsRoomCategoryMaster.Update", exp.Message);
                return(false);
            }
            finally
            {
                oDB = null;
                oRoomCategoryData = null;
            }
            return(true);
        }
예제 #21
0
        public BookingTouristDTO[] SearchTourists(string Firstname, string Lastname, string Passportno, int Nationality)
        {
            DataSet ds;

            BookingTouristDTO[] oBookingTouristDTO;
            oBookingTouristDTO = null;

            string sProcName;

            try
            {
                oDB       = new DatabaseManager();
                sProcName = "up_SearchTourists";
                oDB.DbCmd = oDB.GetStoredProcCommand(sProcName);

                oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@sFirstName", DbType.String, DataSecurityManager.Encrypt(Firstname));
                oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@sLastName", DbType.String, DataSecurityManager.Encrypt(Lastname));
                oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@sPassportNo", DbType.String, DataSecurityManager.Encrypt(Passportno));
                oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@iNationalityid", DbType.Int32, Nationality);

                ds  = oDB.ExecuteDataSet(oDB.DbCmd);
                oDB = null;
            }
            catch (Exception exp)
            {
                oDB = null;
                ds  = null;
                GF.LogError("clsBookingTouristhandler.GetTouristDetails", exp.Message);
            }

            oBookingTouristDTO = FillTouristDetails(ds);
            return(oBookingTouristDTO);
        }
        private bool DeleteBookingWaitList(int BookingId, int RoomCategoryId, int RoomTypeId, int AccomId)
        {
            if (oDB == null)
            {
                oDB = new DatabaseManager();
            }
            string sProcName = "up_DeleteBookingWaitlistRooms";

            try
            {
                oDB.DbCmd = oDB.GetStoredProcCommand(sProcName);
                oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@BookingId", DbType.Int32, BookingId);
                oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@RoomCategoryId", DbType.Int32, RoomCategoryId);
                oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@RoomTypeId", DbType.Int32, RoomTypeId);
                oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@AccomId", DbType.Int32, AccomId);
                oDB.ExecuteNonQuery(oDB.DbCmd);
            }
            catch (Exception exp)
            {
                oDB = null;
                GF.LogError("clsBookingWaitListHandler.DeleteBookingWaitList", exp.Message);
                return(false);
            }
            return(true);
        }
예제 #23
0
        public bool Delete(TransportDTO oTransportData)
        {
            string          sProcName;
            DatabaseManager oDB;

            try
            {
                oDB       = new DatabaseManager();
                sProcName = "up_Del_TransportMaster";
                oDB.DbCmd = oDB.GetStoredProcCommand(sProcName);
                oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@TransportId", DbType.Int32, oTransportData.TransportId);
                oDB.ExecuteNonQuery(oDB.DbCmd);
            }
            catch (Exception exp)
            {
                oDB            = null;
                oTransportData = null;
                GF.LogError("clsTransportMaster.Delete", exp.Message);
                return(false);
            }
            finally
            {
                oDB            = null;
                oTransportData = null;
            }
            return(true);
        }
        public bool AllocateRoomsToWaitListedBooking(int BookingId, string RoomList, int RoomCategoryId, int RoomTypeId)
        {
            try
            {
                if (oDB == null)
                {
                    oDB = new DatabaseManager();
                }

                string sProcName = "up_AllocateRooms_To_WaitListedLBookings";
                oDB.DbCmd = oDB.GetStoredProcCommand(sProcName);
                oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@BookingId", DbType.Int32, BookingId);
                oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@RoomNoList", DbType.String, RoomList);
                oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@RoomCategoryId", DbType.Int32, RoomCategoryId);
                oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@RoomTypeId", DbType.Int32, RoomTypeId);
                oDB.ExecuteNonQuery(oDB.DbCmd);
                oDB.DbCmd.Parameters.Clear();
            }
            catch (Exception exp)
            {
                oDB = null;
                GF.LogError("clsBookingWaitListHandler.AllocateRoomsToWaitListedBooking", exp.Message);
                return(false);
            }
            finally
            {
                oDB = null;
            }
            return(true);
        }
예제 #25
0
        public bool Update(EventMessageDTO oEventMessageData)
        {
            string          sProcName;
            DatabaseManager oDB;

            try
            {
                oDB = new DatabaseManager();

                sProcName = "up_Upd_EventMessage";
                oDB.DbCmd = oDB.GetStoredProcCommand(sProcName);
                oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@MessageId", DbType.String, oEventMessageData.MessageId);
                oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@EventName", DbType.String, oEventMessageData.EventName);
                oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@EventMessage", DbType.String, oEventMessageData.EventMessage);
                oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@EventSubject", DbType.String, oEventMessageData.EventSubject);
                oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@MailAllowed", DbType.Boolean, oEventMessageData.MailAllowed);
                oDB.ExecuteNonQuery(oDB.DbCmd);
            }
            catch (Exception exp)
            {
                GF.LogError("clsEventMessageMaster.Update", exp.Message.ToString());
                oDB = null;
                return(false);
            }
            finally
            {
                oDB = null;
            }
            return(true);
        }
예제 #26
0
        public bool DeleteRole(UserRoleDTO UserRoleDTO)
        {
            DatabaseManager oDB;

            oDB = new DatabaseManager();
            string sProcName = "up_DeleteRole";

            oDB.DbCmd = oDB.GetStoredProcCommand(sProcName);
            oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@iRoleID", DbType.Int32, UserRoleDTO.UserRoleId);
            try
            {
                oDB.ExecuteNonQuery(oDB.DbCmd);
                //return true;
            }
            catch (Exception e)
            {
                GF.LogError("clsUserRoleHandler.DeleteRole", e.Message);
                return(false);
            }
            finally
            {
                oDB = null;
            }
            return(true);
        }
예제 #27
0
        public bool Update(SMTPDTO oSMTPData)
        {
            string          sProcName;
            DatabaseManager oDB;

            try
            {
                oDB = new DatabaseManager();

                sProcName = "up_Upd_SMTPMaster";
                oDB.DbCmd = oDB.GetStoredProcCommand(sProcName);
                oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@SMTPID", DbType.String, oSMTPData.SMTPId);
                oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@SMTPServer", DbType.String, oSMTPData.SMTPServer);
                oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@FromId", DbType.String, oSMTPData.FromEmailId);
                oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@ReplyToId", DbType.String, oSMTPData.ReplyToId);
                oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@FromDisplayName", DbType.String, oSMTPData.FromDisplayName);
                oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@UserId", DbType.String, oSMTPData.SMTPUserId);
                oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@Password", DbType.String, oSMTPData.SMTPPassword);
                oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@Port", DbType.Int32, oSMTPData.Port);
                oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@Active", DbType.Boolean, oSMTPData.Active);
                oDB.ExecuteNonQuery(oDB.DbCmd);
            }
            catch (Exception exp)
            {
                GF.LogError("clsSMTPMaster.Update", exp.Message.ToString());
                oDB = null;
                return(false);
            }
            finally
            {
                oDB = null;
            }
            return(true);
        }
예제 #28
0
        public BookingChartTreeDTO[] GetTreeData(out string DefaultTreeTypeCode)
        {
            DataSet         dsTreeData = null;
            DatabaseManager oDB        = null;

            BookingChartTreeDTO[] oBookingChartDTO = null;
            String sProcName       = String.Empty;
            String DefaultTreeType = String.Empty;

            try
            {
                oDB       = new DatabaseManager();
                sProcName = "up_Get_BookingTreeData";
                oDB.DbCmd = oDB.GetStoredProcCommand(sProcName);
                oDB.DbDatabase.AddOutParameter(oDB.DbCmd, "@sDefaultTreeType", DbType.String, 20); //, DefaultTreeType);
                dsTreeData = oDB.ExecuteDataSet(oDB.DbCmd);

                oBookingChartDTO = MapDBDataToObject(dsTreeData);
                DefaultTreeType  = oDB.DbCmd.Parameters[0].Value.ToString();
            }
            catch (Exception exp)
            {
                oDB        = null;
                dsTreeData = null;
                GF.LogError("clsTreeViewManager.GetTreeData", exp.Message);
            }
            DefaultTreeTypeCode = DefaultTreeType;
            return(oBookingChartDTO);
        }
예제 #29
0
    public bool updateStatus(AccomodationDTO oAccomData)
    {
        string          sProcName;
        DatabaseManager oDB;

        try
        {
            oDB = new DatabaseManager();

            sProcName = "up_Upd_Activate";
            oDB.DbCmd = oDB.GetStoredProcCommand(sProcName);
            oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@iAccomId", DbType.Int32, oAccomData.AccomodationId);
            oDB.ExecuteNonQuery(oDB.DbCmd);
        }
        catch (Exception exp)
        {
            GF.LogError("clsAccomodationMaster.updateStatus", exp.Message.ToString());
            oDB = null;
            return(false);
        }
        finally
        {
            oDB = null;
        }
        return(true);
    }
예제 #30
0
        public bool Insert(UserDTO oUserData)
        {
            string          sProcName;
            DatabaseManager oDB;

            try
            {
                oDB = new DatabaseManager();

                sProcName = "up_Ins_UserMaster";
                oDB.DbCmd = oDB.GetStoredProcCommand(sProcName);

                oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@UserId", DbType.String, oUserData.UserId);
                oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@sUserName", DbType.String, DataSecurityManager.Encrypt(oUserData.UserName));
                oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@Password", DbType.String, DataSecurityManager.Encrypt(oUserData.Password));
                oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@Active", DbType.Boolean, oUserData.Active);
                oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@Administrator", DbType.Boolean, oUserData.Administrator);
                oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@UserRoleId", DbType.Int32, oUserData.UserRoleData.UserRoleId);
                oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@UserEmailId", DbType.String, DataSecurityManager.Encrypt(oUserData.EmailId));
                oDB.ExecuteNonQuery(oDB.DbCmd);
            }
            catch (Exception exp)
            {
                oDB       = null;
                oUserData = null;
                GF.LogError("clsUserMaster.Insert", exp.Message);
                return(false);
            }
            finally
            {
                oDB       = null;
                oUserData = null;
            }
            return(true);
        }