private void txtLuongThuong_Leave(object sender, EventArgs e) { try { decimal tempLuongThuong = Convert.ToDecimal(txtLuongThuong.Text); decimal X = SPositionControllers.Salary(main.ChucVu); decimal Y = SLevelControllers.Salary(cbLevel.Text); labSalary.Text = ((X + Y) * tempLuongThuong / 100).ToString(); } catch { MessageBox.Show("Lương Thưởng phải là số"); txtLuongThuong.Text = main.LuongThuong.ToString(); } }
public frmMemberInfo(Member input, string CV) { main = input; InitializeComponent(); pnInfo.BringToFront(); if (CV == "Trưởng Nhóm") { btnOutJob.Enabled = btnOutProject.Enabled = btnDelete.Enabled = false; } else if (CV == "Trưởng Dự Án") { btnOutProject.Enabled = btnDelete.Enabled = false; } deleteNumber = 0; main = input; cbSex.Text = main.GioiTinh; dtpBirthday.Value = main.NgaySinh; txtPhone.Text = main.Phone; txtEmail.Text = main.Email; txtName.Text = main.TenTV; txtLuongThuong.Text = main.LuongThuong.ToString(); rtxtContent.Text = main.NoiDung; labProjectKey.Text = '[' + main.MaDA + ']'; labJobKey.Text = '[' + main.MaCV + ']'; labKey.Text = '[' + main.MaTV + ']'; labPositoon.Text = main.ChucVu; labSalary.Text = ((SPositionControllers.Salary(main.ChucVu) + SLevelControllers.Salary(main.HocVan)) * main.LuongThuong / 100).ToString(); cbLevel.Text = main.HocVan; picFace.Image = Image.FromFile(@"Images\" + main.MaTV + "FACE.jpg"); picSign.Image = Image.FromFile(@"Images\" + main.MaTV + "SIGN.jpg"); }
private void dgvPosition_CellEndEdit(object sender, DataGridViewCellEventArgs e) { SPositionControllers.AddOrUpdate(ListSPosition[dgvPosition.CurrentCell.RowIndex]); }
public frmLogin() { InitializeComponent(); if (ListMember.Count == 0) { if (Directory.Exists("Images") == false) { Directory.CreateDirectory("Images"); } MessageBox.Show("Chương trình lần đầu khởi tạo. Tạo Account Giám Đốc", "Nhắc Nhở"); frmMemberForm temp = new frmMemberForm(); temp.ShowDialog(); login = temp.GD; if (login != null) { isOkay = true; AllController.clearAllData(); SLevelControllers.clearAllData(); SPositionControllers.clearAllData(); SLevelControllers.AddOrUpdate(new SalaryLevel() { HocVan = "Cử Nhân", Luong = 500 }); SLevelControllers.AddOrUpdate(new SalaryLevel() { HocVan = "Thạc Sĩ", Luong = 750 }); SLevelControllers.AddOrUpdate(new SalaryLevel() { HocVan = "Tiến Sĩ", Luong = 1500 }); SLevelControllers.AddOrUpdate(new SalaryLevel() { HocVan = "PGS. Tiến Sĩ", Luong = 3000 }); SLevelControllers.AddOrUpdate(new SalaryLevel() { HocVan = "GS. Tiến Sĩ", Luong = 7000 }); SPositionControllers.AddOrUpdate(new SalaryPosition() { ChucVu = "Nhân Viên", Luong = 750 }); SPositionControllers.AddOrUpdate(new SalaryPosition() { ChucVu = "Trưởng Nhóm", Luong = 1500 }); SPositionControllers.AddOrUpdate(new SalaryPosition() { ChucVu = "Trưởng Dự Án", Luong = 3000 }); SPositionControllers.AddOrUpdate(new SalaryPosition() { ChucVu = "Giám Đốc", Luong = 10000 }); MemberControllers.AddOrUpdate(login); } Close(); } else { ShowDialog(); } }