public void ToChooseFlowchart() { ChooseFlowchartView chooseFlowchartView = new ChooseFlowchartView(data); view.Hide(); chooseFlowchartView.Show(); }
public ChooseFlowchartPresenter(DataManagement data, ChooseFlowchartView view) { this.view = view; this.data = data; DataTable table = data.GetNamesAndLogins(); view.SetFlowchartsTable(table); }
public void Login(string login, string password) { if (login == "" || password == "") { throw new Exception("Enter login and password"); } if (data.IsUserExist(login, password)) { data.SetLogin(login); ChooseFlowchartView chooseFlowchartView = new ChooseFlowchartView(data); ((EnterView)view).Hide(); chooseFlowchartView.Show(); } else { throw new Exception("Incorrect login or password"); } }