protected void Page_Load(object sender, EventArgs e) { string id = Request.QueryString["id"]; this.Code.Attributes.Add("validate_url", "CheckCode.ashx?id=" + id); if (id.IsGuid()) { dict = bdict.Get(id.ToGuid()); } if (dict == null) { dict = bdict.GetRoot(); } if (IsPostBack && dict != null) { string refreshID = dict.ParentID == Guid.Empty ? dict.ID.ToString() : dict.ParentID.ToString(); //删除 if (!Request.Form["Delete"].IsNullOrEmpty()) { int i = bdict.DeleteAndAllChilds(dict.ID); bdict.RefreshCache(); RoadFlow.Platform.Log.Add("删除了数据字典及其下级共" + i.ToString() + "项", dict.Serialize(), RoadFlow.Platform.Log.Types.数据字典); Page.ClientScript.RegisterStartupScript(Page.GetType(), "ok", "alert('删除成功!');parent.frames[0].reLoad('" + refreshID + "');window.location='Body.aspx?id=" + dict.ParentID.ToString() + "&appid=" + Request.QueryString["appid"] + "';", true); } //保存 if (!Request.Form["Save"].IsNullOrEmpty()) { string title = Request.Form["Title1"]; string code = Request.Form["Code"]; string values = Request.Form["Values"]; string note = Request.Form["Note"]; string other = Request.Form["Other"]; string oldXML = dict.Serialize(); dict.Code = code.IsNullOrEmpty() ? null : code.Trim(); dict.Note = note.IsNullOrEmpty() ? null : note.Trim(); dict.Other = other.IsNullOrEmpty() ? null : other.Trim(); dict.Title = title.Trim(); dict.Value = values.IsNullOrEmpty() ? null : values.Trim(); bdict.Update(dict); bdict.RefreshCache(); RoadFlow.Platform.Log.Add("修改了数据字典项", "", RoadFlow.Platform.Log.Types.数据字典, oldXML, dict.Serialize()); Page.ClientScript.RegisterStartupScript(Page.GetType(), "ok", "alert('保存成功!');parent.frames[0].reLoad('" + refreshID + "');", true); } } if (dict != null) { this.Title1.Value = dict.Title; this.Code.Value = dict.Code; this.Values.Value = dict.Value; this.Note.Value = dict.Note; this.Other.Value = dict.Other; } }
public ActionResult Body(FormCollection collection) { RoadFlow.Platform.Dictionary bdict = new RoadFlow.Platform.Dictionary(); RoadFlow.Data.Model.Dictionary dict = null; string id = Request.QueryString["id"]; if (id.IsGuid()) { dict = bdict.Get(id.ToGuid()); } if (dict == null) { dict = bdict.GetRoot(); } if (collection != null) { string refreshID = dict.ParentID == Guid.Empty ? dict.ID.ToString() : dict.ParentID.ToString(); //删除 if (!Request.Form["Delete"].IsNullOrEmpty()) { int i = bdict.DeleteAndAllChilds(dict.ID); bdict.RefreshCache(); RoadFlow.Platform.Log.Add("删除了数据字典及其下级共" + i.ToString() + "项", dict.Serialize(), RoadFlow.Platform.Log.Types.数据字典); ViewBag.Script = "alert('删除成功!');parent.frames[0].reLoad('" + refreshID + "');window.location='Body?id=" + dict.ParentID.ToString() + "&appid=" + Request.QueryString["appid"] + "';"; return(View(dict)); } string title = Request.Form["Title"]; string code = Request.Form["Code"]; string values = Request.Form["Values"]; string note = Request.Form["Note"]; string other = Request.Form["Other"]; string oldXML = dict.Serialize(); dict.Code = code.IsNullOrEmpty() ? null : code.Trim(); dict.Note = note.IsNullOrEmpty() ? null : note.Trim(); dict.Other = other.IsNullOrEmpty() ? null : other.Trim(); dict.Title = title.Trim(); dict.Value = values.IsNullOrEmpty() ? null : values.Trim(); bdict.Update(dict); bdict.RefreshCache(); RoadFlow.Platform.Log.Add("修改了数据字典项", "", RoadFlow.Platform.Log.Types.数据字典, oldXML, dict.Serialize()); ViewBag.Script = "alert('保存成功!');parent.frames[0].reLoad('" + refreshID + "');"; } return(View(dict)); }
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 add1(FormCollection collection) { RoadFlow.Data.Model.Dictionary model = new RoadFlow.Data.Model.Dictionary(); RoadFlow.Platform.Dictionary dictionary = new RoadFlow.Platform.Dictionary(); string str1 = this.Request.QueryString["id"]; if (!str1.IsGuid()) { RoadFlow.Data.Model.Dictionary root = dictionary.GetRoot(); str1 = root != null?root.ID.ToString() : ""; } if (!str1.IsGuid()) { throw new Exception("未找到父级"); } if (collection != null) { string str2 = this.Request.Form["Title"]; string str3 = this.Request.Form["Code"]; string str4 = this.Request.Form["Values"]; string str5 = this.Request.Form["Note"]; string str6 = this.Request.Form["Other"]; model.ID = Guid.NewGuid(); model.Code = str3.IsNullOrEmpty() ? (string)null : str3.Trim(); model.Note = str5.IsNullOrEmpty() ? (string)null : str5.Trim(); model.Other = str6.IsNullOrEmpty() ? (string)null : str6.Trim(); model.ParentID = str1.ToGuid(); model.Sort = dictionary.GetMaxSort(str1.ToGuid()); model.Title = str2.Trim(); model.Value = str4.IsNullOrEmpty() ? (string)null : str4.Trim(); dictionary.Add(model); dictionary.RefreshCache(); RoadFlow.Platform.Log.Add("添加了数据字典项", model.Serialize(), RoadFlow.Platform.Log.Types.数据字典, "", "", (RoadFlow.Data.Model.Users)null); // ISSUE: reference to a compiler-generated field if (DictController.\u003C\u003Eo__9.\u003C\u003Ep__0 == null) { // ISSUE: reference to a compiler-generated field DictController.\u003C\u003Eo__9.\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__9.\u003C\u003Ep__0.Target((CallSite)DictController.\u003C\u003Eo__9.\u003C\u003Ep__0, this.ViewBag, "alert('添加成功!');parent.frames[0].reLoad('" + str1 + "');"); } return((ActionResult)this.View((object)model)); }
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)); }
public ActionResult add1(FormCollection collection) { RoadFlow.Data.Model.Dictionary dict = new RoadFlow.Data.Model.Dictionary(); RoadFlow.Platform.Dictionary bdict = new RoadFlow.Platform.Dictionary(); string id = Request.QueryString["id"]; if (!id.IsGuid()) { var dictRoot = bdict.GetRoot(); id = dictRoot != null?dictRoot.ID.ToString() : ""; } if (!id.IsGuid()) { throw new Exception("未找到父级"); } if (collection != null) { string title = Request.Form["Title"]; string code = Request.Form["Code"]; string values = Request.Form["Values"]; string note = Request.Form["Note"]; string other = Request.Form["Other"]; dict.ID = Guid.NewGuid(); dict.Code = code.IsNullOrEmpty() ? null : code.Trim(); dict.Note = note.IsNullOrEmpty() ? null : note.Trim(); dict.Other = other.IsNullOrEmpty() ? null : other.Trim(); dict.ParentID = id.ToGuid(); dict.Sort = bdict.GetMaxSort(id.ToGuid()); dict.Title = title.Trim(); dict.Value = values.IsNullOrEmpty() ? null : values.Trim(); bdict.Add(dict); bdict.RefreshCache(); RoadFlow.Platform.Log.Add("添加了数据字典项", dict.Serialize(), RoadFlow.Platform.Log.Types.数据字典); ViewBag.Script = "alert('添加成功!');parent.frames[0].reLoad('" + id + "');"; } return(View(dict)); }
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()); } }
protected void Page_Load(object sender, EventArgs e) { if (IsPostBack) { RoadFlow.Data.Model.Dictionary dict = new RoadFlow.Data.Model.Dictionary(); RoadFlow.Platform.Dictionary bdict = new RoadFlow.Platform.Dictionary(); string id = Request.QueryString["id"]; if (!id.IsGuid()) { var dictRoot = bdict.GetRoot(); id = dictRoot != null?dictRoot.ID.ToString() : ""; } if (!id.IsGuid()) { throw new Exception("未找到父级"); } string title = Request.Form["Title1"]; string code = Request.Form["Code"]; string values = Request.Form["Values"]; string note = Request.Form["Note"]; string other = Request.Form["Other"]; dict.ID = Guid.NewGuid(); dict.Code = code.IsNullOrEmpty() ? null : code.Trim(); dict.Note = note.IsNullOrEmpty() ? null : note.Trim(); dict.Other = other.IsNullOrEmpty() ? null : other.Trim(); dict.ParentID = id.ToGuid(); dict.Sort = bdict.GetMaxSort(id.ToGuid()); dict.Title = title.Trim(); dict.Value = values.IsNullOrEmpty() ? null : values.Trim(); bdict.Add(dict); bdict.RefreshCache(); RoadFlow.Platform.Log.Add("添加了数据字典项", dict.Serialize(), RoadFlow.Platform.Log.Types.数据字典); Page.ClientScript.RegisterStartupScript(Page.GetType(), "ok", "alert('添加成功!');parent.frames[0].reLoad('" + id + "');", true); } }
public ActionResult Body(FormCollection collection) { RoadFlow.Platform.Dictionary dictionary = new RoadFlow.Platform.Dictionary(); RoadFlow.Data.Model.Dictionary model = (RoadFlow.Data.Model.Dictionary)null; string str1 = this.Request.QueryString["id"]; if (str1.IsGuid()) { model = dictionary.Get(str1.ToGuid(), false); } if (model == null) { model = dictionary.GetRoot(); } if (collection != null) { Guid guid; string str2; if (!(model.ParentID == Guid.Empty)) { guid = model.ParentID; str2 = guid.ToString(); } else { guid = model.ID; str2 = guid.ToString(); } string str3 = str2; if (!this.Request.Form["Delete"].IsNullOrEmpty()) { int num = dictionary.DeleteAndAllChilds(model.ID); dictionary.RefreshCache(); RoadFlow.Platform.Log.Add("删除了数据字典及其下级共" + num.ToString() + "项", model.Serialize(), RoadFlow.Platform.Log.Types.数据字典, "", "", (RoadFlow.Data.Model.Users)null); // ISSUE: reference to a compiler-generated field if (DictController.\u003C\u003Eo__5.\u003C\u003Ep__0 == null) { // ISSUE: reference to a compiler-generated field DictController.\u003C\u003Eo__5.\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 Func <CallSite, object, string, object> target = DictController.\u003C\u003Eo__5.\u003C\u003Ep__0.Target; // ISSUE: reference to a compiler-generated field CallSite <Func <CallSite, object, string, object> > p0 = DictController.\u003C\u003Eo__5.\u003C\u003Ep__0; object viewBag = this.ViewBag; string[] strArray = new string[7] { "alert('删除成功!');parent.frames[0].reLoad('", str3, "');window.location='Body?id=", null, null, null, null }; int index = 3; guid = model.ParentID; string str4 = guid.ToString(); strArray[index] = str4; strArray[4] = "&appid="; strArray[5] = this.Request.QueryString["appid"]; strArray[6] = "';"; string str5 = string.Concat(strArray); object obj = target((CallSite)p0, viewBag, str5); return((ActionResult)this.View((object)model)); } string str6 = this.Request.Form["Title"]; string str7 = this.Request.Form["Code"]; string str8 = this.Request.Form["Values"]; string str9 = this.Request.Form["Note"]; string str10 = this.Request.Form["Other"]; string oldXML = model.Serialize(); model.Code = str7.IsNullOrEmpty() ? (string)null : str7.Trim(); model.Note = str9.IsNullOrEmpty() ? (string)null : str9.Trim(); model.Other = str10.IsNullOrEmpty() ? (string)null : str10.Trim(); model.Title = str6.Trim(); model.Value = str8.IsNullOrEmpty() ? (string)null : str8.Trim(); dictionary.Update(model); dictionary.RefreshCache(); RoadFlow.Platform.Log.Add("修改了数据字典项", "", RoadFlow.Platform.Log.Types.数据字典, oldXML, model.Serialize(), (RoadFlow.Data.Model.Users)null); // ISSUE: reference to a compiler-generated field if (DictController.\u003C\u003Eo__5.\u003C\u003Ep__1 == null) { // ISSUE: reference to a compiler-generated field DictController.\u003C\u003Eo__5.\u003C\u003Ep__1 = 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 obj1 = DictController.\u003C\u003Eo__5.\u003C\u003Ep__1.Target((CallSite)DictController.\u003C\u003Eo__5.\u003C\u003Ep__1, this.ViewBag, "alert('保存成功!');parent.frames[0].reLoad('" + str3 + "');"); } return((ActionResult)this.View((object)model)); }