using iWareCommon.Common.Entity; using iWareDataCore.BASE.Entity; using iWareDataCore.BASE.Service; using iWareWms; using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace FineUIPro.iWareWms.View.SL.PlaceMaterial { public partial class PlaceMaterialDetail : PageBase { protected override void Save(out string msg) { if (!string.IsNullOrEmpty(tbPlacceNo.Text.Trim()) && !string.IsNullOrEmpty(tbMaterialNo.Text.Trim())) { PlaceMaterialService.GetInstance().SaveInfo(tbPlacceNo.Text,tbMaterialNo.Text, out msg); } else { msg = "库位编号和物料编号不能为空!"; } } //protected override void Update(out string msg) //{ // var type = GetPlaceType(); // type.Id = Convert.ToInt32(Request.QueryString["Id"]); // PlaceMaterialService.GetInstance().Update(type, out msg); //} //private PlaceMaterialEntity GetPlaceType() //{ // return new PlaceMaterialEntity // { // }; //} protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (!string.IsNullOrEmpty(Request.QueryString["IsEdit"])) { string msg; var pm = PlaceMaterialViewService.GetInstance().QueryByParam(new QueryParam { Filter = new Dictionary { { "Id", Request.QueryString["Id"] } } }, out msg); if (!string.IsNullOrEmpty(msg)) { return; } tbPlacceNo.Text = pm.Count > 0 ? pm[0].PlaceCode : ""; tbMaterialNo.Text = pm.Count > 0 ? pm[0].MaterialCode : ""; } } } } }