[Description("根据单据类型对业务类型辅助")]
public class CommonSetBusinessType : AbstractBillPlugIn
{
// Token: 0x0600002E RID: 46 RVA: 0x00003720 File Offset: 0x00001920
public override void BeforeBindData(EventArgs e)
{
base.BeforeBindData(e);
this.SetBusinessTypeByBillType();
}
// Token: 0x0600002F RID: 47 RVA: 0x00003730 File Offset: 0x00001930
private void SetBusinessTypeByBillType()
{
string billTypePara = base.View.BillBusinessInfo.GetForm().BillTypePara;
string text = "BUSINESSTYPE";
string text2 = "FBUSINESSTYPE";
DynamicObject dynamicObject = base.View.Model.GetValue("FBillTypeID") as DynamicObject;
if (dynamicObject == null)
{
return;
}
DynamicObject dynamicObject2 = BusinessDataServiceHelper.LoadBillTypePara(base.Context, billTypePara, dynamicObject["Id"].ToString(), true);
if (dynamicObject2 == null || (!dynamicObject2.DynamicObjectType.Properties.ContainsKey(text) && !dynamicObject2.DynamicObjectType.Properties.ContainsKey(text2)))
{
return;
}
if (dynamicObject2.DynamicObjectType.Properties.ContainsKey(text))
{
this.SetValue(dynamicObject2, text);
return;
}
this.SetValue(dynamicObject2, text2);
}
// Token: 0x06000030 RID: 48 RVA: 0x000037F4 File Offset: 0x000019F4
private void SetValue(DynamicObject paraObj, string strBizProperty)
{
string value = paraObj[strBizProperty].ToString();
object value2 = base.View.Model.GetValue("FBUSINESSTYPE");
if (!value2.ToString().Equals(value))
{
base.View.Model.SetValue("FBUSINESSTYPE", paraObj[strBizProperty]);
}
}
// Token: 0x04000008 RID: 8
protected const string FBILLTYPEID = "FBillTypeID";
}
推荐阅读