private void inicioToolStripMenuItem_Click_1(object sender, EventArgs e) { frm_Login Login = new frm_Login(); Login.StartPosition = FormStartPosition.CenterParent; Login.Show(); }
private void btn_login_Click(object sender, EventArgs e) { frm_Login login = new frm_Login(); login.Show(); this.Close(); }
private void btn_CancelarRegistro_Click(object sender, EventArgs e) { this.Hide(); frm_Login login = new frm_Login(); login.Show(); }
private void frm_DashBoard_Users_FormClosed(object sender, FormClosedEventArgs e) { frm_Login login = new frm_Login(); login.Show(); this.Hide(); }
private void btn_cerrar_main_Click(object sender, EventArgs e) { this.Hide(); frm_Login login = new frm_Login(); login.Show(); }
private void pictureBox1_Click(object sender, EventArgs e) { frm_Login login = new frm_Login(); login.Show(); this.Hide(); }
private void button1_Click(object sender, EventArgs e) { frm_Login _login = new frm_Login(); _login.Show(); menuStrip1.Visible = _login.result; }
private void btn_Exit_Click(object sender, EventArgs e) { this.Dispose(); frm_Login frm = new frm_Login(); frm.ShowDialog(); this.Close(); }
private void btnOdjava_Click(object sender, EventArgs e) { Zatvori(); frm_Login frm = new frm_Login(); frm.Show(); this.Hide(); }
public void Test_Login_Success02() { Connection conn = new Connection(); string mess = "kiem tra lai thong tin dang nhap"; frm_login = new frm_Login(); DataTable dulieu = conn.ExecuteData("select * from Account where Username = '******' and Password='******'"); Assert.IsTrue(dulieu.Rows.Count > 0, mess); }
private void btn_Logout_Click(object sender, EventArgs e) { APIService.Username = ""; APIService.Password = ""; frm_Login form = new frm_Login(); form.FormClosed += new FormClosedEventHandler(form_FormClosed); form.Show(); Hide(); }
private void button7_Click(object sender, EventArgs e) { if (MessageBox.Show("¿Está seguro que desea cerrar sesión?.", "¡Atención!", MessageBoxButtons.YesNoCancel) == DialogResult.Yes) { Form login = new frm_Login(); login.FormClosed += new FormClosedEventHandler(login_FormClosed); login.Show(); this.Hide(); } }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); frm_Login frmLogin = new frm_Login(); if (frmLogin.ShowDialog() == DialogResult.OK) { Application.Run(new frm_MainForm(frmLogin.UserName, frmLogin.UserFullName)); } }
private void MainForm_Load(object sender, EventArgs e) { //string SqlStatus = _common.GetSqlStatus("MSSQLSERVER"); //if (SqlStatus != "Running") //{ // _common.StartService("MSSQLSERVER", 100000); //} frm_Login _form = new frm_Login(); _form.ShowDialog(); menuStrip1.Visible = _form.result; bttn_Login.Visible = !_form.result; if (_form.type == "user") { reportToolStripMenuItem.Enabled = false; } if (!_Act.CheckActivation()) { menuStrip1.Enabled = false; } string Valid = _Act.CheckValidity(); if (Valid == "Valid") { label1.Visible = false; } else if (Valid == "Invalid") { MessageBox.Show("Validity Expired \n Please Contact Service Provider\n +91-7709885767"); menuStrip1.Visible = false; label1.Visible = true; } else { lbl_ValidDays.Text = Valid + " Days left for Trial"; lbl_ValidDays.Visible = true; } dtSett = _common.getSettingValue(); if (dtSett.Maintenance == "No") { serviceToolStripMenuItem.Visible = false; } else { serviceToolStripMenuItem.Visible = true; } }
private void ts_btn_Login_Click(object sender, EventArgs e) { if (this.ts_btn_Login.Name == "ts_btn_Login") { frm_Login frm = new frm_Login(); frm.ShowDialog(); } else { Properties.Settings.Default.Reset(); Application.Exit(); } }
private void pictureBox1_Click(object sender, EventArgs e) { frm_Users users = new frm_Users(); users.Hide(); frm_Categories category = new frm_Categories(); category.Hide(); this.Hide(); frm_Login login = new frm_Login(); login.Show(); }
/// <summary> /// Opens frm_Login, from which the credentials to access the database are captured. Persists the form until /// either a successful login or user cancels (closing application). /// </summary> private void setCredentials() { using (frm_Login Login = new frm_Login()) { while (Login.loggedIn == false & Login.loginCancel == false) { Login.ShowDialog(); } if (Login.loginCancel == true) { Environment.Exit(0); } lbl_LoggedInAs.Text = SQL_Stuff.credential.UserId; } }
/// <summary> /// Opens frm_Login, from which the credentials to access the database are captured. Persists the form until /// either a successful login or user cancels (closing application). /// </summary> private void setCredentials() { using (frm_Login Login = new frm_Login()) { while (Login.loggedIn == false & Login.loginCancel == false) { Login.ShowDialog(); } if (Login.loginCancel == true) { Environment.Exit(0); } if (SQL_Stuff.env == "test") { lbl_LoggedInAs.Text = "*** TEST ENVIRONMENT *** " + SQL_Stuff.credential.UserId; } else { lbl_LoggedInAs.Text = SQL_Stuff.credential.UserId; } } }
public BLL_Login(GUI.frm_Login _f_Login) { f_Login = _f_Login; }
private void LinkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { frm_Login nb = new frm_Login(); nb.Show(); }
public frm_Main() { InitializeComponent(); dgv_ContentTermin.RowTemplate.Height = 50; DataAccessLayer DAL = new DataAccessLayer(); if (frm == null) { frm = this; } //Properties.Settings.Default.Reset(); try { string selectQuery = "select * from tbl_users where userName = '******' and userPass = '******'"; DataTable Dt = new DataTable(); Dt = DAL.fetchData(selectQuery); if (Dt.Rows.Count == 0) { Properties.Settings.Default.Reset(); btn_AddKalender.Enabled = false; } else { } } catch (Exception ex) { MessageBox.Show(ex.Message); } // Connect to Database MySqlConnection mySqlConnection = DAL.myConnection(); try { mySqlConnection.Open(); lbl_OnOff.BackColor = Color.Green; } catch (Exception ex) { //To write log file when some problem hapend with the connection to database using (StreamWriter w = File.AppendText(Environment.CurrentDirectory + "\\log.txt")) { w.WriteLine(DateTime.Now + "-->" + ex.Message); } lbl_OnOff.BackColor = Color.Red; } //to get Days of current month int DaysOfMonth = DateTime.DaysInMonth(int.Parse(DateTime.Now.ToString("yyyy")), int.Parse(DateTime.Now.ToString("MM"))); DAL.disconnect(mySqlConnection); if (string.IsNullOrEmpty(Properties.Settings.Default.userName) && string.IsNullOrEmpty(Properties.Settings.Default.Password)) { ts_btn_Termin.Enabled = false; frm_Login frm_Login = new frm_Login(); frm_Login.ShowDialog(); } else { ts_btn_Login.Text = "Abmelden"; ts_btn_Login.Name = "ts_btn_Abmelden"; //ts_btn_Login.Image = Image.FromFile(Environment.CurrentDirectory + "\\icon\\Logout.png"); } lbl_UserName.Text = "Benutzer: " + Properties.Settings.Default.userName; //fuctions.cmbGenrator(red, green, blue, cbName, cbTitel); //TODO: All in one function try { fLP_Kalender.Controls.Clear(); string query = "select * from tbl_kalender where userId = " + Properties.Settings.Default.userId; DataTable Dt = DAL.fetchData(query); for (int i = 0; i < Dt.Rows.Count; i++) { string kalenderColor = Dt.Rows[i]["color"].ToString(); string[] colorArray = kalenderColor.Split(' '); red = int.Parse(colorArray[0]); green = int.Parse(colorArray[1]); blue = int.Parse(colorArray[2]); CheckBox cb = new CheckBox(); cb.Name = "cb_" + Dt.Rows[i]["kalenderName"].ToString(); cb.Text = Dt.Rows[i]["kalenderName"].ToString(); cb.BackColor = Color.FromArgb(red, green, blue); cb.CheckedChanged += Cb_Selected; cb.MouseHover += Item_MouseHover; cb.ContextMenuStrip = frm_Main.getMainForm.contextMS_Kalender; frm_Main.getMainForm.fLP_Kalender.Controls.Add(cb); } Dt.Clear(); } catch (Exception ex) { MessageBox.Show(ex.Message); } try { fLP_SharedCalender.Controls.Clear(); string query = "select k.kalenderName, k.color,u.userName from tbl_kalender as k " + "inner join tbl_shared as s on k.kalender_Id = s.kalenderId " + "inner join tbl_users as u on k.userId = u.user_Id " + "where s.userId = " + Properties.Settings.Default.userId; DataTable Dt = DAL.fetchData(query); for (int i = 0; i < Dt.Rows.Count; i++) { //TO call the value from Color Columns string kalenderColor = Dt.Rows[i]["color"].ToString(); string[] colorArray = kalenderColor.Split(' '); red = int.Parse(colorArray[0]); green = int.Parse(colorArray[1]); blue = int.Parse(colorArray[2]); CheckBox cb = new CheckBox(); cb.Name = "cb_" + Dt.Rows[i]["kalenderName"].ToString(); cb.Text = Dt.Rows[i]["kalenderName"].ToString() + "-(" + Dt.Rows[i]["userName"].ToString() + ")"; cb.BackColor = Color.FromArgb(red, green, blue); cb.CheckedChanged += Cb_Shared_CheckedChanged; cb.MouseHover += Item_MouseHover; //cb.ContextMenuStrip = frm_Main.getMainForm.contextMS_Kalender; fLP_SharedCalender.Controls.Add(cb); } Dt.Clear(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void btn_Exit_Click(object sender, EventArgs e) { Form frmLogin = new frm_Login(); frmLogin.StartPosition = FormStartPosition.CenterScreen; Program.setForm(frmLogin); this.Close(); }