获取单据类型的参数设置原创
金蝶云社区-Thomas
Thomas
0人赞赏了该文章 1,573次浏览 未经作者许可,禁止转载编辑于2022年01月04日 14:26:46

[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";
    
}

图标赞 0
0人点赞
还没有人点赞,快来当第一个点赞的人吧!
图标打赏
0人打赏
还没有人打赏,快来当第一个打赏的人吧!