public int Update(RoadFlow.Data.Model.DocumentsReadUsers model) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Expected O, but got Unknown //IL_002d: Expected O, but got Unknown //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Expected O, but got Unknown //IL_0052: Expected O, but got Unknown //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Expected O, but got Unknown //IL_0077: Expected O, but got Unknown string sql = "UPDATE documentsreadusers SET \r\n\t\t\t\tIsRead=@IsRead\r\n\t\t\t\tWHERE DocumentID=@DocumentID and UserID=@UserID"; MySqlParameter[] obj = new MySqlParameter[3]; MySqlParameter val = new MySqlParameter("@IsRead", 3, 11); ((DbParameter)val).Value = model.IsRead; obj[0] = val; MySqlParameter val2 = new MySqlParameter("@DocumentID", 253, 36); ((DbParameter)val2).Value = model.DocumentID; obj[1] = val2; MySqlParameter val3 = new MySqlParameter("@UserID", 253, 36); ((DbParameter)val3).Value = model.UserID; obj[2] = val3; MySqlParameter[] parameter = (MySqlParameter[])obj; return(dbHelper.Execute(sql, parameter)); }
public int Update(RoadFlow.Data.Model.DocumentsReadUsers 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_006b: Expected O, but got Unknown //IL_006c: Expected O, but got Unknown string sql = "UPDATE DocumentsReadUsers SET \r\n\t\t\t\tIsRead=:IsRead\r\n\t\t\t\tWHERE DocumentID=:DocumentID and UserID=:UserID"; OracleParameter[] obj = new OracleParameter[3]; OracleParameter val = new OracleParameter(":IsRead", 112); ((DbParameter)val).Value = model.IsRead; obj[0] = val; OracleParameter val2 = new OracleParameter(":DocumentID", 126); ((DbParameter)val2).Value = model.DocumentID; obj[1] = val2; OracleParameter val3 = new OracleParameter(":UserID", 126); ((DbParameter)val3).Value = model.UserID; obj[2] = val3; OracleParameter[] parameter = (OracleParameter[])obj; return(dbHelper.Execute(sql, parameter)); }
public int Add(RoadFlow.Data.Model.DocumentsReadUsers 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_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Expected O, but got Unknown //IL_0077: Expected O, but got Unknown string sql = "INSERT INTO documentsreadusers\r\n\t\t\t\t(DocumentID,UserID,IsRead) \r\n\t\t\t\tVALUES(@DocumentID,@UserID,@IsRead)"; MySqlParameter[] obj = new MySqlParameter[3]; MySqlParameter val = new MySqlParameter("@DocumentID", 253, 36); ((DbParameter)val).Value = model.DocumentID; obj[0] = val; MySqlParameter val2 = new MySqlParameter("@UserID", 253, 36); ((DbParameter)val2).Value = model.UserID; obj[1] = val2; MySqlParameter val3 = new MySqlParameter("@IsRead", 3, 11); ((DbParameter)val3).Value = model.IsRead; obj[2] = val3; MySqlParameter[] parameter = (MySqlParameter[])obj; return(dbHelper.Execute(sql, parameter)); }
private List <RoadFlow.Data.Model.DocumentsReadUsers> DataReaderToList(OracleDataReader dataReader) { List <RoadFlow.Data.Model.DocumentsReadUsers> list = new List <RoadFlow.Data.Model.DocumentsReadUsers>(); RoadFlow.Data.Model.DocumentsReadUsers documentsReadUsers = null; while (((DbDataReader)dataReader).Read()) { documentsReadUsers = new RoadFlow.Data.Model.DocumentsReadUsers(); documentsReadUsers.DocumentID = ((DbDataReader)dataReader).GetString(0).ToGuid(); documentsReadUsers.UserID = ((DbDataReader)dataReader).GetString(1).ToGuid(); documentsReadUsers.IsRead = ((DbDataReader)dataReader).GetInt32(2); list.Add(documentsReadUsers); } return(list); }
private List <RoadFlow.Data.Model.DocumentsReadUsers> DataReaderToList(SqlDataReader dataReader) { List <RoadFlow.Data.Model.DocumentsReadUsers> list = new List <RoadFlow.Data.Model.DocumentsReadUsers>(); RoadFlow.Data.Model.DocumentsReadUsers documentsReadUsers = null; while (dataReader.Read()) { documentsReadUsers = new RoadFlow.Data.Model.DocumentsReadUsers(); documentsReadUsers.DocumentID = dataReader.GetGuid(0); documentsReadUsers.UserID = dataReader.GetGuid(1); documentsReadUsers.IsRead = dataReader.GetInt32(2); list.Add(documentsReadUsers); } return(list); }
public int Update(RoadFlow.Data.Model.DocumentsReadUsers model) { string sql = "UPDATE DocumentsReadUsers SET \r\n\t\t\t\tIsRead=@IsRead\r\n\t\t\t\tWHERE DocumentID=@DocumentID and UserID=@UserID"; SqlParameter[] parameter = new SqlParameter[3] { new SqlParameter("@IsRead", SqlDbType.Int, -1) { Value = model.IsRead }, new SqlParameter("@DocumentID", SqlDbType.UniqueIdentifier, -1) { Value = model.DocumentID }, new SqlParameter("@UserID", SqlDbType.UniqueIdentifier, -1) { Value = model.UserID } }; return(dbHelper.Execute(sql, parameter)); }
public int Add(RoadFlow.Data.Model.DocumentsReadUsers model) { string sql = "INSERT INTO DocumentsReadUsers\r\n\t\t\t\t(DocumentID,UserID,IsRead) \r\n\t\t\t\tVALUES(@DocumentID,@UserID,@IsRead)"; SqlParameter[] parameter = new SqlParameter[3] { new SqlParameter("@DocumentID", SqlDbType.UniqueIdentifier, -1) { Value = model.DocumentID }, new SqlParameter("@UserID", SqlDbType.UniqueIdentifier, -1) { Value = model.UserID }, new SqlParameter("@IsRead", SqlDbType.Int, -1) { Value = model.IsRead } }; return(dbHelper.Execute(sql, parameter)); }
public ActionResult DocAdd(FormCollection collection) { string str = base.Request.QueryString["docid"]; RoadFlow.Platform.Documents documents = new RoadFlow.Platform.Documents(); RoadFlow.Platform.DocumentDirectory documentDirectory = new RoadFlow.Platform.DocumentDirectory(); RoadFlow.Platform.DocumentsReadUsers documentsReadUsers = new RoadFlow.Platform.DocumentsReadUsers(); RoadFlow.Data.Model.Documents documents2 = null; if (str.IsGuid()) { documents2 = documents.Get(str.ToGuid()); } if (collection != null) { string str2 = base.Request.Form["DirectoryID"]; string str3 = base.Request.Form["Title1"]; string readUsers = base.Request.Form["ReadUsers"]; string text = base.Request.Form["Source"]; string contents = base.Request.Form["Contents"]; string files = base.Request.Form["Files"]; string oldXML = string.Empty; bool flag = false; if (documents2 == null) { flag = true; documents2 = new RoadFlow.Data.Model.Documents(); documents2.ID = Guid.NewGuid(); documents2.ReadCount = 0; documents2.WriteTime = DateTimeNew.Now; documents2.WriteUserID = RoadFlow.Platform.Users.CurrentUserID; documents2.WriteUserName = RoadFlow.Platform.Users.CurrentUserName; } else { oldXML = documents2.Serialize(); } documents2.Contents = contents; documents2.DirectoryID = str2.ToGuid(); documents2.DirectoryName = documentDirectory.GetName(documents2.DirectoryID); documents2.EditTime = DateTimeNew.Now; documents2.EditUserID = RoadFlow.Platform.Users.CurrentUserID; documents2.EditUserName = RoadFlow.Platform.Users.CurrentUserName; documents2.Files = files; documents2.ReadUsers = readUsers; documents2.Source = (text.IsNullOrEmpty() ? " " : text); documents2.Title = str3.Trim1(); if (flag) { documents.Add(documents2); RoadFlow.Platform.Log.Add("添加了文档", documents2.Serialize(), RoadFlow.Platform.Log.Types.文档中心); } else { documents.Update(documents2); RoadFlow.Platform.Log.Add("修改了文档", documents2.Serialize(), RoadFlow.Platform.Log.Types.文档中心, oldXML, documents2.Serialize()); } List <RoadFlow.Data.Model.Users> obj = documents2.ReadUsers.IsNullOrEmpty() ? documentDirectory.GetReadUsers(documents2.DirectoryID) : new RoadFlow.Platform.Organize().GetAllUsers(documents2.ReadUsers); documentsReadUsers.Delete(documents2.ID); bool isUse = RoadFlow.Platform.WeiXin.Config.IsUse; Message message = new Message(); StringBuilder stringBuilder = new StringBuilder(); foreach (RoadFlow.Data.Model.Users item in obj) { RoadFlow.Data.Model.DocumentsReadUsers documentsReadUsers2 = new RoadFlow.Data.Model.DocumentsReadUsers(); documentsReadUsers2.DocumentID = documents2.ID; documentsReadUsers2.IsRead = 0; documentsReadUsers2.UserID = item.ID; documentsReadUsers.Add(documentsReadUsers2); if (isUse) { stringBuilder.Append(item.Account); stringBuilder.Append('|'); } } string empty = string.Empty; empty = ((!flag) ? ("'DocRead" + base.Request.Url.Query + "'") : ("'List" + base.Request.Url.Query + "'")); if (isUse) { message.SendText(documents2.Title, stringBuilder.ToString().TrimEnd('|'), "", "", 0, new Agents().GetAgentIDByCode("weixinagents_documents"), true); } base.ViewBag.script = "alert('保存成功!');window.location=" + empty + ";"; } if (documents2 == null) { documents2 = new RoadFlow.Data.Model.Documents(); } return(View(documents2)); }
public int Update(RoadFlow.Data.Model.DocumentsReadUsers model) { return(dataDocumentsReadUsers.Update(model)); }
public int Add(RoadFlow.Data.Model.DocumentsReadUsers model) { return(dataDocumentsReadUsers.Add(model)); }