public bool IsAllowedActionOnEntity(string actionCode, EntityTypeGUIDRecordUIDPair entityTypeUID) { if (_isSystemAdmin) { return(true); } int allow = 0; int retVal = ActionProcedures.CanUserExecActionOnEntity(entityTypeUID.EntityTypeGUID, entityTypeUID.RecordUID, _uid, actionCode, ref allow); if (allow == 1) { return(true); } //TODO, Make this a global settable flag. bool NotSetWillAllow = true; //If the value returned is not set, we chekc the gloabl flag to find out if user is allowed or not if (allow == -1) { if (NotSetWillAllow) { return(true); } else { return(false); } } return(false); }
public int AddSeason(MvSeason season) { seasonId = 0; ActionProcedures.SpSeasonIns(JsonConvert.SerializeObject(season, new JsonSerializerSettings { ContractResolver = new CamelCasePropertyNamesContractResolver() }), ref seasonId); return(seasonId); }
public int AddRoom(MvRoom room) { roomId = 0; ActionProcedures.SpRoomIns(JsonConvert.SerializeObject(room, new JsonSerializerSettings { ContractResolver = new CamelCasePropertyNamesContractResolver() }), ref roomId); return(roomId); }
public int AddReservation(MvReservation reservation) { reservationId = 0; ActionProcedures.SpReservationIns(JsonConvert.SerializeObject(reservation, new JsonSerializerSettings { ContractResolver = new CamelCasePropertyNamesContractResolver() }), ref reservationId); return(reservationId); }
public int AddServiceCategory(MvServiceCategory serviceCategory) { serviceCategoryId = 0; ActionProcedures.SpServiceCategoryIns(JsonConvert.SerializeObject(serviceCategory, new JsonSerializerSettings { ContractResolver = new CamelCasePropertyNamesContractResolver() }), ref serviceCategoryId); return(serviceCategoryId); }
public int AddHotel(MvHotel hotel) { hotelId = 0; ActionProcedures.SpHotelIns(JsonConvert.SerializeObject(hotel, new JsonSerializerSettings { ContractResolver = new CamelCasePropertyNamesContractResolver() }), ref hotelId); return(hotelId); }
public bool SaveEventAffiliate(long eventCustomerId, long?callId) { long returnParameter = 0; var returnValue = ActionProcedures.SaveEventAffiliate(eventCustomerId, callId.HasValue ? callId.Value : 0, ref returnParameter); return(true); }
public string AddCustomer(MvCustomer customer) { string json = string.Empty; ActionProcedures.SpCustomerIns(JsonConvert.SerializeObject(customer, new JsonSerializerSettings { ContractResolver = new CamelCasePropertyNamesContractResolver() }), ref json); return(json); }
public string AddBooking(MvBooking booking) { string json = string.Empty; ActionProcedures.SpBookingIns(JsonConvert.SerializeObject(booking, new JsonSerializerSettings { ContractResolver = new CamelCasePropertyNamesContractResolver() }), ref json); return(json); }
/// <summary> /// Initializes the system, by running a stored procedure passing in the new admin password. /// </summary> /// <param name="newAdminPassword"></param> /// <param name="emailAddress"></param> /// <returns></returns> public static async Task Initialize(string newAdminPassword, string emailAddress) { if (string.IsNullOrWhiteSpace(newAdminPassword)) { return; } var passwordHashed = HnDGeneralUtils.HashPassword(newAdminPassword, performPreMD5Hashing: true); using (var adapter = new DataAccessAdapter()) { await ActionProcedures.InstallAsync(emailAddress, passwordHashed, adapter, CancellationToken.None); CacheController.PurgeResultsets(CacheKeys.AnonymousUserQueryResultset); } }
public void EditServiceCategory(MvServiceCategory serviceCategory) { ActionProcedures.SpServiceCategoryUpd(JsonConvert.SerializeObject(serviceCategory, new JsonSerializerSettings { ContractResolver = new CamelCasePropertyNamesContractResolver() })); }
public void EditCustomer(MvCustomer customer) { ActionProcedures.SpCustomerUpd(JsonConvert.SerializeObject(customer, new JsonSerializerSettings { ContractResolver = new CamelCasePropertyNamesContractResolver() })); }
public void DeleteServiceCategory(int serviceCategoryId) { ActionProcedures.SpServiceCategoryDel(serviceCategoryId); }
public void DeleteHotel(int hotelId) { ActionProcedures.SpHotelDel(hotelId); }
public void EditReservation(MvReservation reservation) { ActionProcedures.SpReservationUpd(JsonConvert.SerializeObject(reservation, new JsonSerializerSettings { ContractResolver = new CamelCasePropertyNamesContractResolver() })); }
public void DeleteSeason(int seasonId) { ActionProcedures.SpSeasonDel(seasonId); }
public void DeleteService(int serviceId) { ActionProcedures.SpServiceDel(serviceId); }
public void DeleteCustomer(int customerId) { ActionProcedures.SpCustomerDel(customerId); }
public void DeleteRoom(int roomId) { ActionProcedures.SpRoomDel(roomId); }
public void EditRoom(MvRoom room) { ActionProcedures.SpRoomUpd(JsonConvert.SerializeObject(room, new JsonSerializerSettings { ContractResolver = new CamelCasePropertyNamesContractResolver() })); }
public void EditBranch(MvBranch branch) { ActionProcedures.SpBranchUpd(JsonConvert.SerializeObject(branch, new JsonSerializerSettings { ContractResolver = new CamelCasePropertyNamesContractResolver() })); }
public void DeleteBranch(int branchId) { ActionProcedures.SpBranchDel(branchId); }
public void DeleteBooking(int bookingId) { ActionProcedures.SpBookingDel(bookingId); }
public void DeleteReservation(int reservationId) { ActionProcedures.SpReservationDel(reservationId); }
public void EditBooking(MvBooking booking) { ActionProcedures.SpBookingUpd(JsonConvert.SerializeObject(booking, new JsonSerializerSettings { ContractResolver = new CamelCasePropertyNamesContractResolver() })); }
public void EditHotel(MvHotel hotel) { ActionProcedures.SpHotelUpd(JsonConvert.SerializeObject(hotel, new JsonSerializerSettings { ContractResolver = new CamelCasePropertyNamesContractResolver() })); }