private List <RoadFlow.Data.Model.AppLibrarySubPages> DataReaderToList(MySqlDataReader dataReader) { List <RoadFlow.Data.Model.AppLibrarySubPages> list = new List <RoadFlow.Data.Model.AppLibrarySubPages>(); RoadFlow.Data.Model.AppLibrarySubPages appLibrarySubPages = null; while (((DbDataReader)dataReader).Read()) { appLibrarySubPages = new RoadFlow.Data.Model.AppLibrarySubPages(); appLibrarySubPages.ID = ((DbDataReader)dataReader).GetString(0).ToGuid(); appLibrarySubPages.AppLibraryID = ((DbDataReader)dataReader).GetString(1).ToGuid(); appLibrarySubPages.Name = ((DbDataReader)dataReader).GetString(2); appLibrarySubPages.Address = ((DbDataReader)dataReader).GetString(3); if (!((DbDataReader)dataReader).IsDBNull(4)) { appLibrarySubPages.Ico = ((DbDataReader)dataReader).GetString(4); } appLibrarySubPages.Sort = ((DbDataReader)dataReader).GetInt32(5); if (!((DbDataReader)dataReader).IsDBNull(6)) { appLibrarySubPages.Note = ((DbDataReader)dataReader).GetString(6); } list.Add(appLibrarySubPages); } return(list); }
public int Update(RoadFlow.Data.Model.AppLibrarySubPages model) { string sql = "UPDATE AppLibrarySubPages SET \r\n\t\t\t\tAppLibraryID=@AppLibraryID,Name=@Name,Address=@Address,Ico=@Ico,Sort=@Sort,Note=@Note\r\n\t\t\t\tWHERE ID=@ID"; SqlParameter[] parameter = new SqlParameter[7] { new SqlParameter("@AppLibraryID", SqlDbType.UniqueIdentifier, -1) { Value = model.AppLibraryID }, new SqlParameter("@Name", SqlDbType.NVarChar, 1000) { Value = model.Name }, new SqlParameter("@Address", SqlDbType.VarChar, 5000) { Value = model.Address }, (model.Ico == null) ? new SqlParameter("@Ico", SqlDbType.VarChar, 5000) { Value = DBNull.Value } : new SqlParameter("@Ico", SqlDbType.VarChar, 5000) { Value = model.Ico }, new SqlParameter("@Sort", SqlDbType.Int, -1) { Value = model.Sort }, (model.Note == null) ? new SqlParameter("@Note", SqlDbType.NVarChar, 4000) { Value = DBNull.Value } : new SqlParameter("@Note", SqlDbType.NVarChar, 4000) { Value = model.Note }, new SqlParameter("@ID", SqlDbType.UniqueIdentifier, -1) { Value = model.ID } }; return(dbHelper.Execute(sql, parameter)); }
public int Add(RoadFlow.Data.Model.AppLibrarySubPages model) { string sql = "INSERT INTO AppLibrarySubPages\r\n\t\t\t\t(ID,AppLibraryID,Name,Address,Ico,Sort,Note) \r\n\t\t\t\tVALUES(@ID,@AppLibraryID,@Name,@Address,@Ico,@Sort,@Note)"; SqlParameter[] parameter = new SqlParameter[7] { new SqlParameter("@ID", SqlDbType.UniqueIdentifier, -1) { Value = model.ID }, new SqlParameter("@AppLibraryID", SqlDbType.UniqueIdentifier, -1) { Value = model.AppLibraryID }, new SqlParameter("@Name", SqlDbType.NVarChar, 1000) { Value = model.Name }, new SqlParameter("@Address", SqlDbType.VarChar, 5000) { Value = model.Address }, (model.Ico == null) ? new SqlParameter("@Ico", SqlDbType.VarChar, 5000) { Value = DBNull.Value } : new SqlParameter("@Ico", SqlDbType.VarChar, 5000) { Value = model.Ico }, new SqlParameter("@Sort", SqlDbType.Int, -1) { Value = model.Sort }, (model.Note == null) ? new SqlParameter("@Note", SqlDbType.NVarChar, 4000) { Value = DBNull.Value } : new SqlParameter("@Note", SqlDbType.NVarChar, 4000) { Value = model.Note } }; return(dbHelper.Execute(sql, parameter)); }
public int Add(RoadFlow.Data.Model.AppLibrarySubPages model) { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Expected O, but got Unknown //IL_0031: Expected O, but got Unknown //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Expected O, but got Unknown //IL_0056: Expected O, but got Unknown //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Expected O, but got Unknown //IL_0075: Expected O, but got Unknown //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Expected O, but got Unknown //IL_0094: Expected O, but got Unknown //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Expected O, but got Unknown //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Expected O, but got Unknown //IL_00d8: Expected O, but got Unknown //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Expected O, but got Unknown //IL_00f9: Expected O, but got Unknown //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Expected O, but got Unknown //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Expected O, but got Unknown //IL_013d: Expected O, but got Unknown string sql = "INSERT INTO applibrarysubpages\r\n\t\t\t\t(ID,AppLibraryID,Name,Address,Ico,Sort,Note) \r\n\t\t\t\tVALUES(@ID,@AppLibraryID,@Name,@Address,@Ico,@Sort,@Note)"; MySqlParameter[] obj = new MySqlParameter[7]; MySqlParameter val = new MySqlParameter("@ID", 253, 36); ((DbParameter)val).Value = model.ID; obj[0] = val; MySqlParameter val2 = new MySqlParameter("@AppLibraryID", 253, 36); ((DbParameter)val2).Value = model.AppLibraryID; obj[1] = val2; MySqlParameter val3 = new MySqlParameter("@Name", 752, -1); ((DbParameter)val3).Value = model.Name; obj[2] = val3; MySqlParameter val4 = new MySqlParameter("@Address", 752, -1); ((DbParameter)val4).Value = model.Address; obj[3] = val4; _003F val5; if (model.Ico != null) { val5 = new MySqlParameter("@Ico", 752, -1); ((DbParameter)val5).Value = model.Ico; } else { val5 = new MySqlParameter("@Ico", 752, -1); ((DbParameter)val5).Value = DBNull.Value; } obj[4] = val5; MySqlParameter val6 = new MySqlParameter("@Sort", 3, 11); ((DbParameter)val6).Value = model.Sort; obj[5] = val6; _003F val7; if (model.Note != null) { val7 = new MySqlParameter("@Note", 752, -1); ((DbParameter)val7).Value = model.Note; } else { val7 = new MySqlParameter("@Note", 752, -1); ((DbParameter)val7).Value = DBNull.Value; } obj[6] = val7; MySqlParameter[] parameter = (MySqlParameter[])obj; return(dbHelper.Execute(sql, parameter)); }
public int Update(RoadFlow.Data.Model.AppLibrarySubPages model) { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Expected O, but got Unknown //IL_0031: Expected O, but got Unknown //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Expected O, but got Unknown //IL_0050: Expected O, but got Unknown //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Expected O, but got Unknown //IL_006f: Expected O, but got Unknown //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Expected O, but got Unknown //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Expected O, but got Unknown //IL_00b3: Expected O, but got Unknown //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Expected O, but got Unknown //IL_00d4: Expected O, but got Unknown //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Expected O, but got Unknown //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Expected O, but got Unknown //IL_0118: Expected O, but got Unknown //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Expected O, but got Unknown //IL_013d: Expected O, but got Unknown string sql = "UPDATE applibrarysubpages SET \r\n\t\t\t\tAppLibraryID=@AppLibraryID,Name=@Name,Address=@Address,Ico=@Ico,Sort=@Sort,Note=@Note\r\n\t\t\t\tWHERE ID=@ID"; MySqlParameter[] obj = new MySqlParameter[7]; MySqlParameter val = new MySqlParameter("@AppLibraryID", 253, 36); ((DbParameter)val).Value = model.AppLibraryID; obj[0] = val; MySqlParameter val2 = new MySqlParameter("@Name", 752, -1); ((DbParameter)val2).Value = model.Name; obj[1] = val2; MySqlParameter val3 = new MySqlParameter("@Address", 752, -1); ((DbParameter)val3).Value = model.Address; obj[2] = val3; _003F val4; if (model.Ico != null) { val4 = new MySqlParameter("@Ico", 752, -1); ((DbParameter)val4).Value = model.Ico; } else { val4 = new MySqlParameter("@Ico", 752, -1); ((DbParameter)val4).Value = DBNull.Value; } obj[3] = val4; MySqlParameter val5 = new MySqlParameter("@Sort", 3, 11); ((DbParameter)val5).Value = model.Sort; obj[4] = val5; _003F val6; if (model.Note != null) { val6 = new MySqlParameter("@Note", 752, -1); ((DbParameter)val6).Value = model.Note; } else { val6 = new MySqlParameter("@Note", 752, -1); ((DbParameter)val6).Value = DBNull.Value; } obj[5] = val6; MySqlParameter val7 = new MySqlParameter("@ID", 253, 36); ((DbParameter)val7).Value = model.ID; obj[6] = val7; MySqlParameter[] parameter = (MySqlParameter[])obj; return(dbHelper.Execute(sql, parameter)); }
public int Add(RoadFlow.Data.Model.AppLibrarySubPages model) { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Expected O, but got Unknown //IL_002c: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Expected O, but got Unknown //IL_004c: Expected O, but got Unknown //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Expected O, but got Unknown //IL_0067: Expected O, but got Unknown //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Expected O, but got Unknown //IL_0082: Expected O, but got Unknown //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Expected O, but got Unknown //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Expected O, but got Unknown //IL_00be: Expected O, but got Unknown //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Expected O, but got Unknown //IL_00de: Expected O, but got Unknown //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Expected O, but got Unknown //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Expected O, but got Unknown //IL_011a: Expected O, but got Unknown string sql = "INSERT INTO AppLibrarySubPages\r\n\t\t\t\t(ID,AppLibraryID,Name,Address,Ico,Sort,Note) \r\n\t\t\t\tVALUES(:ID,:AppLibraryID,:Name,:Address,:Ico,:Sort,:Note)"; OracleParameter[] obj = new OracleParameter[7]; OracleParameter val = new OracleParameter(":ID", 126); ((DbParameter)val).Value = model.ID; obj[0] = val; OracleParameter val2 = new OracleParameter(":AppLibraryID", 126); ((DbParameter)val2).Value = model.AppLibraryID; obj[1] = val2; OracleParameter val3 = new OracleParameter(":Name", 126); ((DbParameter)val3).Value = model.Name; obj[2] = val3; OracleParameter val4 = new OracleParameter(":Address", 126); ((DbParameter)val4).Value = model.Address; obj[3] = val4; _003F val5; if (model.Ico != null) { val5 = new OracleParameter(":Ico", 126); ((DbParameter)val5).Value = model.Ico; } else { val5 = new OracleParameter(":Ico", 126); ((DbParameter)val5).Value = DBNull.Value; } obj[4] = val5; OracleParameter val6 = new OracleParameter(":Sort", 112); ((DbParameter)val6).Value = model.Sort; obj[5] = val6; _003F val7; if (model.Note != null) { val7 = new OracleParameter(":Note", 126); ((DbParameter)val7).Value = model.Note; } else { val7 = new OracleParameter(":Note", 126); ((DbParameter)val7).Value = DBNull.Value; } obj[6] = val7; OracleParameter[] parameter = (OracleParameter[])obj; return(dbHelper.Execute(sql, parameter)); }
public int Update(RoadFlow.Data.Model.AppLibrarySubPages model) { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Expected O, but got Unknown //IL_002c: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Expected O, but got Unknown //IL_0047: Expected O, but got Unknown //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown //IL_0062: Expected O, but got Unknown //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Expected O, but got Unknown //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Expected O, but got Unknown //IL_009e: Expected O, but got Unknown //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Expected O, but got Unknown //IL_00be: Expected O, but got Unknown //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Expected O, but got Unknown //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Expected O, but got Unknown //IL_00fa: Expected O, but got Unknown //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Expected O, but got Unknown //IL_011a: Expected O, but got Unknown string sql = "UPDATE AppLibrarySubPages SET \r\n\t\t\t\tAppLibraryID=:AppLibraryID,Name=:Name,Address=:Address,Ico=:Ico,Sort=:Sort,Note=:Note\r\n\t\t\t\tWHERE ID=:ID"; OracleParameter[] obj = new OracleParameter[7]; OracleParameter val = new OracleParameter(":AppLibraryID", 126); ((DbParameter)val).Value = model.AppLibraryID; obj[0] = val; OracleParameter val2 = new OracleParameter(":Name", 126); ((DbParameter)val2).Value = model.Name; obj[1] = val2; OracleParameter val3 = new OracleParameter(":Address", 126); ((DbParameter)val3).Value = model.Address; obj[2] = val3; _003F val4; if (model.Ico != null) { val4 = new OracleParameter(":Ico", 126); ((DbParameter)val4).Value = model.Ico; } else { val4 = new OracleParameter(":Ico", 126); ((DbParameter)val4).Value = DBNull.Value; } obj[3] = val4; OracleParameter val5 = new OracleParameter(":Sort", 112); ((DbParameter)val5).Value = model.Sort; obj[4] = val5; _003F val6; if (model.Note != null) { val6 = new OracleParameter(":Note", 126); ((DbParameter)val6).Value = model.Note; } else { val6 = new OracleParameter(":Note", 126); ((DbParameter)val6).Value = DBNull.Value; } obj[5] = val6; OracleParameter val7 = new OracleParameter(":ID", 126); ((DbParameter)val7).Value = model.ID; obj[6] = val7; OracleParameter[] parameter = (OracleParameter[])obj; return(dbHelper.Execute(sql, parameter)); }
public int Update(RoadFlow.Data.Model.AppLibrarySubPages model) { return(dataAppLibrarySubPages.Update(model)); }
public int Add(RoadFlow.Data.Model.AppLibrarySubPages model) { return(dataAppLibrarySubPages.Add(model)); }
public ActionResult SubPageEdit(FormCollection collection) { RoadFlow.Platform.AppLibrarySubPages appLibrarySubPages = new RoadFlow.Platform.AppLibrarySubPages(); RoadFlow.Data.Model.AppLibrarySubPages appLibrarySubPages2 = null; string str = base.Request.QueryString["subid"]; if (str.IsGuid()) { appLibrarySubPages2 = appLibrarySubPages.Get(str.ToGuid()); } if (collection != null) { string str2 = base.Request.Form["Title"]; string str3 = base.Request.Form["Address"]; bool flag = false; if (appLibrarySubPages2 == null) { appLibrarySubPages2 = new RoadFlow.Data.Model.AppLibrarySubPages(); flag = true; appLibrarySubPages2.ID = Guid.NewGuid(); appLibrarySubPages2.AppLibraryID = base.Request.QueryString["id"].ToGuid(); } appLibrarySubPages2.Name = str2.Trim1(); appLibrarySubPages2.Address = str3.Trim1(); using (TransactionScope transactionScope = new TransactionScope()) { if (flag) { appLibrarySubPages.Add(appLibrarySubPages2); RoadFlow.Platform.Log.Add("添加了子页面", appLibrarySubPages2.Serialize(), RoadFlow.Platform.Log.Types.菜单权限); base.ViewBag.Script = "alert('添加成功!');window.location='SubPages" + base.Request.Url.Query + "';"; } else { appLibrarySubPages.Update(appLibrarySubPages2); RoadFlow.Platform.Log.Add("修改了子页面", appLibrarySubPages2.Serialize(), RoadFlow.Platform.Log.Types.菜单权限); base.ViewBag.Script = "alert('保存成功!');window.location='SubPages" + base.Request.Url.Query + "';"; } RoadFlow.Platform.AppLibraryButtons1 appLibraryButtons = new RoadFlow.Platform.AppLibraryButtons1(); string obj = base.Request.Form["buttonindex"] ?? ""; List <RoadFlow.Data.Model.AppLibraryButtons1> allByAppID = appLibraryButtons.GetAllByAppID(appLibrarySubPages2.ID); List <RoadFlow.Data.Model.AppLibraryButtons1> list = new List <RoadFlow.Data.Model.AppLibraryButtons1>(); string[] array = obj.Split(','); foreach (string index in array) { string str4 = base.Request.Form["button_" + index]; string str5 = base.Request.Form["buttonname_" + index]; string text = base.Request.Form["buttonevents_" + index]; string ico = base.Request.Form["buttonico_" + index]; string str6 = base.Request.Form["showtype_" + index]; string str7 = base.Request.Form["buttonsort_" + index]; if (!str5.IsNullOrEmpty() && !text.IsNullOrEmpty()) { RoadFlow.Data.Model.AppLibraryButtons1 appLibraryButtons2 = allByAppID.Find((RoadFlow.Data.Model.AppLibraryButtons1 p) => p.ID == index.ToGuid()); bool flag2 = false; if (appLibraryButtons2 == null) { flag2 = true; appLibraryButtons2 = new RoadFlow.Data.Model.AppLibraryButtons1(); appLibraryButtons2.ID = Guid.NewGuid(); } else { list.Add(appLibraryButtons2); } appLibraryButtons2.AppLibraryID = appLibrarySubPages2.ID; if (str4.IsGuid()) { appLibraryButtons2.ButtonID = str4.ToGuid(); } appLibraryButtons2.Events = text; appLibraryButtons2.Ico = ico; appLibraryButtons2.Name = str5.Trim1(); appLibraryButtons2.Sort = str7.ToInt(0); appLibraryButtons2.ShowType = str6.ToInt(0); appLibraryButtons2.Type = 0; if (flag2) { appLibraryButtons.Add(appLibraryButtons2); } else { appLibraryButtons.Update(appLibraryButtons2); } } } foreach (RoadFlow.Data.Model.AppLibraryButtons1 item in allByAppID) { if (list.Find((RoadFlow.Data.Model.AppLibraryButtons1 p) => p.ID == item.ID) == null) { appLibraryButtons.Delete(item.ID); } } transactionScope.Complete(); appLibraryButtons.ClearCache(); appLibrarySubPages.ClearCache(); } } if (appLibrarySubPages2 == null) { appLibrarySubPages2 = new RoadFlow.Data.Model.AppLibrarySubPages(); appLibrarySubPages2.ID = Guid.Empty; appLibrarySubPages2.AppLibraryID = base.Request.QueryString["id"].ToGuid(); } return(View(appLibrarySubPages2)); }