/** * DeliverPresswork.aspx.cs * * 功 能: 订单发货 * 类 名: DeliverPresswork * * Ver 变更日期 负责人 变更内容 * ─────────────────────────────────── * V0.01 2013-5-17 12:00 吴崎均 初版 * * * * * */ using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using CY.Infrastructure.Common; using CY.Model; using CY.BLL.EC; using CY.WebForm.cs; namespace CY.WebForm.Pages.business { /// /// 订单发货 /// public partial class DeliverPresswork : BasePage { private EC_OrderBasicBLL _eC_OrderBasicBLL = null; /// /// 初始化构造 /// public DeliverPresswork() { _eC_OrderBasicBLL = new EC_OrderBasicBLL(); } protected void Page_Load(object sender, EventArgs e) { try { switch (Request["Target"]) { case "SaveInfo": SaveAwbInfo(); break; case "GetDataById": LoadModelById(); break; default://一般情况不处理 LoadModelById(); if (IsPostBack || IsCallback) return; else { } return; } } catch (Exception ex) { PAGEHandleException(ex); Response.Clear(); Response.Write("-1"); } Response.End(); } /// /// 根据编号加载数据 /// /// private bool LoadModelById() { // DealMvc.Common.Net.DealString.ChangeSQL(Request["ParamName"]) int? id = MyConvert.ConvertToInt32(Request["id"]); if (!id.HasValue) return false; EC_AwbInfo _eC_AwbInfo = _eC_OrderBasicBLL.SelectAwbInfoById(id.Value); txtModeldata.Value = null == _eC_AwbInfo ? "" : JsonHelper.GetJsonStringByObject(_eC_AwbInfo); return true; } /// /// 保存信息 /// private void SaveAwbInfo() { EC_AwbInfo eC_AwbInfo = new EC_AwbInfo(); eC_AwbInfo.Operate.OrderId = eC_AwbInfo.Keyid; eC_AwbInfo.Operate.Remark = eC_AwbInfo.Remark; eC_AwbInfo.Operate.Operator = CurrentUser.ShortName; eC_AwbInfo.Operate.OperateType = 5; WebUtil.SaveData(_eC_OrderBasicBLL.DeliverPresswork, _eC_OrderBasicBLL.DeliverPresswork, eC_AwbInfo); } } }