public ActionResult Sort(FormCollection collection) { RoadFlow.Platform.Dictionary dictionary1 = new RoadFlow.Platform.Dictionary(); string str1 = this.Request.QueryString["id"]; string str2 = ""; List <RoadFlow.Data.Model.Dictionary> dictionaryList = new List <RoadFlow.Data.Model.Dictionary>(); Guid test1; if (str1.IsGuid(out test1)) { RoadFlow.Data.Model.Dictionary dictionary2 = dictionary1.Get(test1, false); if (dictionary2 != null) { dictionaryList = dictionary1.GetChilds(dictionary2.ParentID, false); str2 = dictionary2.ParentID.ToString(); } } if (collection != null) { string str3 = this.Request.Form["sort"]; if (str3.IsNullOrEmpty()) { return((ActionResult)this.View((object)dictionaryList)); } string[] strArray = str3.Split(','); int num = 1; foreach (string str4 in strArray) { Guid test2; if (str4.IsGuid(out test2)) { dictionary1.UpdateSort(test2, num++); } } dictionary1.RefreshCache(); RoadFlow.Platform.Log.Add("保存了数据字典排序", "保存了ID为:" + str1 + "的同级排序", RoadFlow.Platform.Log.Types.数据字典, "", "", (RoadFlow.Data.Model.Users)null); // ISSUE: reference to a compiler-generated field if (DictController.\u003C\u003Eo__11.\u003C\u003Ep__0 == null) { // ISSUE: reference to a compiler-generated field DictController.\u003C\u003Eo__11.\u003C\u003Ep__0 = CallSite <Func <CallSite, object, string, object> > .Create(Binder.SetMember(CSharpBinderFlags.None, "Script", typeof(DictController), (IEnumerable <CSharpArgumentInfo>) new CSharpArgumentInfo[2] { CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, (string)null), CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.UseCompileTimeType, (string)null) })); } // ISSUE: reference to a compiler-generated field // ISSUE: reference to a compiler-generated field object obj = DictController.\u003C\u003Eo__11.\u003C\u003Ep__0.Target((CallSite)DictController.\u003C\u003Eo__11.\u003C\u003Ep__0, this.ViewBag, "parent.frames[0].reLoad('" + str2 + "');"); dictionaryList = dictionary1.GetChilds(str2.ToGuid(), false); } return((ActionResult)this.View((object)dictionaryList)); }
public ActionResult Sort(FormCollection collection) { RoadFlow.Platform.Dictionary BDict = new RoadFlow.Platform.Dictionary(); string id = Request.QueryString["id"]; string refreshID = ""; Guid dictid; List <RoadFlow.Data.Model.Dictionary> dicts = new List <RoadFlow.Data.Model.Dictionary>(); if (id.IsGuid(out dictid)) { var dict = BDict.Get(dictid); if (dict != null) { dicts = BDict.GetChilds(dict.ParentID); refreshID = dict.ParentID.ToString(); } } if (collection != null) { string sortdict = Request.Form["sort"]; if (sortdict.IsNullOrEmpty()) { return(View(dicts)); } string[] sortArray = sortdict.Split(','); int i = 1; foreach (string id1 in sortArray) { Guid gid; if (id1.IsGuid(out gid)) { BDict.UpdateSort(gid, i++); } } BDict.RefreshCache(); RoadFlow.Platform.Log.Add("保存了数据字典排序", "保存了ID为:" + id + "的同级排序", RoadFlow.Platform.Log.Types.数据字典); ViewBag.Script = "parent.frames[0].reLoad('" + refreshID + "');"; dicts = BDict.GetChilds(refreshID.ToGuid()); } return(View(dicts)); }
protected void Page_Load(object sender, EventArgs e) { RoadFlow.Platform.Dictionary BDict = new RoadFlow.Platform.Dictionary(); string id = Request.QueryString["id"]; string refreshID = ""; Guid dictid; if (id.IsGuid(out dictid)) { var dict = BDict.Get(dictid); if (dict != null) { DictList = BDict.GetChilds(dict.ParentID); refreshID = dict.ParentID.ToString(); } } if (IsPostBack) { string sortdict = Request.Form["sort"]; if (sortdict.IsNullOrEmpty()) { return; } string[] sortArray = sortdict.Split(','); int i = 1; foreach (string id1 in sortArray) { Guid gid; if (id1.IsGuid(out gid)) { BDict.UpdateSort(gid, i++); } } BDict.RefreshCache(); RoadFlow.Platform.Log.Add("保存了数据字典排序", "保存了ID为:" + id + "的同级排序", RoadFlow.Platform.Log.Types.数据字典); Page.ClientScript.RegisterStartupScript(Page.GetType(), "ok", "parent.frames[0].reLoad('" + refreshID + "');", true); DictList = BDict.GetChilds(refreshID.ToGuid()); } }