private void textBoxZKJE_TextChanged(object sender, EventArgs e) { try { if (this.textBoxZKJE.Focused) { if (this.textBoxZKJE.Text.Trim().Length > 0) { double result = 0.0; if (double.TryParse(this.textBoxZKJE.Text.Trim(), out result)) { result = SaleBillCtrl.GetRound(result, 2); double num3 = 0.0; double num4 = 0.0; double.TryParse(this.labelSPJE.Text, out num3); num4 = (num3 != 0.0) ? (result / num3) : result; num4 = Finacial.Mul(num4, 100.0, 3); double num5 = 0.0; double.TryParse(this.labelSPJE.Text.Trim(), out num5); if ((result <= num5) && (((num4 >= 0.001) && (num4 <= 100.0)) || ((result >= 0.01) && (num4 == 0.0)))) { this.textBoxZKL.Text = num4.ToString("0.000"); this.btnOK.Enabled = true; return; } } else { this.textBoxZKJE.Text = "0.00"; } } this.textBoxZKL.Text = "0.000"; this.btnOK.Enabled = false; } } catch (Exception exception) { HandleException.HandleError(exception); } }
public double getDj(bool Flag_ContainTax) { double num; if (Flag_ContainTax) { if (this.HSJBZ) { return(this.DJ); } num = Finacial.Mul(this.DJ, 1.0 + this.SLV, 15); if (Math.Abs((double)(this.SLV - 0.015)) < 1E-05) { num = (this.DJ * 70.0) / 69.0; } if (!(this.KCE == 0.0)) { num = Finacial.Div(this.JE + this.SE, this.SL, 15); } return(num); } if (this.HSJBZ) { num = Finacial.Div(this.DJ, 1.0 + this.SLV, 15); if (Math.Abs((double)(this.SLV - 0.015)) < 1E-05) { num = Finacial.Div(this.DJ * 69.0, 70.0, 15); } if (!(this.KCE == 0.0)) { num = Finacial.Div(this.JE, this.SL, 15); } return(num); } return(this.DJ); }