public FormAddDepartment(FormPanelMenu pm, DB db) { database = db; panelMenu = pm; InitializeComponent(); getDepartments(); }
public FormAddStaff(DB db, FormPanelMenu pF) { InitializeComponent(); database = db; parentForm = pF; departmentsTable = database.getDepartments(); foreach (DataRow dr in departmentsTable.Rows) { dropDepartment.Items.Add(dr.Field <string>(1)); } dropDepartment.SelectedIndex = 0; dropSex.SelectedIndex = 0; dropFamily.SelectedIndex = 0; dropEducation.SelectedIndex = 0; if (!DB.IsEmpty(DB.chosenEmployeeAlreadyWorked)) { DataRow emp = DB.chosenEmployeeAlreadyWorked; inputName.Text = emp.Field <string>("name"); inputSurname.Text = emp.Field <string>("surname"); inputPatronymic.Text = emp.Field <string>("patronymic"); dropSex.SelectedItem = emp.Field <string>("sex"); dropFamily.SelectedItem = emp.Field <string>("family_status"); dropEducation.SelectedItem = emp.Field <string>("education"); inputSeniority.Text = emp.Field <int>("seniority").ToString(); string departmentName = emp.Field <string>("department_name").ToString(); if (dropDepartment.Items.IndexOf(departmentName) != -1) { dropDepartment.SelectedIndex = dropDepartment.Items.IndexOf(departmentName); } checkInputs(); } }
public FormDesktop(DB db, FormPanelMenu pm) { InitializeComponent(); panelMenu = pm; database = db; laEmployee.Text = "Здравствуйте, " + DB.currentEmployee.Field <string>("name") + "!"; }
public FormAddStaff_LaborContract( string efn, string nfn, string d, string p, string ser, string num, string bod, string reg, DateTime passdate, FormPanelMenu pm, DB db ) { empFullName = efn; newFullName = nfn; department = d; position = p; database = db; panelMenu = pm; series = ser; number = num; body = bod; register = reg; passDate = passdate; InitializeComponent(); dropContractType.SelectedIndex = 0; dropContactType2.SelectedIndex = 0; reshim.SelectedIndex = 0; }
public FormSystemSettings(FormPanelMenu pm, DB db) { panelMenu = pm; database = db; InitializeComponent(); getEmployes(); }
public FormDepartmentCard(FormPanelMenu pm, DB db, uint depId, string depName, string depPhone) { InitializeComponent(); SetStyle(ControlStyles.SupportsTransparentBackColor, true); panelMenu = pm; database = db; id = depId; name = depName; phone = depPhone; setDepartmentInfo(); dataGridPositions.Columns.Add("Название", "Название"); dataGridPositions.Columns.Add("Оклад", "Оклад"); DataGridViewButtonColumn btn = new DataGridViewButtonColumn(); btn.HeaderText = "Удаление"; btn.Name = "Удалить"; btn.Text = "Удалить"; btn.UseColumnTextForButtonValue = true; btn.FlatStyle = FlatStyle.Flat; //btn.DefaultCellStyle.ForeColor = Color.White; //btn.DefaultCellStyle.BackColor = Color.Red; btn.DefaultCellStyle.SelectionBackColor = Color.Red; btn.DefaultCellStyle.SelectionForeColor = Color.White; dataGridPositions.Columns.Add(btn); dataGridPositions.Columns[1].Width = 100; dataGridPositions.Columns[2].Width = 180; fillPositionGrid(); }
public FormArchive(FormPanelMenu pm, DB db) { panelMenu = pm; database = db; InitializeComponent(); employees = database.getEmployees(true); dataGridEmployees.DataSource = employees; dataGridEmployees.Columns[0].Width = 50; }
public FormServiceChangeServAdmin(FormPanelMenu pm, DB db, ServerData serverData) { panelMenu = pm; database = db; server = serverData; InitializeComponent(); inputLogin.Text = server.adminLogin; inputPassword.Text = server.adminPassword; }
public FormDocs(FormPanelMenu pM, DB db) { panelMenu = pM; database = db; InitializeComponent(); if (DB.currentEmployee.Field <string>("access") == "USER") { btnReportAllEmployees.Visible = false; } }
public FormLeaveOrder(int persNum, string FIO, string dep, string pos, FormPanelMenu pm, DB db) { personalNumber = persNum; fullName = FIO; department = dep; position = pos; panelMenu = pm; database = db; InitializeComponent(); }
public FormAddPosition(FormPanelMenu pm, DB db, uint depId, string depName) { database = db; panelMenu = pm; departmentId = depId; InitializeComponent(); laDepName.Text = depName; dataGridPositions.Columns.Add("Название", "Название"); dataGridPositions.Columns.Add("Зарплата", "Зарплата"); fillDataGridPositions(); }
public FormServiceServerData(FormPanelMenu pm, DB db, ServerData serverData) { panelMenu = pm; database = db; server = serverData; InitializeComponent(); inputHost.Text = server.host; inputPort.Text = server.port; inputUser.Text = server.user; }
public FormStaff(FormPanelMenu parentForm, DB db) { InitializeComponent(); formParent = parentForm; database = db; if (DB.access == "USER") { btnAddEmp.Visible = false; } getEmployes(); }
public FormPersonalCard( FormPanelMenu pm, DB db, int id, bool backToArc = false ) { panelMenu = pm; database = db; backToArchive = backToArc; InitializeComponent(); setEmployeeInfo(id); }
public FormAddStaff_HiddenUser(FormPanelMenu pm, DB db) { panelMenu = pm; database = db; InitializeComponent(); employees = database.getEmployees(true); dataGridEmployees.DataSource = employees; dataGridEmployees.Columns[0].Width = 50; if (employees.Rows.Count > 0) { dataGridEmployees.CurrentCell = dataGridEmployees[0, 0]; setInputChosen(0); } }
public FormAddStaff_PassData( String n, String sn, String patr, String s, String f, String ed, int sen, Int32 depposc, UInt32 departmentC, Int32 positionC, DB db, FormPanelMenu pm, String pos, String dep ) { name = n; surname = sn; patronymic = patr; sex = s; family = f; education = ed; seniority = sen; depposCode = depposc; departmentCode = departmentC; positionCode = positionC; database = db; panelMenu = pm; position = pos; department = dep; InitializeComponent(); if (!DB.IsEmpty(DB.chosenEmployeeAlreadyWorked)) { DataRow emp = DB.chosenEmployeeAlreadyWorked; inputSeries.Text = emp.Field <string>("pass_series"); inputNumber.Text = emp.Field <string>("pass_num"); inputDate.Value = emp.Field <DateTime>("pass_date"); inputBody.Text = emp.Field <string>("pass_body"); inputAddress.Text = emp.Field <string>("reg_address"); DB.chosenEmployeeAlreadyWorked = null; checkInputs(); } }
public FormEmployeeCard(FormPanelMenu gpf, FormStaff pf, DB db, int id) { InitializeComponent(); SetStyle(ControlStyles.SupportsTransparentBackColor, true); grandParentForm = gpf; parentForm = pf; database = db; departmentsTable = database.getDepartments(); foreach (DataRow dr in departmentsTable.Rows) { dropDep.Items.Add(dr.Field <string>(1)); } setEmployeeInfo(id); }
public FormAddStaff_Documents( String n, String sn, String patr, String s, String f, String ed, int sen, Int32 depposc, UInt32 departmentC, Int32 positionC, string ser, string num, DateTime da, string bo, string add, DB db, FormPanelMenu pm, String pos, String dep ) { name = n; surname = sn; patronymic = patr; sex = s; family = f; education = ed; seniority = sen; depposCode = depposc; departmentCode = departmentC; positionCode = positionC; database = db; panelMenu = pm; series = ser; number = num; date = da; body = bo; address = add; position = pos; department = dep; InitializeComponent(); }
public FormServiceMenu(FormPanelMenu pm, DB db, ServerData serverData) { panelMenu = pm; database = db; server = serverData; InitializeComponent(); try { database.getDepartments(); laConnection.Text = "Подключение к серверу стабильное."; laConnection.ForeColor = Color.Green; } catch { laConnection.Text = "Подключение к серверу отсутсвует."; laConnection.ForeColor = Color.Red; } }
public FormPositionCard( FormPanelMenu pm, DB db, uint posId, string posName, string posSalary, uint depCode, bool hid ) { panelMenu = pm; database = db; id = posId; name = posName; salary = posSalary; hidden = hid; departmentCode = depCode; InitializeComponent(); setPositionInfo(); }
public FormEmployeeCard_PassData( int personal, string n, string sur, string p, string s, string fam, string ed, string sen, uint depCod, int posCod, int deppos, DataRow emp, FormPanelMenu pm, DB db ) { InitializeComponent(); personal_num = personal; name = n; surname = sur; patr = p; sex = s; family = fam; edu = ed; seniority = sen; depCode = depCod; posCode = posCod; depposId = deppos; employee = emp; panelMenu = pm; database = db; inputSeries.Text = employee.Field <string>("pass_series"); inputBody.Text = employee.Field <string>("pass_body"); inputNumber.Text = employee.Field <string>("pass_num"); inputAddress.Text = employee.Field <string>("reg_address"); inputDate.Value = employee.Field <DateTime>("pass_date"); }
public FormPosition(FormPanelMenu parentForm, DB db, Boolean isEdit) { formParent = parentForm; database = db; InitializeComponent(); positions.Columns.Add("Номер"); positions.Columns.Add("Название"); positions.Columns.Add("Оклад"); isEditable = isEdit; getDepartments(); //Значение должностей из первого row if (departments.Rows.Count == 0) { return; } SelectedDepartmentID = departments.Rows[0].Field <UInt32>("№"); SelectedDepartmentName = departments.Rows[0].Field <string>(1); DataTable positionsIds = database.getPositionsByDepartmentCode(SelectedDepartmentID); dataGridPositions.Rows.Clear(); foreach (DataRow dr in positionsIds.Rows) { uint code = dr.Field <uint>("position_code"); DataTable posName = database.getPositionByCode(code); object[] values = new object[] { code, posName.Rows[0].Field <string>(0), posName.Rows[0].Field <int>(1).ToString() }; positions.Rows.Add(values); } dataGridPositions.DataSource = positions; dataGridPositions.Columns["Номер"].Visible = false; if (isEditable) { DataGridViewButtonColumn btn = new DataGridViewButtonColumn(); btn.HeaderText = "Удаление"; btn.Name = "Удалить"; btn.Text = "Удалить"; btn.UseColumnTextForButtonValue = true; btn.FlatStyle = FlatStyle.Flat; //btn.DefaultCellStyle.ForeColor = Color.White; //btn.DefaultCellStyle.BackColor = Color.Red; btn.DefaultCellStyle.SelectionBackColor = Color.Red; btn.DefaultCellStyle.SelectionForeColor = Color.White; dataGridPositions.Columns.Add(btn); dataGridPositions.Columns["Удалить"].Width = 180; } else { btnAddDepartment.Visible = false; btnAddPosition.Visible = false; } }
public FormChangePassword(DB db, FormPanelMenu pM) { database = db; panelMenu = pM; InitializeComponent(); }
public FormLeave(FormPanelMenu pm, DB db) { panelMenu = pm; database = db; InitializeComponent(); }