private void executeWithRepository(string graphID, string simID, string eventName) { string retrunXML = string.Empty; List <Events> lst = FunctionalityFromRepository.GetExecutedEvents(graphID, simID, eventName, ref retrunXML); if (string.IsNullOrWhiteSpace(retrunXML) == false) { string errorDetail = string.Empty; bool chhk = HelpingFunctions.checkSuccessExecute(retrunXML, ref errorDetail); if (chhk) { MessageBox.Show("Something went wrong , please try later "); } else { string err = HelpingFunctions.updateErrorMsgReplaceIdWithLabels(eveLst, errorDetail); MessageBox.Show(err); //MessageBox.Show(errorDetail); } } else { LoadEvent(lst); checkIsAccepting(); } }
private void checkIsAccepting() { bool accepted = false; accepted = FunctionalityFromRepository.GetIsAccepting(GraphID, SimID); if (accepted) { showButton(false); } else { showButton(true); } }
private void LoginCall() { string userName = textBoxUserName.Text; string password = textBoxPassword.Text; if (string.IsNullOrWhiteSpace(userName) == true || string.IsNullOrWhiteSpace(password) == true) { MessageBox.Show("Username or Password cannot be empty, please eneter both"); textBoxPassword.Text = ""; if (string.IsNullOrWhiteSpace(userName) == true) { textBoxUserName.Focus(); } else { textBoxPassword.Focus(); } } else { string error = string.Empty; bool access = FunctionalityFromRepository.GetAccess(userName, password, ref error); if (access) { CommonSetting.UserName = userName; CommonSetting.Password = password; this.Hide(); var choice = new Choice(); choice.Closed += (s, args) => this.Close(); choice.Show(); } else { if (string.IsNullOrWhiteSpace(error) == true) { MessageBox.Show("Username or Password is not correct , please try again"); } else { MessageBox.Show(error); } textBoxPassword.Text = ""; } } }
private bool GetEvents(string id) { bool isSuccess = false; string error = string.Empty; List <Events> lst = FunctionalityFromRepository.GetAllEvents(id, ref SimID, ref error); if (string.IsNullOrWhiteSpace(error)) { isSuccess = true; LoadEvent(lst); } else { MessageBox.Show(error); } return(isSuccess); }
private void buttonRefresh_Click(object sender, EventArgs e) { string error = string.Empty; LoadEvent(FunctionalityFromRepository.GetLatestEvents(GraphID, SimID, ref error)); }