public int Add(RoadFlow.Data.Model.WorkGroup 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_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Expected O, but got Unknown //IL_00d3: Expected O, but got Unknown string sql = "INSERT INTO workgroup\r\n\t\t\t\t(ID,Name,Members,Note,IntID) \r\n\t\t\t\tVALUES(@ID,@Name,@Members,@Note,@IntID)"; MySqlParameter[] obj = new MySqlParameter[5]; MySqlParameter val = new MySqlParameter("@ID", 253, 36); ((DbParameter)val).Value = model.ID; obj[0] = val; MySqlParameter val2 = new MySqlParameter("@Name", 752, -1); ((DbParameter)val2).Value = model.Name; obj[1] = val2; MySqlParameter val3 = new MySqlParameter("@Members", 751, -1); ((DbParameter)val3).Value = model.Members; 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("@IntID", 3, -1); ((DbParameter)val5).Value = model.IntID; obj[4] = val5; MySqlParameter[] parameter = (MySqlParameter[])obj; return(dbHelper.Execute(sql, parameter)); }
public int Update(RoadFlow.Data.Model.WorkGroup 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_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_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Expected O, but got Unknown //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Expected O, but got Unknown //IL_0083: Expected O, but got Unknown //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Expected O, but got Unknown //IL_00a3: Expected O, but got Unknown //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Expected O, but got Unknown //IL_00c5: Expected O, but got Unknown string sql = "UPDATE WorkGroup SET \r\n\t\t\t\tName=:Name,Members=:Members,Note=:Note,IntID=:IntID \r\n\t\t\t\tWHERE ID=:ID"; OracleParameter[] obj = new OracleParameter[5]; OracleParameter val = new OracleParameter(":Name", 119, 1000); ((DbParameter)val).Value = model.Name; obj[0] = val; OracleParameter val2 = new OracleParameter(":Members", 105); ((DbParameter)val2).Value = model.Members; obj[1] = val2; _003F val3; if (model.Note != null) { val3 = new OracleParameter(":Note", 119); ((DbParameter)val3).Value = model.Note; } else { val3 = new OracleParameter(":Note", 119); ((DbParameter)val3).Value = DBNull.Value; } obj[2] = val3; OracleParameter val4 = new OracleParameter(":IntID", 112); ((DbParameter)val4).Value = model.IntID; obj[3] = val4; OracleParameter val5 = new OracleParameter(":ID", 126, 40); ((DbParameter)val5).Value = model.ID; obj[4] = val5; OracleParameter[] parameter = (OracleParameter[])obj; return(dbHelper.Execute(sql, parameter)); }
public int Update(RoadFlow.Data.Model.WorkGroup 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_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Expected O, but got Unknown //IL_004a: Expected O, but got Unknown //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Expected O, but got Unknown //IL_008e: Expected O, but got Unknown //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009c: 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_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Expected O, but got Unknown //IL_00d3: Expected O, but got Unknown string sql = "UPDATE workgroup SET \r\n\t\t\t\tName=@Name,Members=@Members,Note=@Note,IntID=@IntID \r\n\t\t\t\tWHERE ID=@ID"; MySqlParameter[] obj = new MySqlParameter[5]; MySqlParameter val = new MySqlParameter("@Name", 752, -1); ((DbParameter)val).Value = model.Name; obj[0] = val; MySqlParameter val2 = new MySqlParameter("@Members", 751, -1); ((DbParameter)val2).Value = model.Members; obj[1] = val2; _003F val3; if (model.Note != null) { val3 = new MySqlParameter("@Note", 751, -1); ((DbParameter)val3).Value = model.Note; } else { val3 = new MySqlParameter("@Note", 751, -1); ((DbParameter)val3).Value = DBNull.Value; } obj[2] = val3; MySqlParameter val4 = new MySqlParameter("@IntID", 3, -1); ((DbParameter)val4).Value = model.IntID; obj[3] = val4; MySqlParameter val5 = new MySqlParameter("@ID", 253, 36); ((DbParameter)val5).Value = model.ID; obj[4] = val5; MySqlParameter[] parameter = (MySqlParameter[])obj; return(dbHelper.Execute(sql, parameter)); }
public int Add(RoadFlow.Data.Model.WorkGroup model) { string sql = "INSERT INTO WorkGroup\r\n\t\t\t\t(ID,Name,Members,Note,IntID) \r\n\t\t\t\tVALUES(@ID,@Name,@Members,@Note,@IntID)"; SqlParameter[] parameter = new SqlParameter[5] { new SqlParameter("@ID", SqlDbType.UniqueIdentifier, -1) { Value = model.ID }, new SqlParameter("@Name", SqlDbType.NVarChar, 1000) { Value = model.Name }, new SqlParameter("@Members", SqlDbType.VarChar, -1) { Value = model.Members }, (model.Note == null) ? new SqlParameter("@Note", SqlDbType.NVarChar, -1) { Value = DBNull.Value } : new SqlParameter("@Note", SqlDbType.NVarChar, -1) { Value = model.Note }, new SqlParameter("@IntID", SqlDbType.Int, -1) { Value = model.IntID } }; return(dbHelper.Execute(sql, parameter)); }
public int Update(RoadFlow.Data.Model.WorkGroup model) { string sql = "UPDATE WorkGroup SET \r\n\t\t\t\tName=@Name,Members=@Members,Note=@Note,IntID=@IntID \r\n\t\t\t\tWHERE ID=@ID"; SqlParameter[] parameter = new SqlParameter[5] { new SqlParameter("@Name", SqlDbType.NVarChar, 1000) { Value = model.Name }, new SqlParameter("@Members", SqlDbType.VarChar, -1) { Value = model.Members }, (model.Note == null) ? new SqlParameter("@Note", SqlDbType.NVarChar, -1) { Value = DBNull.Value } : new SqlParameter("@Note", SqlDbType.NVarChar, -1) { Value = model.Note }, new SqlParameter("@IntID", SqlDbType.Int, -1) { Value = model.IntID }, new SqlParameter("@ID", SqlDbType.UniqueIdentifier, -1) { Value = model.ID } }; return(dbHelper.Execute(sql, parameter)); }
public int Add(RoadFlow.Data.Model.WorkGroup 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_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Expected O, but got Unknown //IL_0069: Expected O, but got Unknown //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Expected O, but got Unknown //IL_00a5: Expected O, but got Unknown //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Expected O, but got Unknown //IL_00c5: Expected O, but got Unknown string sql = "INSERT INTO WorkGroup\r\n\t\t\t\t(ID,Name,Members,Note,IntID) \r\n\t\t\t\tVALUES(:ID,:Name,:Members,:Note,:IntID)"; OracleParameter[] obj = new OracleParameter[5]; OracleParameter val = new OracleParameter(":ID", 126, 40); ((DbParameter)val).Value = model.ID; obj[0] = val; OracleParameter val2 = new OracleParameter(":Name", 119, 1000); ((DbParameter)val2).Value = model.Name; obj[1] = val2; OracleParameter val3 = new OracleParameter(":Members", 105); ((DbParameter)val3).Value = model.Members; obj[2] = val3; _003F val4; if (model.Note != null) { val4 = new OracleParameter(":Note", 119); ((DbParameter)val4).Value = model.Note; } else { val4 = new OracleParameter(":Note", 119); ((DbParameter)val4).Value = DBNull.Value; } obj[3] = val4; OracleParameter val5 = new OracleParameter(":IntID", 112); ((DbParameter)val5).Value = model.IntID; obj[4] = val5; OracleParameter[] parameter = (OracleParameter[])obj; return(dbHelper.Execute(sql, parameter)); }
public bool AddGroupUser(RoadFlow.Data.Model.WorkGroup group) { string url = "https://qyapi.weixin.qq.com/cgi-bin/tag/addtagusers?access_token=" + GetAccessToken(); if (group.Members.IsNullOrEmpty()) { return(true); } List <RoadFlow.Data.Model.Users> allUsers = new RoadFlow.Platform.Organize().GetAllUsers(group.Members); List <string> list = new List <string>(); foreach (RoadFlow.Data.Model.Users item in allUsers) { list.Add(item.Account); } string text = Tools.GetSqlInString(list.ToArray()).Replace("'", "\""); if (!DeleteGroupUser(group.IntID, text)) { return(false); } string text2 = "{\"tagid\":" + group.IntID.ToString() + ",\"userlist\":[" + text + "]}"; string text3 = HttpHelper.SendPost(url, text2); JsonData jsonData = JsonMapper.ToObject(text3); bool flag = jsonData.ContainsKey("errcode") && jsonData["errcode"].ToString().ToInt() == 0; Log.Add("调用了微信更新标签成员-" + (flag ? "成功" : "失败"), "返回:" + text3, Log.Types.微信企业号, text2); return(flag); }
public string GetUsersNames(RoadFlow.Data.Model.WorkGroup wg, char split = ',') { if (wg == null || wg.Members.IsNullOrEmpty()) { return(""); } return(GetUsersNames(wg.Members, split)); }
public string GetName(Guid id) { RoadFlow.Data.Model.WorkGroup workGroup = Get(id); if (workGroup != null) { return(workGroup.Name); } return(""); }
/// <summary> /// 删除一个工作组 /// </summary> /// <param name="workGroup">工作组实体</param> /// <returns></returns> public int Delete(Model.WorkGroup workGroup) { ClearCache(); using (var db = new DataContext()) { db.Remove(workGroup); return(db.SaveChanges()); } }
public bool EditGroup(RoadFlow.Data.Model.WorkGroup group) { if (group == null) { return(false); } string url = "https://qyapi.weixin.qq.com/cgi-bin/tag/update?access_token=" + GetAccessToken(); string text = "{\"tagid\":" + group.IntID.ToString() + ",\"tagname\":\"" + replaceName(group.Name) + "\"}"; string text2 = HttpHelper.SendPost(url, text); JsonData jsonData = JsonMapper.ToObject(text2); bool flag = jsonData.ContainsKey("errcode") && jsonData["errcode"].ToString().ToInt() == 0; Log.Add("调用了微信修改标签-" + (flag ? "成功" : "失败"), "返回:" + text2, Log.Types.微信企业号, text); return(flag); }
public bool DeleteGroup(RoadFlow.Data.Model.WorkGroup group) { if (group == null) { return(false); } if (DeleteGroupUser(group.IntID)) { string text = HttpHelper.SendGet("https://qyapi.weixin.qq.com/cgi-bin/tag/delete?access_token=" + GetAccessToken() + "&tagid=" + group.IntID.ToString()); JsonData jsonData = JsonMapper.ToObject(text); bool flag = jsonData.ContainsKey("errcode") && jsonData["errcode"].ToString().ToInt() == 0; Log.Add("调用了微信删除标签-" + group.Name + "-" + (flag ? "成功" : "失败"), "返回:" + text, Log.Types.微信企业号, group.Serialize()); return(flag); } return(false); }
private List <RoadFlow.Data.Model.WorkGroup> DataReaderToList(SqlDataReader dataReader) { List <RoadFlow.Data.Model.WorkGroup> list = new List <RoadFlow.Data.Model.WorkGroup>(); RoadFlow.Data.Model.WorkGroup workGroup = null; while (dataReader.Read()) { workGroup = new RoadFlow.Data.Model.WorkGroup(); workGroup.ID = dataReader.GetGuid(0); workGroup.Name = dataReader.GetString(1); workGroup.Members = dataReader.GetString(2); if (!dataReader.IsDBNull(3)) { workGroup.Note = dataReader.GetString(3); } workGroup.IntID = dataReader.GetInt32(4); list.Add(workGroup); } return(list); }
private List <RoadFlow.Data.Model.WorkGroup> DataReaderToList(OracleDataReader dataReader) { List <RoadFlow.Data.Model.WorkGroup> list = new List <RoadFlow.Data.Model.WorkGroup>(); RoadFlow.Data.Model.WorkGroup workGroup = null; while (((DbDataReader)dataReader).Read()) { workGroup = new RoadFlow.Data.Model.WorkGroup(); workGroup.ID = ((DbDataReader)dataReader).GetString(0).ToGuid(); workGroup.Name = ((DbDataReader)dataReader).GetString(1); workGroup.Members = ((DbDataReader)dataReader).GetString(2); if (!((DbDataReader)dataReader).IsDBNull(3)) { workGroup.Note = ((DbDataReader)dataReader).GetString(3); } workGroup.IntID = ((DbDataReader)dataReader).GetInt32(4); list.Add(workGroup); } return(list); }
public int Update(RoadFlow.Data.Model.WorkGroup model) { return(dataWorkGroup.Update(model)); }
public int Add(RoadFlow.Data.Model.WorkGroup model) { return(dataWorkGroup.Add(model)); }
public string GetUsersNames(Guid wgID, char split = ',') { RoadFlow.Data.Model.WorkGroup wg = Get(wgID); return(GetUsersNames(wg, split)); }
public void AddGroupUserAsync(RoadFlow.Data.Model.WorkGroup group) { new del_SaveWorkGroup(AddGroupUser).BeginInvoke(group, null, null); }
public void DeleteGroupAsync(RoadFlow.Data.Model.WorkGroup group) { new del_SaveWorkGroup(DeleteGroup).BeginInvoke(group, null, null); }