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"); }