public static DataTable CheckPassword(string CategoryID,string password) { try { clsParameterCollection ParameterCollection = new clsParameterCollection(); ParameterCollection.ProcedureName = "BS_CheckCategory"; ParameterCollection.Add(new clsParameter("@CategoryId", Convert.ToInt32(CategoryID))); ParameterCollection.Add(new clsParameter("@Password", password)); return DataAccess.ExecuteSpAndGetDataTable(ParameterCollection); } catch (Exception Ex) { if (!Ex.Message.Contains("User Define:")) BL_Exception.WriteLog(Ex); throw Ex; } }
/// <summary> /// This method is used to get roles. /// </summary> /// <param name="ApplicationName"></param> /// <returns></returns> public static DataTable GetRoles(string ApplicationName, string RoleName) { try { clsParameterCollection ParameterCollection = new clsParameterCollection(); ParameterCollection.ProcedureName = "BS_PermissionManagement_GetRoles"; ParameterCollection.Add(new clsParameter("@ApplicationName", ApplicationName)); ParameterCollection.Add(new clsParameter("@RoleName", RoleName)); return DataAccess.ExecuteSpAndGetDataTable(ParameterCollection); } catch (Exception Ex) { if (!Ex.Message.Contains("User Define:")) BL_Exception.WriteLog(Ex); throw Ex; } }
/// <summary> /// Get Page List /// </summary> /// <returns></returns> public static DataTable GetPage(int Categoryid) { try { clsParameterCollection ParameterCollection = new clsParameterCollection(); ParameterCollection.ProcedureName = "BS_GetPage"; ParameterCollection.Add(new clsParameter("@CategoryId", Categoryid)); return DataAccess.ExecuteSpAndGetDataTable(ParameterCollection); } catch (Exception Ex) { if (!Ex.Message.Contains("User Define:")) BL_Exception.WriteLog(Ex); throw Ex; } }
/// <summary> /// This method is used to get user details by role id. /// </summary> /// <param name="RoleId"></param> /// <returns></returns> public static DataTable BL_GeCategoryDtls(string RoleId) { try { clsParameterCollection ParameterCollection = new clsParameterCollection(); ParameterCollection.ProcedureName = "BS_GetCategoryDetails"; ParameterCollection.Add(new clsParameter("@RoleId", RoleId)); return DataAccess.ExecuteSpAndGetDataTable(ParameterCollection); } catch (Exception Ex) { if (!Ex.Message.Contains("User Define:")) BL_Exception.WriteLog(Ex); throw Ex; } }
/// <summary> /// This method is used to get login user storecode. /// </summary> /// <param name="UserID"></param> /// <returns></returns> public static DataTable getLoginUserStoreCode(string UserID) { try { clsParameterCollection ParameterCollection = new clsParameterCollection(); ParameterCollection.ProcedureName = "BS_getUserStoreCode"; ParameterCollection.Add(new clsParameter("@UserID", UserID)); return DataAccess.ExecuteSpAndGetDataTable(ParameterCollection); } catch (Exception Ex) { if (!Ex.Message.Contains("User Define:")) BL_Exception.WriteLog(Ex); throw Ex; } }
public static DataTable DeletePage(string PageId) { try { clsParameterCollection ParameterCollection = new clsParameterCollection(); ParameterCollection.ProcedureName = "BS_DeletePage"; ParameterCollection.Add(new clsParameter("@PageId", Convert.ToInt32(PageId))); return DataAccess.ExecuteSpAndGetDataTable(ParameterCollection); } catch (Exception Ex) { if (!Ex.Message.Contains("User Define:")) BL_Exception.WriteLog(Ex); throw Ex; } }
/// <summary> /// This method is used to get menu permission. /// </summary> /// <param name="menuId"></param> /// <returns></returns> public static DataTable GetMenuPermission(int menuId) { try { clsParameterCollection ParameterCollection = new clsParameterCollection(); ParameterCollection.ProcedureName = "BS_PermissionManagement_GetMenuPermissions"; ParameterCollection.Add(new clsParameter("@MenuId", menuId)); return DataAccess.ExecuteSpAndGetDataTable(ParameterCollection); } catch (Exception Ex) { if (!Ex.Message.Contains("User Define:")) BL_Exception.WriteLog(Ex); throw Ex; } }
/// <summary> /// This method is used to save user store details. /// </summary> /// <param name="StoreCode"></param> /// <param name="UserId"></param> public static void UpdateUserStoreCode(string EditedUserName, string UserId, string isAdmin) { try { clsParameterCollection ParameterCollection = new clsParameterCollection(); ParameterCollection.ProcedureName = "BS_UserManagement_UpdateStoreUser"; ParameterCollection.Add(new clsParameter("@Userid", UserId)); ParameterCollection.Add(new clsParameter("@IsAdmim", isAdmin)); ParameterCollection.Add(new clsParameter("@EditedUserName", EditedUserName)); DataAccess.ExecuteNonQuerySp(ParameterCollection); } catch (Exception Ex) { if (!Ex.Message.Contains("User Define:")) BL_Exception.WriteLog(Ex); throw Ex; } }
/// <summary> /// This method is used to update user profile details. /// </summary> /// <param name="objUserInfo"></param> /// <returns></returns> public static DataTable UpdateCategory(CategoryInfo objCategoryInfo,string ModifiedBy) { try { clsParameterCollection ParameterCollection = new clsParameterCollection(); ParameterCollection.ProcedureName = "BS_UpdateCategory"; ParameterCollection.Add(new clsParameter("@Categoryid", objCategoryInfo.CategoryId)); ParameterCollection.Add(new clsParameter("@CategoryName", objCategoryInfo.CategoryName)); ParameterCollection.Add(new clsParameter("@Desciption", objCategoryInfo.Desciption)); ParameterCollection.Add(new clsParameter("@Password", objCategoryInfo.Password)); ParameterCollection.Add(new clsParameter("@IsActive", objCategoryInfo.IsActive)); ParameterCollection.Add(new clsParameter("@Modifiedby", ModifiedBy.Trim())); ParameterCollection.Add(new clsParameter("@Order", objCategoryInfo.Order)); return DataAccess.ExecuteSpAndGetDataTable(ParameterCollection); } catch (Exception Ex) { if (!Ex.Message.Contains("User Define:")) BL_Exception.WriteLog(Ex); throw Ex; } }
/// <summary> /// This method is used to save user store details. /// </summary> /// <param name="UserId"></param> /// <param name="StoreCode"></param> /// <param name="CreatedBy"></param> public static void SaveCategory(string CategoryName,string Desciption,string password,string CreatedBy, bool isActive,string Categoryorder) { try { clsParameterCollection ParameterCollection = new clsParameterCollection(); ParameterCollection.ProcedureName = "BS_CategoryManagement_AddCategory"; ParameterCollection.Add(new clsParameter("@CategoryName", CategoryName)); ParameterCollection.Add(new clsParameter("@Desciption", Desciption)); ParameterCollection.Add(new clsParameter("@Password", password)); ParameterCollection.Add(new clsParameter("@CreatedBy", CreatedBy)); ParameterCollection.Add(new clsParameter("@IsActive", isActive)); ParameterCollection.Add(new clsParameter("@Order", Categoryorder)); DataAccess.ExecuteNonQuerySp(ParameterCollection); } catch (Exception Ex) { if (!Ex.Message.Contains("User Define:")) BL_Exception.WriteLog(Ex); throw Ex; } }
/// <summary> /// This method is used to get user details by search condition. /// </summary> /// <param name="objUserInfo"></param> /// <returns></returns> public static DataTable GetUserDtlsByCondition(UserManagementInfo objUserInfo) { try { clsParameterCollection ParameterCollection = new clsParameterCollection(); ParameterCollection.ProcedureName = "BS_GetUserDetailsByCondition"; ParameterCollection.Add(new clsParameter("@SearchCondition", objUserInfo.SearchCondition)); ParameterCollection.Add(new clsParameter("@SearchText", objUserInfo.SearchText)); return DataAccess.ExecuteSpAndGetDataTable(ParameterCollection); } catch (Exception Ex) { if (!Ex.Message.Contains("User Define:")) BL_Exception.WriteLog(Ex); throw Ex; } }
/// <summary> /// This method is used to save user store details. /// </summary> /// <param name="UserId"></param> /// <param name="StoreCode"></param> /// <param name="CreatedBy"></param> public static void SavePage(string CategoryName, string Desciption, string Categoryid,string vimeoUrl,string CreatedBy, bool isActive,string PageOrder) { try { clsParameterCollection ParameterCollection = new clsParameterCollection(); ParameterCollection.ProcedureName = "BS_PageManagement_AddPage"; ParameterCollection.Add(new clsParameter("@PageName", CategoryName)); ParameterCollection.Add(new clsParameter("@Desciption", Desciption)); ParameterCollection.Add(new clsParameter("@Categoryid", Convert.ToInt32(Categoryid))); ParameterCollection.Add(new clsParameter("@CreatedBy", CreatedBy)); ParameterCollection.Add(new clsParameter("@VimeoUrl", vimeoUrl)); ParameterCollection.Add(new clsParameter("@IsActive", isActive)); ParameterCollection.Add(new clsParameter("@Pageorder", Convert.ToInt32(PageOrder))); DataAccess.ExecuteNonQuerySp(ParameterCollection); } catch (Exception Ex) { if (!Ex.Message.Contains("User Define:")) BL_Exception.WriteLog(Ex); throw Ex; } }
/// <summary> /// This method is used to set view permission to role. /// </summary> /// <param name="ApplicationName"></param> /// <returns></returns> public static void SetViewPermission(PermissionInfo PermissionInfo) { try { clsParameterCollection ParameterCollection = new clsParameterCollection(); ParameterCollection.ProcedureName = "BS_PermissionManagement_SetViewPermission"; ParameterCollection.Add(new clsParameter("@MenuId", PermissionInfo.MenuId)); ParameterCollection.Add(new clsParameter("@RoleId", PermissionInfo.RoleId)); ParameterCollection.Add(new clsParameter("@View", PermissionInfo.View)); DataAccess.ExecuteNonQuerySp(ParameterCollection); } catch (Exception Ex) { if (!Ex.Message.Contains("User Define:")) BL_Exception.WriteLog(Ex); throw Ex; } }
/// <summary> /// This method is used to verify role has permissions to view permission management page. /// </summary> /// <param name="RoleId"></param> /// <returns></returns> public static string HasPermissions(string RoleId) { try { clsParameterCollection ParameterCollection = new clsParameterCollection(); ParameterCollection.ProcedureName = "BS_PermissionManagement_HasPermissions"; ParameterCollection.Add(new clsParameter("@RoleId", RoleId)); return DataAccess.ExecuteScalarSp(ParameterCollection); } catch (Exception Ex) { if (!Ex.Message.Contains("User Define:")) BL_Exception.WriteLog(Ex); throw Ex; } }
/// <summary> /// This method is used to update user profile details. /// </summary> /// <param name="objUserInfo"></param> /// <returns></returns> public static DataTable UpdateUserProfile(UserManagementInfo objUserInfo) { try { clsParameterCollection ParameterCollection = new clsParameterCollection(); ParameterCollection.ProcedureName = "BS_UpdateUserProfile"; ParameterCollection.Add(new clsParameter("@PropertyValuesString", objUserInfo.PropertyValuesString)); ParameterCollection.Add(new clsParameter("@UserName", objUserInfo.UserName)); return DataAccess.ExecuteSpAndGetDataTable(ParameterCollection); } catch (Exception Ex) { if (!Ex.Message.Contains("User Define:")) BL_Exception.WriteLog(Ex); throw Ex; } }