public void initilize(Form1 form1, UserActionForm userActionForm, string id) { this.form1 = form1; this.UserActionForm = userActionForm; this.id = id; admin = false; }
private void EditTask_Click(object sender, EventArgs e) { UserActionForm userActionForm = new UserActionForm(adminActionForm); userActionForm.Show(); adminActionForm.Hide(); }
private void btnlogin_Click(object sender, EventArgs e) { bool isExist = false; XmlDocument doc = new XmlDocument(); doc.Load("employees.xml"); XmlNodeList passwords = doc.GetElementsByTagName("password"); XmlNodeList IDs = doc.GetElementsByTagName("id"); XmlNodeList statuss = doc.GetElementsByTagName("role"); string status = ""; for (int i = 0; i < passwords.Count; i++) { string passwordValue = passwords[i].InnerText; string idValue = IDs[i].InnerText; if (idValue == ID.Text && passwordValue == password.Text) { isExist = true; status = statuss[i].InnerText; GlobalVariableClass.Temp = idValue; } } if (isExist) { id = ID.Text.ToString(); if (status == "Admin") { AdminActionForm adminActionForm = new AdminActionForm(form1); adminActionForm.Show(); } else { //user form will appear // UserActionForm userActionsForm = new UserActionForm(form1); //id = int.Parse(ID.Text.ToString()); UserActionForm userActionsForm1 = new UserActionForm(form1, id); userActionsForm1.Show(); } form1.Hide(); } else { MessageBox.Show("ID or password does not exist"); } }
public void initilize(AdminActionForm adminActionForm, UserActionForm userActionForm) { this.adminActionForm = adminActionForm; this.UserActionForm = userActionForm; admin = true; }
public void initilize(Form1 form1, UserActionForm userActionForm) { this.form1 = form1; this.UserActionForm = userActionForm; admin = false; }
public ViewProjectForm(UserActionForm userActionForm, int userId) { this.userActionForm = userActionForm; viewProject1.initialize(userActionForm, this, userId); }
public void initialize(UserActionForm userActionForm, ViewProjectForm viewProjectForm, int userId) { this.userActionForm = userActionForm; this.ViewProjectForm = viewProjectForm; this.userId = userId; }