예제 #1
0
        private double popopo(string strvalue, int digits = 0)
        {
            double result = 0.0;

            if (double.TryParse(strvalue, out result))
            {
                if (digits == 0)
                {
                    return(result);
                }
                return(result = Finacial.GetRound(result, digits));
            }
            return(0.0);
        }
예제 #2
0
 public void setDj(double dDj, bool hsjbz)
 {
     if (hsjbz)
     {
         double num  = dDj;
         double num2 = num * this.SL;
         this.HSJBZ = true;
         this.DJ    = num;
         this.JE    = Finacial.Div(num2, 1.0 + this.SLV, 2);
         this.SE    = Finacial.GetRound((double)(num2 - this.JE), 2);
     }
     else
     {
         this.HSJBZ = false;
         this.DJ    = dDj;
         this.JE    = Finacial.GetRound((double)(dDj * this.SL), 2);
         this.SE    = Finacial.GetRound((double)(this.JE * this.SLV), 2);
     }
 }
예제 #3
0
        private void textBoxZKHS_TextChanged(object sender, EventArgs e)
        {
            int    result      = 0;
            double num2        = 0.0;
            double zkje        = 0.0;
            double totalAmount = 0.0;

            if (!int.TryParse(this.textBoxZKHS.Text, out result))
            {
                this.textBoxZKHS.Text = "1";
            }
            else
            {
                if ((this.textBoxZKL.Text.Trim().Length > 0) && double.TryParse(this.textBoxZKL.Text.Trim(), out num2))
                {
                    num2 = Finacial.Div(num2, 100.0, 15);
                    if (num2 > 1.0)
                    {
                        this.btnOK.Enabled = false;
                    }
                    else
                    {
                        this.btnOK.Enabled = true;
                    }
                }
                this.saleLogic.DisCountChangeRowNO(this.bill, this.selectIndex, ref result, num2, ref totalAmount, ref zkje);
                zkje = Finacial.GetRound(zkje, 2);
                this.textBoxZKHS.Text = result.ToString();
                this.labelSPJE.Text   = totalAmount.ToString();
                this.textBoxZKJE.Text = zkje.ToString("0.00");
                if (zkje == 0.0)
                {
                    this.btnOK.Enabled = false;
                }
            }
        }
예제 #4
0
 public void setSl(double dSl, bool hsjbz)
 {
     this.SL = dSl;
     this.JE = Finacial.GetRound((double)(this.getDjNoTax(false) * this.SL), 2);
     this.SE = Finacial.GetRound((double)(this.JE * this.SLV), 2);
 }