/// <summary> /// 修改:根据订单号更新状态 /// </summary> /// <param name="theOrderCode">订单号</param> /// <param name="sealState">订单状态</param> /// <returns></returns> public static async Task SetSealStateForTheOrderCode(string theOrderCode, string sealState) { using (var db = new DAL.TheOrderDAL()) { var data = await db.GetAll().FirstAsync(m => m.TheOrderCode == theOrderCode); data.SealState = sealState; await db.EditAsync(data); } }
/// <summary> /// 根据订单号更新,取章人姓名/身份证号/手机号码 /// </summary> /// <param name="theOrderCode">订单号</param> /// <param name="takeSealName">取章人姓名</param> /// <param name="idCard">身份证号</param> /// <param name="phone">手机号码</param> /// <returns></returns> public static async Task SetForTheOrderCode(string theOrderCode, string takeSealName, string idCard, string phone) { using (var db = new DAL.TheOrderDAL()) { var data = await db.GetAll().FirstAsync(m => m.TheOrderCode == theOrderCode); data.TakeSealName = takeSealName; data.IdCard = idCard; data.Phone = phone; data.DeliveryTime = DateTime.Now; await db.EditAsync(data); } }
/// <summary> /// 根据Id修改订单信息 /// </summary> /// <param name="id"></param> /// <param name="model"></param> /// <returns></returns> public static async Task Edit(int id, Models.TheOrder model) { using (var db = new DAL.TheOrderDAL()) { var data = await db.GetAll().FirstAsync(m => m.Id == id); data.TheOrderCode = model.TheOrderCode; data.ForTheRecordType = model.ForTheRecordType; data.SealMakingUnitInfor_Name = model.SealMakingUnitInfor_Name; data.TheRegistrationArea = model.TheRegistrationArea; data.TakeSealName = model.TakeSealName; data.TakeTime = model.TakeTime; data.IdCard = model.IdCard; data.Phone = model.Phone; data.DeliveryTime = model.DeliveryTime; data.UpTime = model.UpTime; await db.EditAsync(data); } }