/// <summary>
        /// 转换业务对象装填
        /// </summary>
        /// <param name="ctx"></param>
        /// <param name="tableName">状态字段所在物理表名</param>
        /// <param name="fieldName">状态字段名</param>
        /// <param name="fieldValue">要转换成的状态值</param>
        /// <param name="pkFieldName">物料表主键列名</param>
        /// <param name="pkFieldValues">主键值集合</param>
        public void setState(Context ctx, string tableName, string fieldName, string fieldValue, string pkFieldName, object[] pkFieldValues)
        {
            //获取数据服务
            IBusinessDataService businessDataService = ServiceHelper.GetService <IBusinessDataService>();

            businessDataService.SetState(ctx, tableName, fieldName, fieldValue, pkFieldName, pkFieldValues);
        }
Beispiel #2
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();
         }
     }
 }