コード例 #1
0
 public override void DataChanged(DataChangedEventArgs e)
 {
     base.DataChanged(e);
     if (e.Field.Key.ToUpperInvariant().Equals("F_PAEZ_ZCLB1"))
     {
         if ((DynamicObject)base.View.Model.GetValue("F_PAEZ_ZCLB1") != null)
         {
             // CodeRuleService service = new CodeRuleService();
             DynamicObject obj  = this.Model.DataObject as DynamicObject;
             DynamicObject obj2 = obj["F_PAEZ_ZCLB1"] as DynamicObject;
             if (obj2 == null)
             {
             }
             DynamicObject   obj3        = obj2["FAssetApplyRuleCodeID"] as DynamicObject;
             FormMetadata    metadata    = ServiceHelper.GetService <IMetaDataService>().Load(this.Context, "FA_REQUISITION", true) as FormMetadata;
             DynamicObject[] dataEntites = new DynamicObject[1];
             dataEntites[0] = OrmUtils.Clone(obj, false, true) as DynamicObject;
             BusinessInfo info = ObjectUtils.CreateCopy(metadata.BusinessInfo) as BusinessInfo;
             info.GetBillNoField().Entity.TableName = "";
             IBusinessDataService instance = ServiceHelper.GetService <IBusinessDataService>();
             string []            billno   = (from p in ServiceHelper.GetService <IBusinessDataService>().GetBillNo(this.Context, info, dataEntites, false, obj3["ID"].ToString()) select p.BillNo).ToList <string>().ToArray();
         }
     }
 }