public void RemoveAllProfilesByUser() { ReloadAll(); ProfileManagementHelper pmh = new ProfileManagementHelper(); if(!txtUserName.Text.Equals("")) { if(pmh.RemoveProfilesByUser(txtUserName.Text)) { lblErrorMessage.Text = "remove " +txtUserName.Text+ "'s profile successfully"; } else lblErrorMessage.Text = "remove profile unsuccessful"; } else lblErrorMessage.Text = "please insert the user name"; }
public void RemoveAllProfilePropertiesByUserGroup() { ReloadAll(); ProfileManagementHelper pmh = new ProfileManagementHelper(); if(!txtUserName.Text.Equals("")) { if(pmh.RemoveProfileByUserGroup(txtUserName.Text,ddlProfileList.SelectedItem.Text)) { lblErrorMessage.Text = "remove " +txtUserName.Text+ "'s "+ ddlProfileList.SelectedItem.Text +" profile successfully"; } else lblErrorMessage.Text = "remove profile unsuccessful"; } else lblErrorMessage.Text = "please insert the user name"; }
public void RetriveAllProfiles() { ReloadAll(); ProfileManagementHelper pmh = new ProfileManagementHelper(); Dictionary<string, object> reportContainerDictionary = pmh.GetTotalProfileCollection(); foreach(string userGroupName in reportContainerDictionary.Keys) { lblReportInfo.Text += "User Name : " + userGroupName.Split('|')[0] + "<br />"; lblReportInfo.Text += "Profile Type : " + userGroupName.Split('|')[1] + "<br />"; lblReportInfo.Text += "Property List : " + "<br />"; Dictionary<string, object> propertyListDictionary = ((Dictionary<string, object>)reportContainerDictionary[userGroupName]); foreach(string propertyName in propertyListDictionary.Keys) { lblReportInfo.Text += propertyName + " " + propertyListDictionary[propertyName].ToString() + "<br />"; } lblReportInfo.Text += "<br /><br />"; } }
protected void btnSetProfile_Click(object sender, EventArgs e) { ReloadAll(); ProfileManagementHelper pmh = new ProfileManagementHelper(); if(!txtUserName.Text.Equals("")) { string message = pmh.SetProfile(ddlProfileList.SelectedItem.Text,txtUserName.Text,FillPropertiesToDictionary()); if(message.Equals("success")) lblErrorMessage.Text = "profile is succesfully inserted"; else lblErrorMessage.Text = message; } else lblErrorMessage.Text = "please insert the user name"; }
public void RetriveProfileByUserPropertyList() { ReloadAll(); ProfileManagementHelper pmh = new ProfileManagementHelper(); if(!txtUserName.Text.Equals("")) { Dictionary<string, object> reportContainerDictionary = pmh.GetProfilesByUser(txtUserName.Text,GetUserProvidedPropertyList()); foreach(string groupName in reportContainerDictionary.Keys) { lblReportInfo.Text += "User Name : " + txtUserName.Text + "<br />"; lblReportInfo.Text += "Profile Type : " + groupName + "<br />"; lblReportInfo.Text += "Property List : " + "<br />"; Dictionary<string, object> propertyListDictionary = ((Dictionary<string, object>)reportContainerDictionary[groupName]); foreach(string propertyName in propertyListDictionary.Keys) { lblReportInfo.Text += propertyName + " " + propertyListDictionary[propertyName].ToString() + "<br />"; } lblReportInfo.Text += "<br /><br />"; } } else lblErrorMessage.Text = "please insert the user name"; }
public void RetriveProfileByUserGroup() { ReloadAll(); ProfileManagementHelper pmh = new ProfileManagementHelper(); if(!txtUserName.Text.Equals("")) { Dictionary<string, object> reportContainerDictionary = pmh.GetProfileByUserGroup(txtUserName.Text,ddlProfileList.SelectedItem.Text); if(reportContainerDictionary.Keys.Count != 0) { lblReportInfo.Text += "User Name : " + txtUserName.Text + "<br />"; lblReportInfo.Text += "Profile Type : " + ddlProfileList.SelectedItem.Text + "<br />"; lblReportInfo.Text += "Property List : " + "<br />"; foreach(string propertyName in reportContainerDictionary.Keys) { lblReportInfo.Text += propertyName + " " + reportContainerDictionary[propertyName].ToString() + "<br />"; } lblReportInfo.Text += "<br /><br />"; } } else lblErrorMessage.Text = "please insert the user name"; }
public void RetriveProfileByGroupPropertyList() { ReloadAll(); ProfileManagementHelper pmh = new ProfileManagementHelper(); Dictionary<string, object> reportContainerDictionary = pmh.GetProfilesByGroup(ddlProfileList.SelectedItem.Text,GetUserProvidedPropertyList()); foreach(string userName in reportContainerDictionary.Keys) { lblReportInfo.Text += "User Name : " + userName + "<br />"; lblReportInfo.Text += "Profile Type : " + ddlProfileList.SelectedItem.Text + "<br />"; lblReportInfo.Text += "Property List : " + "<br />"; Dictionary<string, object> propertyListDictionary = ((Dictionary<string, object>)reportContainerDictionary[userName]); foreach(string propertyName in propertyListDictionary.Keys) { lblReportInfo.Text += propertyName + " " + propertyListDictionary[propertyName].ToString() + "<br />"; } lblReportInfo.Text += "<br /><br />"; } }