public void GetPersonalInfo(string index, EmployeeEf.KNUDBEntities ctx, PictureBox photo, TextBox name, TextBox email, TextBox department, TextBox cathedra, TextBox degree, TextBox rating, TextBox year) { int idx; try { idx = Int32.Parse(index); } catch (Exception) { MessageBox.Show("Index can`t be converted to integer"); return; } var res = (from e in ctx.EMPLOYEE where e.ID == idx select e).FirstOrDefault(); name.Text = res.NAME_E; email.Text = res.EMAIL1.ADRESS; department.Text = res.DEPARTMENT1.D_NAME; cathedra.Text = res.CATHEDRA1.C_NAME; degree.Text = res.DEGREE1.DEGREELIST.D_NAME; rating.Text = res.RATING.ToString(); year.Text = res.DEGREE1.YEAR_GOT.ToString(); byte[] data = new byte[0]; data = res.PHOTO1.IMAGEDATA; if (data != null) { MemoryStream stream = new MemoryStream(data); photo.Image = Image.FromStream(stream); } else { photo.Image = Properties.Resources.unknown_person_icon_Image_from; } }
public SearchEmployee(TextBox name, TextBox depart, TextBox cathedra, TextBox email, TextBox degree, TextBox rating, TextBox year, DataGridView dgv, EmployeeEf.KNUDBEntities ctx) { Name = name.Text; Department = depart.Text; Cathedra = cathedra.Text; Email = email.Text; Degree = degree.Text; Rating = rating.Text; Year = year.Text; this.ctx = ctx; this.dgv = dgv; }
public AddDepartmentForm(DataGridView data, EmployeeEf.KNUDBEntities ctx) { InitializeComponent(); dataGrid = data; this.ctx = ctx; }
public CathedraManager(EmployeeEf.KNUDBEntities ctx) { this.ctx = ctx; }
public AlterEmployee(string ID, EmployeeEf.KNUDBEntities ctx) { Id = ID; this.ctx = ctx; }
public EmployeeAddingForm(DataGridView dgv, EmployeeEf.KNUDBEntities ctx) { InitializeComponent(); this.dgv = dgv; this.ctx = ctx; }