private List <RoadFlow.Data.Model.WorkFlowButtons> DataReaderToList(OracleDataReader dataReader) { List <RoadFlow.Data.Model.WorkFlowButtons> list = new List <RoadFlow.Data.Model.WorkFlowButtons>(); RoadFlow.Data.Model.WorkFlowButtons workFlowButtons = null; while (((DbDataReader)dataReader).Read()) { workFlowButtons = new RoadFlow.Data.Model.WorkFlowButtons(); workFlowButtons.ID = ((DbDataReader)dataReader).GetString(0).ToGuid(); workFlowButtons.Title = ((DbDataReader)dataReader).GetString(1); if (!((DbDataReader)dataReader).IsDBNull(2)) { workFlowButtons.Ico = ((DbDataReader)dataReader).GetString(2); } if (!((DbDataReader)dataReader).IsDBNull(3)) { workFlowButtons.Script = ((DbDataReader)dataReader).GetString(3); } if (!((DbDataReader)dataReader).IsDBNull(4)) { workFlowButtons.Note = ((DbDataReader)dataReader).GetString(4); } workFlowButtons.Sort = ((DbDataReader)dataReader).GetInt32(5); list.Add(workFlowButtons); } return(list); }
private List <RoadFlow.Data.Model.WorkFlowButtons> DataReaderToList(SqlDataReader dataReader) { List <RoadFlow.Data.Model.WorkFlowButtons> list = new List <RoadFlow.Data.Model.WorkFlowButtons>(); RoadFlow.Data.Model.WorkFlowButtons workFlowButtons = null; while (dataReader.Read()) { workFlowButtons = new RoadFlow.Data.Model.WorkFlowButtons(); workFlowButtons.ID = dataReader.GetGuid(0); workFlowButtons.Title = dataReader.GetString(1); if (!dataReader.IsDBNull(2)) { workFlowButtons.Ico = dataReader.GetString(2); } if (!dataReader.IsDBNull(3)) { workFlowButtons.Script = dataReader.GetString(3); } if (!dataReader.IsDBNull(4)) { workFlowButtons.Note = dataReader.GetString(4); } workFlowButtons.Sort = dataReader.GetInt32(5); list.Add(workFlowButtons); } return(list); }
public RoadFlow.Data.Model.WorkFlowButtons Get(Guid id, bool fromCache = false) { if (fromCache) { RoadFlow.Data.Model.WorkFlowButtons workFlowButtons = GetAll(true).Find((RoadFlow.Data.Model.WorkFlowButtons p) => p.ID == id); if (workFlowButtons != null) { return(workFlowButtons); } return(dataWorkFlowButtons.Get(id)); } return(dataWorkFlowButtons.Get(id)); }
public int Update(RoadFlow.Data.Model.WorkFlowButtons model) { string sql = "UPDATE WorkFlowButtons SET \r\n\t\t\t\tTitle=@Title,Ico=@Ico,Script=@Script,Note=@Note,Sort=@Sort\r\n\t\t\t\tWHERE ID=@ID"; SqlParameter[] parameter = new SqlParameter[6] { new SqlParameter("@Title", SqlDbType.NVarChar, 1000) { Value = model.Title }, (model.Ico == null) ? new SqlParameter("@Ico", SqlDbType.VarChar, 500) { Value = DBNull.Value } : new SqlParameter("@Ico", SqlDbType.VarChar, 500) { Value = model.Ico }, (model.Script == null) ? new SqlParameter("@Script", SqlDbType.VarChar, -1) { Value = DBNull.Value } : new SqlParameter("@Script", SqlDbType.VarChar, -1) { Value = model.Script }, (model.Note == null) ? new SqlParameter("@Note", SqlDbType.VarChar, -1) { Value = DBNull.Value } : new SqlParameter("@Note", SqlDbType.VarChar, -1) { Value = model.Note }, new SqlParameter("@Sort", SqlDbType.Int, -1) { Value = model.Sort }, new SqlParameter("@ID", SqlDbType.UniqueIdentifier, -1) { Value = model.ID } }; return(dbHelper.Execute(sql, parameter)); }
public int Add(RoadFlow.Data.Model.WorkFlowButtons model) { string sql = "INSERT INTO WorkFlowButtons\r\n\t\t\t\t(ID,Title,Ico,Script,Note,Sort) \r\n\t\t\t\tVALUES(@ID,@Title,@Ico,@Script,@Note,@Sort)"; SqlParameter[] parameter = new SqlParameter[6] { new SqlParameter("@ID", SqlDbType.UniqueIdentifier, -1) { Value = model.ID }, new SqlParameter("@Title", SqlDbType.NVarChar, 1000) { Value = model.Title }, (model.Ico == null) ? new SqlParameter("@Ico", SqlDbType.VarChar, 500) { Value = DBNull.Value } : new SqlParameter("@Ico", SqlDbType.VarChar, 500) { Value = model.Ico }, (model.Script == null) ? new SqlParameter("@Script", SqlDbType.VarChar, -1) { Value = DBNull.Value } : new SqlParameter("@Script", SqlDbType.VarChar, -1) { Value = model.Script }, (model.Note == null) ? new SqlParameter("@Note", SqlDbType.VarChar, -1) { Value = DBNull.Value } : new SqlParameter("@Note", SqlDbType.VarChar, -1) { Value = model.Note }, new SqlParameter("@Sort", SqlDbType.Int, -1) { Value = model.Sort } }; return(dbHelper.Execute(sql, parameter)); }
public string Delete() { RoadFlow.Platform.WorkFlowButtons workFlowButtons = new RoadFlow.Platform.WorkFlowButtons(); string[] array = base.Request.Form["ids"].Split(','); for (int i = 0; i < array.Length; i++) { Guid test; if (array[i].IsGuid(out test)) { RoadFlow.Data.Model.WorkFlowButtons workFlowButtons2 = workFlowButtons.Get(test); if (workFlowButtons2 != null) { workFlowButtons.Delete(test); RoadFlow.Platform.Log.Add("删除了流程按钮", workFlowButtons2.Serialize(), RoadFlow.Platform.Log.Types.流程相关); } } } workFlowButtons.ClearCache(); return("删除成功!"); }
public ActionResult Edit(FormCollection collection) { RoadFlow.Platform.WorkFlowButtons workFlowButtons = new RoadFlow.Platform.WorkFlowButtons(); RoadFlow.Data.Model.WorkFlowButtons workFlowButtons2 = null; string str = base.Request.QueryString["id"]; string empty = string.Empty; string empty2 = string.Empty; string empty3 = string.Empty; string empty4 = string.Empty; string empty5 = string.Empty; Guid test; if (str.IsGuid(out test)) { workFlowButtons2 = workFlowButtons.Get(test); } string oldXML = workFlowButtons2.Serialize(); if (collection != null) { empty = base.Request.Form["Title"]; empty2 = base.Request.Form["Ico"]; empty3 = base.Request.Form["Script"]; empty4 = base.Request.Form["Note"]; empty5 = base.Request.Form["Sort"]; bool num = !str.IsGuid(); if (workFlowButtons2 == null) { workFlowButtons2 = new RoadFlow.Data.Model.WorkFlowButtons { ID = Guid.NewGuid(), Sort = workFlowButtons.GetMaxSort() }; } workFlowButtons2.Ico = (empty2.IsNullOrEmpty() ? null : empty2.Trim()); workFlowButtons2.Note = (empty4.IsNullOrEmpty() ? null : empty4.Trim()); workFlowButtons2.Script = (empty3.IsNullOrEmpty() ? null : empty3); workFlowButtons2.Title = empty.Trim(); if (empty5.IsInt()) { workFlowButtons2.Sort = empty5.ToInt(); } else { workFlowButtons2.Sort = workFlowButtons.GetMaxSort(); } if (num) { workFlowButtons.Add(workFlowButtons2); RoadFlow.Platform.Log.Add("添加了流程按钮", workFlowButtons2.Serialize(), RoadFlow.Platform.Log.Types.流程相关); } else { workFlowButtons.Update(workFlowButtons2); RoadFlow.Platform.Log.Add("修改了流程按钮", "", RoadFlow.Platform.Log.Types.流程相关, oldXML, workFlowButtons2.Serialize()); } workFlowButtons.ClearCache(); base.ViewBag.Script = "new RoadUI.Window().reloadOpener();alert('保存成功!');new RoadUI.Window().close();"; } if (workFlowButtons2 == null) { workFlowButtons2 = new RoadFlow.Data.Model.WorkFlowButtons(); workFlowButtons2.Sort = workFlowButtons.GetMaxSort(); } return(View(workFlowButtons2)); }
public int Add(RoadFlow.Data.Model.WorkFlowButtons 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_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Expected O, but got Unknown //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0088: 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_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Expected O, but got Unknown //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Expected O, but got Unknown //IL_011c: 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 = "INSERT INTO workflowbuttons\r\n\t\t\t\t(ID,Title,Ico,Script,Note,Sort) \r\n\t\t\t\tVALUES(@ID,@Title,@Ico,@Script,@Note,@Sort)"; MySqlParameter[] obj = new MySqlParameter[6]; MySqlParameter val = new MySqlParameter("@ID", 253, 36); ((DbParameter)val).Value = model.ID; obj[0] = val; MySqlParameter val2 = new MySqlParameter("@Title", 752, -1); ((DbParameter)val2).Value = model.Title; obj[1] = val2; _003F val3; if (model.Ico != null) { val3 = new MySqlParameter("@Ico", 752, -1); ((DbParameter)val3).Value = model.Ico; } else { val3 = new MySqlParameter("@Ico", 752, -1); ((DbParameter)val3).Value = DBNull.Value; } obj[2] = val3; _003F val4; if (model.Script != null) { val4 = new MySqlParameter("@Script", 751, -1); ((DbParameter)val4).Value = model.Script; } else { val4 = new MySqlParameter("@Script", 751, -1); ((DbParameter)val4).Value = DBNull.Value; } obj[3] = val4; _003F val5; if (model.Note != null) { val5 = new MySqlParameter("@Note", 751, -1); ((DbParameter)val5).Value = model.Note; } else { val5 = new MySqlParameter("@Note", 751, -1); ((DbParameter)val5).Value = DBNull.Value; } obj[4] = val5; MySqlParameter val6 = new MySqlParameter("@Sort", 3, 11); ((DbParameter)val6).Value = model.Sort; obj[5] = val6; MySqlParameter[] parameter = (MySqlParameter[])obj; return(dbHelper.Execute(sql, parameter)); }
public int Update(RoadFlow.Data.Model.WorkFlowButtons model) { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Expected O, but got Unknown //IL_002b: Expected O, but got Unknown //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Expected O, but got Unknown //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: 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_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Expected O, but got Unknown //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Expected O, but got Unknown //IL_00f7: Expected O, but got Unknown //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0106: 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 workflowbuttons SET \r\n\t\t\t\tTitle=@Title,Ico=@Ico,Script=@Script,Note=@Note,Sort=@Sort\r\n\t\t\t\tWHERE ID=@ID"; MySqlParameter[] obj = new MySqlParameter[6]; MySqlParameter val = new MySqlParameter("@Title", 752, -1); ((DbParameter)val).Value = model.Title; obj[0] = val; _003F val2; if (model.Ico != null) { val2 = new MySqlParameter("@Ico", 752, -1); ((DbParameter)val2).Value = model.Ico; } else { val2 = new MySqlParameter("@Ico", 752, -1); ((DbParameter)val2).Value = DBNull.Value; } obj[1] = val2; _003F val3; if (model.Script != null) { val3 = new MySqlParameter("@Script", 751, -1); ((DbParameter)val3).Value = model.Script; } else { val3 = new MySqlParameter("@Script", 751, -1); ((DbParameter)val3).Value = DBNull.Value; } obj[2] = val3; _003F val4; if (model.Note != null) { val4 = new MySqlParameter("@Note", 751, -1); ((DbParameter)val4).Value = model.Note; } else { val4 = new MySqlParameter("@Note", 751, -1); ((DbParameter)val4).Value = DBNull.Value; } obj[3] = val4; MySqlParameter val5 = new MySqlParameter("@Sort", 3, 11); ((DbParameter)val5).Value = model.Sort; obj[4] = val5; MySqlParameter val6 = new MySqlParameter("@ID", 253, 36); ((DbParameter)val6).Value = model.ID; obj[5] = val6; MySqlParameter[] parameter = (MySqlParameter[])obj; return(dbHelper.Execute(sql, parameter)); }
public int Update(RoadFlow.Data.Model.WorkFlowButtons model) { return(dataWorkFlowButtons.Update(model)); }
public int Add(RoadFlow.Data.Model.WorkFlowButtons model) { return(dataWorkFlowButtons.Add(model)); }
public int Add(RoadFlow.Data.Model.WorkFlowButtons model) { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Expected O, but got Unknown //IL_002e: Expected O, but got Unknown //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Expected O, but got Unknown //IL_004e: Expected O, but got Unknown //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Expected O, but got Unknown //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0088: 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_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Expected O, but got Unknown //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Expected O, but got Unknown //IL_00d0: Expected O, but got Unknown //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Expected O, but got Unknown //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Expected O, but got Unknown //IL_010c: Expected O, but got Unknown //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Expected O, but got Unknown //IL_012c: Expected O, but got Unknown string sql = "INSERT INTO WorkFlowButtons\r\n\t\t\t\t(ID,Title,Ico,Script,Note,Sort) \r\n\t\t\t\tVALUES(:ID,:Title,:Ico,:Script,:Note,:Sort)"; OracleParameter[] obj = new OracleParameter[6]; OracleParameter val = new OracleParameter(":ID", 126, 40); ((DbParameter)val).Value = model.ID; obj[0] = val; OracleParameter val2 = new OracleParameter(":Title", 119, 1000); ((DbParameter)val2).Value = model.Title; obj[1] = val2; _003F val3; if (model.Ico != null) { val3 = new OracleParameter(":Ico", 126, 500); ((DbParameter)val3).Value = model.Ico; } else { val3 = new OracleParameter(":Ico", 126, 500); ((DbParameter)val3).Value = DBNull.Value; } obj[2] = val3; _003F val4; if (model.Script != null) { val4 = new OracleParameter(":Script", 105); ((DbParameter)val4).Value = model.Script; } else { val4 = new OracleParameter(":Script", 105); ((DbParameter)val4).Value = DBNull.Value; } obj[3] = val4; _003F val5; if (model.Note != null) { val5 = new OracleParameter(":Note", 105); ((DbParameter)val5).Value = model.Note; } else { val5 = new OracleParameter(":Note", 105); ((DbParameter)val5).Value = DBNull.Value; } obj[4] = val5; OracleParameter val6 = new OracleParameter(":Sort", 112); ((DbParameter)val6).Value = model.Sort; obj[5] = val6; OracleParameter[] parameter = (OracleParameter[])obj; return(dbHelper.Execute(sql, parameter)); }
public int Update(RoadFlow.Data.Model.WorkFlowButtons 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_002b: Expected O, but got Unknown //IL_002c: Expected O, but got Unknown //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Expected O, but got Unknown //IL_0072: Expected O, but got Unknown //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Expected O, but got Unknown //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Expected O, but got Unknown //IL_00ae: Expected O, but got Unknown //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Expected O, but got Unknown //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Expected O, but got Unknown //IL_00ea: Expected O, but got Unknown //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Expected O, but got Unknown //IL_010a: Expected O, but got Unknown //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Expected O, but got Unknown //IL_012c: Expected O, but got Unknown string sql = "UPDATE WorkFlowButtons SET \r\n\t\t\t\tTitle=:Title,Ico=:Ico,Script=:Script,Note=:Note,Sort=:Sort\r\n\t\t\t\tWHERE ID=:ID"; OracleParameter[] obj = new OracleParameter[6]; OracleParameter val = new OracleParameter(":Title", 119, 1000); ((DbParameter)val).Value = model.Title; obj[0] = val; _003F val2; if (model.Ico != null) { val2 = new OracleParameter(":Ico", 126, 500); ((DbParameter)val2).Value = model.Ico; } else { val2 = new OracleParameter(":Ico", 126, 500); ((DbParameter)val2).Value = DBNull.Value; } obj[1] = val2; _003F val3; if (model.Script != null) { val3 = new OracleParameter(":Script", 105); ((DbParameter)val3).Value = model.Script; } else { val3 = new OracleParameter(":Script", 105); ((DbParameter)val3).Value = DBNull.Value; } obj[2] = val3; _003F val4; if (model.Note != null) { val4 = new OracleParameter(":Note", 105); ((DbParameter)val4).Value = model.Note; } else { val4 = new OracleParameter(":Note", 105); ((DbParameter)val4).Value = DBNull.Value; } obj[3] = val4; OracleParameter val5 = new OracleParameter(":Sort", 112); ((DbParameter)val5).Value = model.Sort; obj[4] = val5; OracleParameter val6 = new OracleParameter(":ID", 126, 40); ((DbParameter)val6).Value = model.ID; obj[5] = val6; OracleParameter[] parameter = (OracleParameter[])obj; return(dbHelper.Execute(sql, parameter)); }