Exemplo n.º 1
0
 public void AddShiftInfo(ShiftInfo shiftInfo)
 {
     string sql = "INSERT INTO `shiftInfo`(`userName`,`shiftTime`,`turnoverMoney`,`cashMoney`,`vesaMoney`,`preMoney`,`disMoney`,`runMoney`,`billCount`,`isDay`)VALUES (@userName,@shiftTime,@turnoverMoney,@cashMoney,@vesaMoney,@preMoney,@disMoney,@runMoney,@billCount,@isDay)";
     DbUtil.ExecuteNonQuery(sql,
         new MySqlParameter("@userName",shiftInfo.userName),
         new MySqlParameter("@shiftTime",shiftInfo.shiftTime),
         new MySqlParameter("@turnoverMoney", shiftInfo.turnoverMoney),
         new MySqlParameter("@cashMoney", shiftInfo.cashMoney),
         new MySqlParameter("@vesaMoney", shiftInfo.vesaMoney),
         new MySqlParameter("@preMoney", shiftInfo.preMoney),
         new MySqlParameter("@disMoney", shiftInfo.disMoney),
         new MySqlParameter("@runMoney", shiftInfo.runMoney),
         new MySqlParameter("@billCount", shiftInfo.billCount),
         new MySqlParameter("@isDay",shiftInfo.isDay));
 }
Exemplo n.º 2
0
 public ShiftInfo ToShiftInfo(DataRow row)
 {
     ShiftInfo shiftInfo = new ShiftInfo();
     shiftInfo.billCount = (int)row["billCount"];
     shiftInfo.cashMoney = (float)row["cashMoney"];
     shiftInfo.disMoney = (float)row["disMoney"];
     shiftInfo.id = (int)row["id"];
     shiftInfo.preMoney = (float)row["preMoney"];
     shiftInfo.runMoney = (float)row["runMoney"];
     shiftInfo.shiftTime = (string)row["shiftTime"];
     shiftInfo.turnoverMoney = (float)row["turnoverMoney"];
     shiftInfo.userName = (string)row["userName"];
     shiftInfo.vesaMoney = (float)row["vesaMoney"];
     shiftInfo.isDay = (int)row["isDay"];
     return shiftInfo;
 }
Exemplo n.º 3
0
 private void lbShift_Click(object sender, EventArgs e)
 {
     ShiftInfo shift = new ShiftInfo();
     shift.billCount = Convert.ToInt32(tbBillCount.Text);
     shift.cashMoney = float.Parse(tbCashSum.Text);
     shift.disMoney = float.Parse(tbDisSum.Text);
     shift.preMoney = float.Parse(tbPreSum.Text);
     shift.runMoney = float.Parse(tbRunSum.Text);
     shift.shiftTime = tbTime.Text;
     shift.turnoverMoney = float.Parse(tbTurnover.Text);
     shift.userName = App.userName;
     shift.vesaMoney = float.Parse(tbVesaSum.Text);
     shift.isDay = 0;
     ShiftInfoService service = new ShiftInfoService();
     service.AddShiftInfo(shift);
     MessageBox.Show("交班成功");
 }