示例#1
0
 private void setDgv1Up()
 {
     if (txtInput.Text.Equals("0"))
     {
         dgv1[col1Up, 0].Value = int.Parse(cf.NumberNull(dgv1[col1Up, 0].Value)) + int.Parse(txtUp.Text);
     }
     else if (txtInput.Text.Equals("1"))
     {
         dgv1[col1Up, 1].Value = int.Parse(cf.NumberNull(dgv1[col1Up, 1].Value)) + int.Parse(txtUp.Text);
     }
     else if (txtInput.Text.Equals("2"))
     {
         dgv1[col1Up, 2].Value = int.Parse(cf.NumberNull(dgv1[col1Up, 2].Value)) + int.Parse(txtUp.Text);
     }
     else if (txtInput.Text.Equals("3"))
     {
         dgv1[col1Up, 3].Value = int.Parse(cf.NumberNull(dgv1[col1Up, 3].Value)) + int.Parse(txtUp.Text);
     }
     else if (txtInput.Text.Equals("4"))
     {
         dgv1[col1Up, 4].Value = int.Parse(cf.NumberNull(dgv1[col1Up, 4].Value)) + int.Parse(txtUp.Text);
     }
     else if (txtInput.Text.Equals("5"))
     {
         dgv1[col1Up, 5].Value = int.Parse(cf.NumberNull(dgv1[col1Up, 5].Value)) + int.Parse(txtUp.Text);
     }
     else if (txtInput.Text.Equals("6"))
     {
         dgv1[col1Up, 6].Value = int.Parse(cf.NumberNull(dgv1[col1Up, 6].Value)) + int.Parse(txtUp.Text);
     }
     else if (txtInput.Text.Equals("7"))
     {
         dgv1[col1Up, 7].Value = int.Parse(cf.NumberNull(dgv1[col1Up, 7].Value)) + int.Parse(txtUp.Text);
     }
     else if (txtInput.Text.Equals("8"))
     {
         dgv1[col1Up, 8].Value = int.Parse(cf.NumberNull(dgv1[col1Up, 8].Value)) + int.Parse(txtUp.Text);
     }
     else if (txtInput.Text.Equals("9"))
     {
         dgv1[col1Up, 9].Value = int.Parse(cf.NumberNull(dgv1[col1Up, 9].Value)) + int.Parse(txtUp.Text);
     }
 }
示例#2
0
        public List <Reward1> selectByLenNumber(String yearId, String monthId, String periodId, String rateId)
        {
            List <Reward1> lRew1 = new List <Reward1>();
            DataTable      dt    = lotdb.selectByLenNumber(yearId, monthId, periodId, rateId);

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                Reward1 rew1 = new Reward1();
                rew1.number = dt.Rows[i][lotdb.lot.number].ToString();
                if (rateId.Equals("up"))
                {
                    rew1.Amt     = Double.Parse(cf.NumberNull(dt.Rows[i][lotdb.lot.up]));
                    rew1.PayRate = Double.Parse(cf.NumberNull(dt.Rows[i][lotdb.lot.rUpRate]));
                    rew1.Reward  = Double.Parse(cf.NumberNull(dt.Rows[i][lotdb.lot.rUp]));
                    //rew1.AmtReward = Double.Parse(cf.NumberNull(dt.Rows[i][lotdb.lot.rUp]));
                }
                else if (rateId.Equals("down"))
                {
                    rew1.Amt     = Double.Parse(cf.NumberNull(dt.Rows[i][lotdb.lot.down]));
                    rew1.PayRate = Double.Parse(cf.NumberNull(dt.Rows[i][lotdb.lot.rDownRate]));
                    rew1.Reward  = Double.Parse(cf.NumberNull(dt.Rows[i][lotdb.lot.rDown]));
                }
                else if (rateId.Equals("2down"))
                {
                    rew1.Amt     = Double.Parse(cf.NumberNull(dt.Rows[i][lotdb.lot.down]));
                    rew1.PayRate = Double.Parse(cf.NumberNull(dt.Rows[i][lotdb.lot.r2DownRate]));
                    rew1.Reward  = Double.Parse(cf.NumberNull(dt.Rows[i][lotdb.lot.r2Down]));
                }
                else if (rateId.Equals("2up"))
                {
                    rew1.Amt     = Double.Parse(cf.NumberNull(dt.Rows[i][lotdb.lot.up]));
                    rew1.PayRate = Double.Parse(cf.NumberNull(dt.Rows[i][lotdb.lot.r2UpRate]));
                    rew1.Reward  = Double.Parse(cf.NumberNull(dt.Rows[i][lotdb.lot.r2Up]));
                }
                else if (rateId.Equals("3down"))
                {
                    rew1.Amt     = Double.Parse(cf.NumberNull(dt.Rows[i][lotdb.lot.down]));
                    rew1.PayRate = Double.Parse(cf.NumberNull(dt.Rows[i][lotdb.lot.r3DownRate]));
                    rew1.Reward  = Double.Parse(cf.NumberNull(dt.Rows[i][lotdb.lot.r3Down]));
                }
                else if (rateId.Equals("3tod"))
                {
                    rew1.Amt     = Double.Parse(cf.NumberNull(dt.Rows[i][lotdb.lot.tod]));
                    rew1.PayRate = Double.Parse(cf.NumberNull(dt.Rows[i][lotdb.lot.r3TodRate]));
                    rew1.Reward  = Double.Parse(cf.NumberNull(dt.Rows[i][lotdb.lot.r3Tod]));
                }
                else if (rateId.Equals("3up"))
                {
                    rew1.Amt     = Double.Parse(cf.NumberNull(dt.Rows[i][lotdb.lot.up]));
                    rew1.PayRate = Double.Parse(cf.NumberNull(dt.Rows[i][lotdb.lot.r3UpRate]));
                    rew1.Reward  = Double.Parse(cf.NumberNull(dt.Rows[i][lotdb.lot.r3Up]));
                }
                lRew1.Add(rew1);
            }
            return(lRew1);
        }