private void button1_Click(object sender, EventArgs e) { if (validate(txtUserName.Text, txtPassword.Text) == true) { List <ModelBookStore.LoginUserRoles> objRoleList = objBLLogin.Search(txtUserName.Text, txtPassword.Text); GloabalClass.UserId = objRoleList[0].UserId; GloabalClass.LogId = objRoleList[0].LogId; //GloabalClass.FirstName = objRoleList[0].FirstName; //GloabalClass.LastName = objRoleList[0].LastName; GloabalClass.RoleId = objRoleList[0].RoleId; GloabalClass.RoleName = objRoleList[0].RoleName; FrmMaster objMaster = new FrmMaster(); objMaster.Text = "Welcome " + GloabalClass.UserId + " to TwinkleBookStore"; //objLogin.label1.Text ="welcome" + GloabalClass.LoginName +" to twinklestore"; objMaster.Show(); this.Hide(); } else { lblValidation.Text = "Invalid Credentials and Please Provide Valid Credentials"; lblValidation.Visible = true; } }
private void btnExport_Click(object sender, EventArgs e) { try { FrmMaster objMaster = new FrmMaster(); objMaster.ExportToPDF(dataGridView1, true); } catch (Exception ex) { MessageBox.Show(ex.Message); } }