protected void Page_Load(object sender, EventArgs e) { if (RequestActionString == "batchdelete") { DoBatchDelete(); } else if (RequestActionString == "markDelivery") { DeliveryOrder pc = DeliveryOrder.Find(this.RequestData.Get <string>("Id")); pc.State = "已出库"; pc.Save(); ////添加交易记录 //TransactionHi his = new TransactionHi //{ // Child = pc.Child, // CId = pc.CId, // CName = pc.CName, // CreateId = UserInfo.UserID, // CreateName = UserInfo.Name, // CreateTime = DateTime.Now, // RtnOrOut = "购买", // Number = pc.Number, // TransactionTime = DateTime.Now //}; //his.DoCreate(); //自动计算客户余额 //Customer custom = Customer.Find(pc.CId); //custom.PreDeposit = custom.PreDeposit - pc.TotalMoneyHis <= 0 ? 0 : custom.PreDeposit - pc.TotalMoneyHis; //custom.Save(); //计算仓库数量 } else if (RequestActionString == "print") { //Print(); } else { DoSelect(); } }