private void cbxLaisuat_SelectedIndexChanged(object sender, EventArgs e) { Tinhlai frmTinhLai = new Tinhlai(); if (edit == false) { return; } else { if (cbxLaisuat.Text == laisuat.ToString()) { return; } frmTinhLai.init(dbfile, txtMaHD.Text, int.Parse(cbxLaisuat.Text)); frmTinhLai.ShowDialog(); if (frmTinhLai.saved == false) { cbxLaisuat.Text = laisuat.ToString(); } else { cmdClose.Enabled = false; } } }
private void cbxLaisuat_Leave(object sender, EventArgs e) { Tinhlai frmTinhLai = new Tinhlai(); int laimoi; if (edit == false) { return; } else { if (cbxLaisuat.Text == oldLS) { return; } laimoi = (int)(double.Parse(cbxLaisuat.Text) * 100); frmTinhLai.init(dbfile, txtMaHD.Text, laimoi); frmTinhLai.ShowDialog(); if (frmTinhLai.saved == false) { cbxLaisuat.Text = laisuat.ToString(); } } }
private void cbxLaisuat_SelectedIndexChanged(object sender, EventArgs e) { Tinhlai frmTinhLai = new Tinhlai(); if (edit == false) return; else { if (cbxLaisuat.Text == laisuat.ToString()) return; frmTinhLai.init(dbfile, txtMaHD.Text, int.Parse(cbxLaisuat.Text)); frmTinhLai.ShowDialog(); if (frmTinhLai.saved == false) cbxLaisuat.Text = laisuat.ToString(); else { cmdClose.Enabled = false; } } }
private void cbxLaisuat_Leave(object sender, EventArgs e) { Tinhlai frmTinhLai = new Tinhlai(); int laimoi; if (edit == false) return; else { if (cbxLaisuat.Text == oldLS) return; laimoi = (int)(double.Parse(cbxLaisuat.Text) * 100); frmTinhLai.init(dbfile, txtMaHD.Text, laimoi); frmTinhLai.ShowDialog(); if (frmTinhLai.saved == false) cbxLaisuat.Text = laisuat.ToString(); } }