/// <summary> /// 交班 /// </summary> private void exchangeWork() { BranchPayInfoService payService = new BranchPayInfoService(); DateTime first = DateTime.Today; DateTime last = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd 23:59:59")); string sum = payService.FindAmountCashier(first, last, LoginUserInfo.id); DeliverAmountInfo obj = new DeliverAmountInfo(); obj.Id = Guid.NewGuid().ToString().Replace("-", ""); obj.CreateTime = DateTime.Now; obj.UpdateTime = DateTime.Now; obj.AmountCashier = sum; obj.BranchId = LoginUserInfo.branchId; obj.Date = DateTime.Now; obj.Salesman = LoginUserInfo.id; ///保存交班信息到本地数据库 BranchDeliverAmountInfoService branchService = new BranchDeliverAmountInfoService(); branchService.AddDeliverAmountInfo(obj); ///上传交班信息到远处服务器 DeliverAmountInfoService service = new DeliverAmountInfoService(); service.AddDeliverAmountInfo(obj); }
private void BranchHandover_Load(object sender, EventArgs e) { inBrandTextBox.Text = LoginUserInfo.branchName; //分店 salesmanTextBox.Text = LoginUserInfo.name; //业务员 //金额 BranchPayInfoService payService = new BranchPayInfoService(); DateTime first = DateTime.Today; DateTime last = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd 23:59:59")); string sum = payService.FindAmountCashier(first, last, LoginUserInfo.id); moneyTextBox.Text = sum; timeTextBox.Text = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");//时间 }