Browse Source

修改耘肯 详见需求单138610 }、【销售出库】的基本属性{订单辅助号}、【

master
wushukun 8 years ago
parent
commit
1fca7ff1e3
3 changed files with 145 additions and 1 deletions
  1. +1
    -0
      BWP.B3_YunKen.Web/BWP.B3_YunKen.Web.csproj
  2. +19
    -1
      BWP.B3_YunKen.Web/Pages/B3YunKen/Overlays/SaleOutStoreEdit_Ext.cs
  3. +125
    -0
      BWP.B3_YunKen.Web/Pages/YunKenDFEntityLink.cs

+ 1
- 0
BWP.B3_YunKen.Web/BWP.B3_YunKen.Web.csproj View File

@ -173,6 +173,7 @@
</Compile>
<Compile Include="Pages\TypeIOCs\SaleOutStorePrintAfterAddParameters.cs" />
<Compile Include="Pages\Utils\Second_ConvertRatioRowManager.cs" />
<Compile Include="Pages\YunKenDFEntityLink.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="PluginClass.cs" />
</ItemGroup>


+ 19
- 1
BWP.B3_YunKen.Web/Pages/B3YunKen/Overlays/SaleOutStoreEdit_Ext.cs View File

@ -7,6 +7,10 @@ using BWP.Web.Layout;
using TSingSoft.WebControls2;
using BWP.Web.Utils;
using BWP.B3Sale.Utils;
using TSingSoft.WebPluginFramework;
using System.Web.UI.WebControls;
using BWP.B3Sale.BO;
using BWP.Web.WebControls;
namespace BWP.Web.Pages.B3YunKen.Overlays
{
@ -33,7 +37,17 @@ namespace BWP.Web.Pages.B3YunKen.Overlays
//需求单No.137672 【销售出库】‘基本属性’增加字段{承运方}
config.Add("Carrier_ID");
layoutManager.Add("Code", new DFValueLabel());
var code = new YunKenDFEntityLink(typeof(Order), "Order_ID");
layoutManager.Add("Code", code);
//var linkButton = new LinkButton();
//var url = string.Format("~/B3Sale/Bills/SaleOutStore_/SaleOutStoreEdit.aspx?id='+__DFContainer.getValue('Order_ID')+'");
//linkButton.OnClientClick = string.Format("OpenUrlInTopTab('{0}','出库辅单号');return false;",
// WpfPageUrl.ToGlobal(url));
//layoutManager.Add("Code", linkButton);
config.Add("Code");
}
@ -48,6 +62,10 @@ namespace BWP.Web.Pages.B3YunKen.Overlays
base.AddLayOutManagerScript(layoutPanel);
var idCard = layoutPanel.EnsureInputControlCreated<DFChoiceBox>("DriverIDCard");//司机身份证号下拉
var carid = layoutPanel.EnsureInputControlCreated<DFChoiceBox>("Car_ID");//运输车辆下拉
//选择司机身份证号带出驾驶证号和司机名字
if (idCard != null)
{


+ 125
- 0
BWP.B3_YunKen.Web/Pages/YunKenDFEntityLink.cs View File

@ -0,0 +1,125 @@
using BWP.B3Frameworks.Attributes;
using BWP.B3Sale.BO;
using BWP.Web.Utils;
using Forks.EnterpriseServices.DataForm;
using Forks.Utils.TypeDescs;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TSingSoft.WebControls2;
using TSingSoft.WebPluginFramework;
namespace BWP.Web.Pages
{
public class YunKenDFEntityLink : DFControl, IDFFieldEditor
{
public YunKenDFEntityLink() : base()
{
}
public void InitEntityType(Type type)
{
mEntityType = type;
}
Type mEntityType;
string mLinkIDField;
public YunKenDFEntityLink(Type entityType, string linkIDField )
{
mEntityType = entityType;
mLinkIDField = linkIDField;
}
internal string Text
{
get { return (string)ViewState["Text"]; }
set { ViewState["Text"] = value; }
}
public void ApplyValueToUI(object value)
{
Text = string.Empty;
if (value == null)
{
return;
}
var str = value as string;
if (string.IsNullOrEmpty(str))
{
return;
}
DFInfo info = DFField.DFInfo as DFInfo;
if (info == null)
{
return;
}
IDotNetTypeDesc type = info.DFClass as IDotNetTypeDesc;
if (type == null)
{
return;
}
//+info.DFClass { BWP.B3Sale.BO.SaleOutStore}
//Forks.Utils.TypeDescs.ITypeDesc { Forks.Utils.TypeDescs.DotNetTypeDesc}
var id = WebBLUtil.GetDmoProperty<object>(type.Type, mLinkIDField, new Tuple<string, object>(DFField.Name, str));
if (id == null)
{
return;
}
var url = EditUrlAttribute.GetUrl(mEntityType);
if (string.IsNullOrEmpty(url))
{
throw new Exception(string.Format("未能得到对象{0}的编辑页面", DFInfo.Get(mEntityType).LogicName));
}
url = AspUtil.AddTimeStampToUrl(WpfPageUrl.ToGlobal(url));
url = AspUtil.AddParamToUrl(url, "ID", id.ToString());
Text = string.Format("<a href='#' onclick=\"javascript:OpenUrlInTopTab('{0}')\">{1}</a>", url, value);
}
public object GetValueFromUI()
{
return null;
}
public bool Readonly
{
get
{
return true;
}
set
{
}
}
public void ApplyToUI(object dfObject)
{
ApplyValueToUI(DFField.GetValue(dfObject));
}
public void GetFromUI(object dfObject)
{
}
public void ValidInput()
{
}
protected override void Render(System.Web.UI.HtmlTextWriter writer)
{
writer.Write(Text);
}
}
}

Loading…
Cancel
Save