public List <Secretary> Get_All_Secretary() { List <Secretary> secretaries = new List <Secretary>(); Secretary secretary = new Secretary(); try { con.OpenCon(); com = new SqlCommand("SELECT * FROM Secretarys", con.GetCon()); SqlDataReader rdr = com.ExecuteReader(); while (rdr.Read()) { secretary = new Secretary(); secretary.setAddress(rdr["Address"].ToString()); secretary.setFirstName(rdr["First_Name"].ToString()); secretary.setID(rdr["ID"].ToString()); secretary.setLastName(rdr["Last_Name"].ToString()); secretary.setPassword(rdr["Password"].ToString()); secretary.setUserName(rdr["User_Name"].ToString()); secretaries.Add(secretary); } rdr.Close(); } catch (Exception ex) { MessageBox.Show(ex.Message); } con.CloseCon(); return(secretaries); }
private void Set_Secretary(Secretary sec) { secretary = sec; secDB = new SecretarysDB(); secreatarys_lst = new List <Secretary>(); lbl_Update.Text = "עדכון מזכירה"; }
public SecretaryMenu(Object sec) { InitializeComponent(); this.secretary = (Secretary)sec; l_name.Text += secretary.getFirstName() + " " + secretary.getLastName(); List <string> ListOptions = new List <string>(); ListOptions.Add("הוספת הרצאה"); ListOptions.Add("הוספת תרגול"); ListOptions.Add("הוספת סטודנט"); ListOptions.Add("הוספת מרצה"); ListOptions.Add("הוספת מתרגל"); ListOptions.Add("הוספת מזכירה"); ListOptions.Add("הוספת מבחן ללוח בחינות"); ListOptions.Add("קביעת מועד מיוחד למבחן"); ListOptions.Add("שיבוץ סטודנטים למבחן"); ListOptions.Add("צפייה במערכת"); ListOptions.Add("צפייה במכסת שעות נוכחית"); ListOptions.Add("צפייה ברשימת סטודנטים"); ListOptions.Add("צפייה ברשימת קורסים לפי סמסטר"); ListOptions.Add("שינויים במערכת"); ListOptions.Add("ניהול קורס"); ListOptions.Add("עדכון פרטים אישיים"); ListOptions.Add("הודעות אישיות"); ListOptions.Add("שיבוץ סטודנטים לקורס"); foreach (string Op in ListOptions) { lb_options.Items.Add(Op); } }
public User() { student = null; professor = null; doctor = null; junior = null; tutor = null; secretary = null; deptManager = null; }
private void btn_Lecturer_Main_Back_Click(object sender, EventArgs e) { if (lecturer != null) { lecturer = null; lecDB = null; } else if (tutor != null) { tutor = null; tutDB = null; } else if (student != null) { student = null; stuDB = null; } else if (secretary != null && admin == false) { secretary = null; secDB = null; } if (admin) { pnl_User_Select.Visible = true; txtB_User_Select_LName.Clear(); txtB_User_Select_LName.ResetText(); txtB_User_Select_PName.Clear(); txtB_User_Select_PName.ResetText(); cbo_User_Select_ID.ResetText(); cbo_User_Select_ID.Items.Clear(); Load_Users(); } }
public void CreateSecretary(/*string fname, string lname, string id, string address, string user, string pass*/) { secretary = new Secretary(/*fname, lname, id, address, user, pass*/); }