Ejemplo n.º 1
0
        public ActionResult Index()
        {
            RoadFlow.Data.Model.Users currentUser = MyController.CurrentUser;
            base.ViewBag.UserName = ((currentUser == null) ? "" : currentUser.Name);
            base.ViewBag.DateTime = MyController.CurrentDateTime.ToDateWeekString();
            List <RoadFlow.Data.Model.ShortMessage> allNoReadByUserID = new RoadFlow.Platform.ShortMessage().GetAllNoReadByUserID(currentUser.ID);

            if (allNoReadByUserID.Count > 0)
            {
                JsonData jsonData = new JsonData();
                string   empty    = string.Empty;
                RoadFlow.Data.Model.ShortMessage shortMessage = (from p in allNoReadByUserID
                                                                 orderby p.SendTime descending
                                                                 select p).FirstOrDefault();
                empty                      = (shortMessage.LinkUrl.IsNullOrEmpty() ? shortMessage.Contents.RemoveHTML() : ("<a class=\"blue1\" href=\"" + shortMessage.LinkUrl + "\">" + shortMessage.Contents.RemoveHTML() + "</a>"));
                jsonData["title"]          = shortMessage.Title;
                jsonData["contents"]       = empty;
                jsonData["count"]          = allNoReadByUserID.Count;
                base.ViewBag.NoReadMsgJson = jsonData.ToJson();
            }
            string text = base.Url.Content("~/Content/UserHeads/default.jpg");

            if (!currentUser.HeadImg.IsNullOrEmpty() && System.IO.File.Exists(base.Server.MapPath(base.Url.Content("~" + currentUser.HeadImg))))
            {
                text = base.Url.Content("~" + currentUser.HeadImg);
            }
            base.ViewBag.HeadImg = text;
            return(View());
        }
Ejemplo n.º 2
0
        public ActionResult EditUserInfo(FormCollection collection)
        {
            RoadFlow.Platform.Users   users  = new RoadFlow.Platform.Users();
            RoadFlow.Data.Model.Users users2 = null;
            Guid currentUserID = RoadFlow.Platform.Users.CurrentUserID;

            users2 = users.Get(currentUserID);
            if (collection != null)
            {
                string tel      = base.Request.Form["Tel"];
                string mobile   = base.Request.Form["MobilePhone"];
                string weiXin   = base.Request.Form["WeiXin"];
                string email    = base.Request.Form["Email"];
                string qQ       = base.Request.Form["QQ"];
                string otherTel = base.Request.Form["OtherTel"];
                string note     = base.Request.Form["Note"];
                users2.Tel      = tel;
                users2.Mobile   = mobile;
                users2.WeiXin   = weiXin;
                users2.Email    = email;
                users2.QQ       = qQ;
                users2.OtherTel = otherTel;
                users2.Note     = note;
                if (false)
                {
                    users.Add(users2);
                }
                else
                {
                    users.Update(users2);
                }
                base.ViewBag.script = "alert('保存成功!');window.location=window.location;";
            }
            return(View(users2));
        }
Ejemplo n.º 3
0
        public bool EditUser(RoadFlow.Data.Model.Users user)
        {
            if (user.Mobile.IsNullOrEmpty() && user.Email.IsNullOrEmpty() && user.WeiXin.IsNullOrEmpty())
            {
                return(false);
            }
            if (GetUser(user.Account).IsNullOrEmpty())
            {
                return(AddUser(user));
            }
            string url = "https://qyapi.weixin.qq.com/cgi-bin/user/update?access_token=" + GetAccessToken();
            List <RoadFlow.Data.Model.UsersRelation> allByUserID = new UsersRelation().GetAllByUserID(user.ID);

            RoadFlow.Platform.Organize organize = new RoadFlow.Platform.Organize();
            StringBuilder stringBuilder         = new StringBuilder();

            foreach (RoadFlow.Data.Model.UsersRelation item in allByUserID)
            {
                RoadFlow.Data.Model.Organize organize2 = organize.Get(item.OrganizeID);
                if (organize2 != null)
                {
                    stringBuilder.Append(organize2.IntID);
                    stringBuilder.Append(",");
                }
            }
            string   text     = "{\"userid\":\"" + user.Account + "\",\"name\":\"" + replaceName(user.Name) + "\",\"department\":[" + stringBuilder.ToString().TrimEnd(',') + "],\"position\":\"\",\"mobile\":\"" + user.Mobile + "\"," + (user.Sex.HasValue ? ("\"gender\":\"" + (user.Sex.Value + 1).ToString() + "\",") : "") + "\"email\":\"" + user.Email + "\",\"weixinid\":\"" + user.WeiXin + "\",\"enable\":" + ((user.Status == 0) ? 1 : 0).ToString() + "}";
            string   text2    = HttpHelper.SendPost(url, text);
            JsonData jsonData = JsonMapper.ToObject(text2);
            bool     flag     = jsonData.ContainsKey("errcode") && jsonData["errcode"].ToString().ToInt() == 0;

            Log.Add("调用了微信修改人员-" + user.Name + "-" + (flag ? "成功" : "失败"), "返回:" + text2, Log.Types.微信企业号, user.Serialize(), text);
            return(flag);
        }
Ejemplo n.º 4
0
        public bool Add(RoadFlow.Data.Model.Users user, Guid uniqueID)
        {
            if (user == null)
            {
                return(false);
            }
            List <RoadFlow.Data.Model.OnlineUsers> all = GetAll();
            bool flag = false;

            RoadFlow.Data.Model.OnlineUsers onlineUsers = all.Find((RoadFlow.Data.Model.OnlineUsers p) => p.ID == user.ID);
            if (onlineUsers == null)
            {
                flag        = true;
                onlineUsers = new RoadFlow.Data.Model.OnlineUsers();
                RoadFlow.Data.Model.UsersRelation mainByUserID = new UsersRelation().GetMainByUserID(user.ID);
                if (mainByUserID != null)
                {
                    onlineUsers.OrgName = new Organize().GetAllParentNames(mainByUserID.OrganizeID);
                }
            }
            onlineUsers.ID         = user.ID;
            onlineUsers.ClientInfo = "操作系统:" + Tools.GetOSName() + "  浏览器:" + Tools.GetBrowse();
            onlineUsers.IP         = Tools.GetIPAddress();
            onlineUsers.LastPage   = "";
            onlineUsers.LoginTime  = DateTimeNew.Now;
            onlineUsers.UniqueID   = uniqueID;
            onlineUsers.UserName   = user.Name;
            if (flag)
            {
                all.Add(onlineUsers);
            }
            set(all);
            return(true);
        }
Ejemplo n.º 5
0
        public string ValidateLogin()
        {
            string text  = base.Request.Form["Account"];
            string text2 = base.Request.Form["Password"];

            if (text.IsNullOrEmpty() || text2.IsNullOrEmpty())
            {
                return("{\"id\":\"\",\"status\":0,\"msg\":\"帐号或密码不能为空\"}");
            }
            RoadFlow.Platform.Users   users     = new RoadFlow.Platform.Users();
            RoadFlow.Data.Model.Users byAccount = users.GetByAccount(text.Trim());
            if (byAccount == null || string.Compare(byAccount.Password, users.GetUserEncryptionPassword(byAccount.ID.ToString(), text2.Trim()), false) != 0)
            {
                return("{\"id\":\"\",\"status\":0,\"msg\":\"帐号或密码错误\"}");
            }
            if (byAccount.Status == 1)
            {
                return("{\"id\":\"\",\"status\":0,\"msg\":\"帐号已被冻结\"}");
            }
            base.Session[Keys.SessionKeys.UserID.ToString()]   = byAccount.ID;
            base.Session[Keys.SessionKeys.BaseUrl.ToString()]  = base.Url.Content("~/");
            base.Session[Keys.SessionKeys.UserName.ToString()] = byAccount.Name;
            base.Response.Cookies.Add(new HttpCookie(Keys.SessionKeys.UserID.ToString(), byAccount.ID.ToString())
            {
                Expires = MyController.CurrentDateTime.AddDays(7.0)
            });
            RoadFlow.Platform.Log.Add("用户登录成功-test(帐号:" + text + ")", "", RoadFlow.Platform.Log.Types.用户登录);
            return("{\"id\":\"" + byAccount.ID.ToString() + "\",\"token\":\"" + RoadFlow.Utility.Config.GetTokenByUserId(byAccount.ID) + "\",\"status\":1,\"msg\":\"用户登录成功\"}");
        }
Ejemplo n.º 6
0
        private List <RoadFlow.Data.Model.Users> DataReaderToList(OracleDataReader dataReader)
        {
            List <RoadFlow.Data.Model.Users> list = new List <RoadFlow.Data.Model.Users>();

            RoadFlow.Data.Model.Users users = null;
            while (((DbDataReader)dataReader).Read())
            {
                users          = new RoadFlow.Data.Model.Users();
                users.ID       = ((DbDataReader)dataReader).GetString(0).ToGuid();
                users.Name     = ((DbDataReader)dataReader).GetString(1);
                users.Account  = ((DbDataReader)dataReader).GetString(2);
                users.Password = ((DbDataReader)dataReader).GetString(3);
                users.Status   = ((DbDataReader)dataReader).GetInt32(4);
                users.Sort     = ((DbDataReader)dataReader).GetInt32(5);
                if (!((DbDataReader)dataReader).IsDBNull(6))
                {
                    users.Note = ((DbDataReader)dataReader).GetString(6);
                }
                if (!((DbDataReader)dataReader).IsDBNull(7))
                {
                    users.Mobile = ((DbDataReader)dataReader).GetString(7);
                }
                if (!((DbDataReader)dataReader).IsDBNull(8))
                {
                    users.Tel = ((DbDataReader)dataReader).GetString(8);
                }
                if (!((DbDataReader)dataReader).IsDBNull(9))
                {
                    users.OtherTel = ((DbDataReader)dataReader).GetString(9);
                }
                if (!((DbDataReader)dataReader).IsDBNull(10))
                {
                    users.Fax = ((DbDataReader)dataReader).GetString(10);
                }
                if (!((DbDataReader)dataReader).IsDBNull(11))
                {
                    users.Email = ((DbDataReader)dataReader).GetString(11);
                }
                if (!((DbDataReader)dataReader).IsDBNull(12))
                {
                    users.QQ = ((DbDataReader)dataReader).GetString(12);
                }
                if (!((DbDataReader)dataReader).IsDBNull(13))
                {
                    users.HeadImg = ((DbDataReader)dataReader).GetString(13);
                }
                if (!((DbDataReader)dataReader).IsDBNull(14))
                {
                    users.WeiXin = ((DbDataReader)dataReader).GetString(14);
                }
                if (!((DbDataReader)dataReader).IsDBNull(15))
                {
                    users.Sex = ((DbDataReader)dataReader).GetInt32(15);
                }
                list.Add(users);
            }
            return(list);
        }
Ejemplo n.º 7
0
        public int DeleteAndAllChilds(Guid orgID)
        {
            int num = 0;

            using (TransactionScope transactionScope = new TransactionScope())
            {
                UsersRelation usersRelation = new UsersRelation();
                Users         users         = new Users();
                List <RoadFlow.Data.Model.Organize> allChilds = GetAllChilds(orgID);
                List <string> list = new List <string>();
                List <RoadFlow.Data.Model.Organize> list2 = new List <RoadFlow.Data.Model.Organize>();
                foreach (RoadFlow.Data.Model.Organize item in allChilds)
                {
                    foreach (RoadFlow.Data.Model.UsersRelation item2 in usersRelation.GetAllByOrganizeID(item.ID).FindAll((RoadFlow.Data.Model.UsersRelation p) => p.IsMain == 1))
                    {
                        RoadFlow.Data.Model.Users users2 = users.Get(item2.UserID);
                        usersRelation.Delete(item2.UserID, item2.OrganizeID);
                        num += users.Delete(item2.UserID);
                        if (users2 != null)
                        {
                            list.Add(users2.Account);
                        }
                    }
                    num += Delete(item.ID);
                    list2.Add(item);
                }
                foreach (RoadFlow.Data.Model.UsersRelation item3 in usersRelation.GetAllByOrganizeID(orgID).FindAll((RoadFlow.Data.Model.UsersRelation p) => p.IsMain == 1))
                {
                    usersRelation.Delete(item3.UserID, item3.OrganizeID);
                    num += users.Delete(item3.UserID);
                    RoadFlow.Data.Model.Users users3 = users.Get(item3.UserID);
                    if (users3 != null)
                    {
                        list.Add(users3.Account);
                    }
                }
                num += Delete(orgID);
                RoadFlow.Data.Model.Organize organize = Get(orgID);
                if (organize != null)
                {
                    list2.Add(organize);
                }
                if (RoadFlow.Platform.WeiXin.Config.IsUse)
                {
                    RoadFlow.Platform.WeiXin.Organize organize2 = new RoadFlow.Platform.WeiXin.Organize();
                    if (list.Count > 0)
                    {
                        organize2.DeleteUserAsync(list.ToArray());
                    }
                    foreach (RoadFlow.Data.Model.Organize item4 in list2)
                    {
                        organize2.DeleteDeptAsync(item4.IntID);
                    }
                }
                transactionScope.Complete();
                return(num);
            }
        }
Ejemplo n.º 8
0
        public string CheckLogin()
        {
            string name  = Keys.SessionKeys.IsValidateCode.ToString();
            string name2 = Keys.SessionKeys.ValidateCode.ToString();
            string text  = base.Request.Form["Account"];
            string text2 = base.Request.Form["Password"];
            string text3 = base.Request.Form["VCode"];
            string b     = base.Request.Form["Force"];
            string str   = "(帐号:" + text + " 密码:" + text2 + " 验证码:" + text3 + ")";

            if (text.IsNullOrEmpty() || text2.IsNullOrEmpty())
            {
                RoadFlow.Platform.Log.Add("用户登录失败(帐号或密码为空)" + str, "", RoadFlow.Platform.Log.Types.用户登录);
                return("{\"status\":0,\"msg\":\"帐号或密码不能为空!\"}");
            }
            if (base.Session[name] != null && "1" == base.Session[name].ToString() && (base.Session[name2] == null || string.Compare(base.Session[name2].ToString(), text3.Trim1(), true) != 0))
            {
                RoadFlow.Platform.Log.Add("用户登录失败(验证码错误)" + str, "", RoadFlow.Platform.Log.Types.用户登录);
                return("{\"status\":0,\"msg\":\"验证码错误!\"}");
            }
            RoadFlow.Platform.Users   users     = new RoadFlow.Platform.Users();
            RoadFlow.Data.Model.Users byAccount = users.GetByAccount(text.Trim());
            if (byAccount == null || string.Compare(byAccount.Password, users.GetUserEncryptionPassword(byAccount.ID.ToString(), text2.Trim()), false) != 0)
            {
                base.Session[name] = "1";
                RoadFlow.Platform.Log.Add("用户登录失败(帐号或密码错误)" + str, "", RoadFlow.Platform.Log.Types.用户登录);
                return("{\"status\":0,\"msg\":\"帐号或密码错误!\"}");
            }
            if (byAccount.Status == 1)
            {
                base.Session[name] = "1";
                RoadFlow.Platform.Log.Add("用户登录失败(帐号已被冻结)" + str, "", RoadFlow.Platform.Log.Types.用户登录);
                return("{\"status\":0,\"msg\":\"帐号已被冻结!\"}");
            }
            RoadFlow.Platform.OnlineUsers   onlineUsers  = new RoadFlow.Platform.OnlineUsers();
            RoadFlow.Data.Model.OnlineUsers onlineUsers2 = onlineUsers.Get(byAccount.ID);
            if (onlineUsers2 != null && "1" != b)
            {
                string iP = onlineUsers2.IP;
                base.Session.Remove(name);
                return("{\"status\":2,\"msg\":\"当前帐号已经在" + iP + "登录,您要强行登录吗?\"}");
            }
            Guid guid = Guid.NewGuid();

            base.Session[Keys.SessionKeys.UserID.ToString()]       = byAccount.ID;
            base.Session[Keys.SessionKeys.UserUniqueID.ToString()] = guid;
            base.Session[Keys.SessionKeys.BaseUrl.ToString()]      = base.Url.Content("~/");
            base.Session[Keys.SessionKeys.UserName.ToString()]     = byAccount.Name;
            base.Response.Cookies.Add(new HttpCookie(Keys.SessionKeys.UserID.ToString(), byAccount.ID.ToString())
            {
                Expires = MyController.CurrentDateTime.AddDays(7.0)
            });
            onlineUsers.Add(byAccount, guid);
            base.Session.Remove(name);
            RoadFlow.Platform.Log.Add("用户登录成功(帐号:" + text + ")", "", RoadFlow.Platform.Log.Types.用户登录);
            return("{\"status\":1,\"msg\":\"成功!\"}");
        }
Ejemplo n.º 9
0
 public string GetName(Guid id)
 {
     RoadFlow.Data.Model.Users users = Get(id);
     if (users != null)
     {
         return(users.Name);
     }
     return("");
 }
Ejemplo n.º 10
0
 public string GetAccountByID(Guid id)
 {
     RoadFlow.Data.Model.Users users = Get(id);
     if (users != null)
     {
         return(users.Account);
     }
     return("");
 }
Ejemplo n.º 11
0
        public string SaveUserHead()
        {
            string str           = base.Request.Form["x"];
            string str2          = base.Request.Form["y"];
            string text3         = base.Request.Form["x2"];
            string text4         = base.Request.Form["y2"];
            string str3          = base.Request.Form["w"];
            string str4          = base.Request.Form["h"];
            string text          = (base.Request.Form["img"] ?? "").DesDecrypt();
            Guid   currentUserID = RoadFlow.Platform.Users.CurrentUserID;

            if (!text.IsNullOrEmpty() && System.IO.File.Exists(text))
            {
                try
                {
                    string text2 = ImgHelper.CutAvatar(text, WebMvc.Common.Tools.BaseUrl + "/Content/UserHeads/" + currentUserID + ".jpg", str.ToInt(), str2.ToInt(), str3.ToInt(), str4.ToInt());
                    if (!text2.IsNullOrEmpty())
                    {
                        RoadFlow.Platform.Users   users  = new RoadFlow.Platform.Users();
                        RoadFlow.Data.Model.Users users2 = users.Get(currentUserID);
                        if (users2 != null)
                        {
                            users2.HeadImg = text2;
                            users.Update(users2);
                        }
                        return("保存成功!");
                    }
                    return("保存失败!");
                }
                catch
                {
                    return("保存失败!");
                }
            }
            return("文件不存在!");
        }
Ejemplo n.º 12
0
        public int Update(RoadFlow.Data.Model.Users model)
        {
            string sql = "UPDATE Users SET \r\n\t\t\t\tName=@Name,Account=@Account,Password=@Password,Status=@Status,Sort=@Sort,Note=@Note,Mobile=@Mobile,Tel=@Tel,OtherTel=@OtherTel,Fax=@Fax,Email=@Email,QQ=@QQ,HeadImg=@HeadImg,WeiXin=@WeiXin,Sex=@Sex\r\n\t\t\t\tWHERE ID=@ID";

            SqlParameter[] parameter = new SqlParameter[16]
            {
                new SqlParameter("@Name", SqlDbType.NVarChar, 100)
                {
                    Value = model.Name
                },
                new SqlParameter("@Account", SqlDbType.VarChar, 255)
                {
                    Value = model.Account
                },
                new SqlParameter("@Password", SqlDbType.VarChar, 500)
                {
                    Value = model.Password
                },
                new SqlParameter("@Status", SqlDbType.Int, -1)
                {
                    Value = model.Status
                },
                new SqlParameter("@Sort", SqlDbType.Int, -1)
                {
                    Value = model.Sort
                },
                (model.Note == null) ? new SqlParameter("@Note", SqlDbType.NVarChar, -1)
                {
                    Value = DBNull.Value
                } : new SqlParameter("@Note", SqlDbType.NVarChar, -1)
                {
                    Value = model.Note
                },
                (model.Mobile == null) ? new SqlParameter("@Mobile", SqlDbType.VarChar, 50)
                {
                    Value = DBNull.Value
                } : new SqlParameter("@Mobile", SqlDbType.VarChar, 50)
                {
                    Value = model.Mobile
                },
                (model.Tel == null) ? new SqlParameter("@Tel", SqlDbType.VarChar, 500)
                {
                    Value = DBNull.Value
                } : new SqlParameter("@Tel", SqlDbType.VarChar, 500)
                {
                    Value = model.Tel
                },
                (model.OtherTel == null) ? new SqlParameter("@OtherTel", SqlDbType.VarChar, 500)
                {
                    Value = DBNull.Value
                } : new SqlParameter("@OtherTel", SqlDbType.VarChar, 500)
                {
                    Value = model.OtherTel
                },
                (model.Fax == null) ? new SqlParameter("@Fax", SqlDbType.VarChar, 50)
                {
                    Value = DBNull.Value
                } : new SqlParameter("@Fax", SqlDbType.VarChar, 50)
                {
                    Value = model.Fax
                },
                (model.Email == null) ? new SqlParameter("@Email", SqlDbType.VarChar, 500)
                {
                    Value = DBNull.Value
                } : new SqlParameter("@Email", SqlDbType.VarChar, 500)
                {
                    Value = model.Email
                },
                (model.QQ == null) ? new SqlParameter("@QQ", SqlDbType.VarChar, 50)
                {
                    Value = DBNull.Value
                } : new SqlParameter("@QQ", SqlDbType.VarChar, 50)
                {
                    Value = model.QQ
                },
                (model.HeadImg == null) ? new SqlParameter("@HeadImg", SqlDbType.VarChar, 500)
                {
                    Value = DBNull.Value
                } : new SqlParameter("@HeadImg", SqlDbType.VarChar, 500)
                {
                    Value = model.HeadImg
                },
                (model.WeiXin == null) ? new SqlParameter("@WeiXin", SqlDbType.VarChar, 50)
                {
                    Value = DBNull.Value
                } : new SqlParameter("@WeiXin", SqlDbType.VarChar, 50)
                {
                    Value = model.WeiXin
                },
                (!model.Sex.HasValue) ? new SqlParameter("@Sex", SqlDbType.Int, -1)
                {
                    Value = DBNull.Value
                } : new SqlParameter("@Sex", SqlDbType.Int, -1)
                {
                    Value = model.Sex
                },
                new SqlParameter("@ID", SqlDbType.UniqueIdentifier, -1)
                {
                    Value = model.ID
                }
            };
            return(dbHelper.Execute(sql, parameter));
        }
Ejemplo n.º 13
0
        public int Update(RoadFlow.Data.Model.Users model)
        {
            //IL_0018: Unknown result type (might be due to invalid IL or missing references)
            //IL_001d: Unknown result type (might be due to invalid IL or missing references)
            //IL_0029: Expected O, but got Unknown
            //IL_002a: 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_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_006a: 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_0089: Expected O, but got Unknown
            //IL_008a: 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_00a9: Expected O, but got Unknown
            //IL_00aa: Expected O, but got Unknown
            //IL_00bb: Unknown result type (might be due to invalid IL or missing references)
            //IL_00c0: Unknown result type (might be due to invalid IL or missing references)
            //IL_00cc: Expected O, but got Unknown
            //IL_00d5: Unknown result type (might be due to invalid IL or missing references)
            //IL_00da: Unknown result type (might be due to invalid IL or missing references)
            //IL_00e5: Expected O, but got Unknown
            //IL_00e6: Expected O, but got Unknown
            //IL_00f9: Unknown result type (might be due to invalid IL or missing references)
            //IL_00fe: Unknown result type (might be due to invalid IL or missing references)
            //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_0125: Expected O, but got Unknown
            //IL_0126: Expected O, but got Unknown
            //IL_013c: Unknown result type (might be due to invalid IL or missing references)
            //IL_0141: Unknown result type (might be due to invalid IL or missing references)
            //IL_014d: Expected O, but got Unknown
            //IL_015b: Unknown result type (might be due to invalid IL or missing references)
            //IL_0160: Unknown result type (might be due to invalid IL or missing references)
            //IL_016b: Expected O, but got Unknown
            //IL_016c: Expected O, but got Unknown
            //IL_0182: Unknown result type (might be due to invalid IL or missing references)
            //IL_0187: Unknown result type (might be due to invalid IL or missing references)
            //IL_0193: Expected O, but got Unknown
            //IL_01a1: Unknown result type (might be due to invalid IL or missing references)
            //IL_01a6: Unknown result type (might be due to invalid IL or missing references)
            //IL_01b1: Expected O, but got Unknown
            //IL_01b2: Expected O, but got Unknown
            //IL_01c6: Unknown result type (might be due to invalid IL or missing references)
            //IL_01cb: Unknown result type (might be due to invalid IL or missing references)
            //IL_01d7: Expected O, but got Unknown
            //IL_01e2: Unknown result type (might be due to invalid IL or missing references)
            //IL_01e7: Unknown result type (might be due to invalid IL or missing references)
            //IL_01f2: Expected O, but got Unknown
            //IL_01f3: Expected O, but got Unknown
            //IL_020a: Unknown result type (might be due to invalid IL or missing references)
            //IL_020f: Unknown result type (might be due to invalid IL or missing references)
            //IL_021b: Expected O, but got Unknown
            //IL_0229: Unknown result type (might be due to invalid IL or missing references)
            //IL_022e: Unknown result type (might be due to invalid IL or missing references)
            //IL_0239: Expected O, but got Unknown
            //IL_023a: Expected O, but got Unknown
            //IL_024e: Unknown result type (might be due to invalid IL or missing references)
            //IL_0253: Unknown result type (might be due to invalid IL or missing references)
            //IL_025f: Expected O, but got Unknown
            //IL_026a: Unknown result type (might be due to invalid IL or missing references)
            //IL_026f: Unknown result type (might be due to invalid IL or missing references)
            //IL_027a: Expected O, but got Unknown
            //IL_027b: Expected O, but got Unknown
            //IL_0292: Unknown result type (might be due to invalid IL or missing references)
            //IL_0297: Unknown result type (might be due to invalid IL or missing references)
            //IL_02a3: Expected O, but got Unknown
            //IL_02b1: Unknown result type (might be due to invalid IL or missing references)
            //IL_02b6: Unknown result type (might be due to invalid IL or missing references)
            //IL_02c1: Expected O, but got Unknown
            //IL_02c2: Expected O, but got Unknown
            //IL_02d6: Unknown result type (might be due to invalid IL or missing references)
            //IL_02db: Unknown result type (might be due to invalid IL or missing references)
            //IL_02e7: Expected O, but got Unknown
            //IL_02f2: Unknown result type (might be due to invalid IL or missing references)
            //IL_02f7: Unknown result type (might be due to invalid IL or missing references)
            //IL_0302: Expected O, but got Unknown
            //IL_0303: Expected O, but got Unknown
            //IL_031f: Unknown result type (might be due to invalid IL or missing references)
            //IL_0324: Unknown result type (might be due to invalid IL or missing references)
            //IL_033d: Expected O, but got Unknown
            //IL_0346: Unknown result type (might be due to invalid IL or missing references)
            //IL_034b: Unknown result type (might be due to invalid IL or missing references)
            //IL_0356: Expected O, but got Unknown
            //IL_0357: Expected O, but got Unknown
            //IL_0363: Unknown result type (might be due to invalid IL or missing references)
            //IL_0368: Unknown result type (might be due to invalid IL or missing references)
            //IL_0379: Expected O, but got Unknown
            //IL_037a: Expected O, but got Unknown
            string sql = "UPDATE Users SET \r\n\t\t\t\tName=:Name,Account=:Account,Password=:Password,Status=:Status,Sort=:Sort,Note=:Note,Mobile=:Mobile,Tel=:Tel,OtherTel=:OtherTel,Fax=:Fax,Email=:Email,QQ=:QQ,HeadImg=:HeadImg,WeiXin=:WeiXin,Sex=:Sex\r\n\t\t\t\tWHERE ID=:ID";

            OracleParameter[] obj = new OracleParameter[16];
            OracleParameter   val = new OracleParameter(":Name", 119, 100);

            ((DbParameter)val).Value = model.Name;
            obj[0] = val;
            OracleParameter val2 = new OracleParameter(":Account", 126, 255);

            ((DbParameter)val2).Value = model.Account;
            obj[1] = val2;
            OracleParameter val3 = new OracleParameter(":Password", 126, 500);

            ((DbParameter)val3).Value = model.Password;
            obj[2] = val3;
            OracleParameter val4 = new OracleParameter(":Status", 112);

            ((DbParameter)val4).Value = model.Status;
            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", 119);
                ((DbParameter)val6).Value = model.Note;
            }
            else
            {
                val6 = new OracleParameter(":Note", 119);
                ((DbParameter)val6).Value = DBNull.Value;
            }
            obj[5] = val6;
            _003F val7;

            if (model.Mobile != null)
            {
                val7 = new OracleParameter("@Mobile", 119, 50);
                ((DbParameter)val7).Value = model.Mobile;
            }
            else
            {
                val7 = new OracleParameter("@Mobile", 119, 50);
                ((DbParameter)val7).Value = DBNull.Value;
            }
            obj[6] = val7;
            _003F val8;

            if (model.Tel != null)
            {
                val8 = new OracleParameter("@Tel", 119, 500);
                ((DbParameter)val8).Value = model.Tel;
            }
            else
            {
                val8 = new OracleParameter("@Tel", 119, 500);
                ((DbParameter)val8).Value = DBNull.Value;
            }
            obj[7] = val8;
            _003F val9;

            if (model.OtherTel != null)
            {
                val9 = new OracleParameter("@OtherTel", 119, 500);
                ((DbParameter)val9).Value = model.OtherTel;
            }
            else
            {
                val9 = new OracleParameter("@OtherTel", 119, 500);
                ((DbParameter)val9).Value = DBNull.Value;
            }
            obj[8] = val9;
            _003F val10;

            if (model.Fax != null)
            {
                val10 = new OracleParameter("@Fax", 119, 50);
                ((DbParameter)val10).Value = model.Fax;
            }
            else
            {
                val10 = new OracleParameter("@Fax", 119, 50);
                ((DbParameter)val10).Value = DBNull.Value;
            }
            obj[9] = val10;
            _003F val11;

            if (model.Email != null)
            {
                val11 = new OracleParameter("@Email", 119, 500);
                ((DbParameter)val11).Value = model.Email;
            }
            else
            {
                val11 = new OracleParameter("@Email", 119, 500);
                ((DbParameter)val11).Value = DBNull.Value;
            }
            obj[10] = val11;
            _003F val12;

            if (model.QQ != null)
            {
                val12 = new OracleParameter("@QQ", 119, 50);
                ((DbParameter)val12).Value = model.QQ;
            }
            else
            {
                val12 = new OracleParameter("@QQ", 119, 50);
                ((DbParameter)val12).Value = DBNull.Value;
            }
            obj[11] = val12;
            _003F val13;

            if (model.HeadImg != null)
            {
                val13 = new OracleParameter("@HeadImg", 119, 500);
                ((DbParameter)val13).Value = model.HeadImg;
            }
            else
            {
                val13 = new OracleParameter("@HeadImg", 119, 500);
                ((DbParameter)val13).Value = DBNull.Value;
            }
            obj[12] = val13;
            _003F val14;

            if (model.WeiXin != null)
            {
                val14 = new OracleParameter("@WeiXin", 119, 50);
                ((DbParameter)val14).Value = model.WeiXin;
            }
            else
            {
                val14 = new OracleParameter("@WeiXin", 119, 50);
                ((DbParameter)val14).Value = DBNull.Value;
            }
            obj[13] = val14;
            _003F val15;

            if (model.Sex.HasValue)
            {
                val15 = new OracleParameter("@Sex", 112, 11);
                ((DbParameter)val15).Value = model.Sex.Value;
            }
            else
            {
                val15 = new OracleParameter("@Sex", 112);
                ((DbParameter)val15).Value = DBNull.Value;
            }
            obj[14] = val15;
            OracleParameter val16 = new OracleParameter(":ID", 126, 40);

            ((DbParameter)val16).Value = model.ID;
            obj[15] = val16;
            OracleParameter[] parameter = (OracleParameter[])obj;
            return(dbHelper.Execute(sql, parameter));
        }
Ejemplo n.º 14
0
        public int Add(RoadFlow.Data.Model.Users model)
        {
            //IL_0018: Unknown result type (might be due to invalid IL or missing references)
            //IL_001d: Unknown result type (might be due to invalid IL or missing references)
            //IL_002e: Expected O, but got Unknown
            //IL_002f: Expected O, but got Unknown
            //IL_003a: Unknown result type (might be due to invalid IL or missing references)
            //IL_003f: 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_005a: Unknown result type (might be due to invalid IL or missing references)
            //IL_005f: 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
            //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_008c: Expected O, but got Unknown
            //IL_0095: Unknown result type (might be due to invalid IL or missing references)
            //IL_009a: Unknown result type (might be due to invalid IL or missing references)
            //IL_00ab: Expected O, but got Unknown
            //IL_00ac: Expected O, but got Unknown
            //IL_00b5: Unknown result type (might be due to invalid IL or missing references)
            //IL_00ba: Unknown result type (might be due to invalid IL or missing references)
            //IL_00cb: Expected O, but got Unknown
            //IL_00cc: Expected O, but got Unknown
            //IL_00dd: Unknown result type (might be due to invalid IL or missing references)
            //IL_00e2: Unknown result type (might be due to invalid IL or missing references)
            //IL_00ee: Expected O, but got Unknown
            //IL_00f7: Unknown result type (might be due to invalid IL or missing references)
            //IL_00fc: Unknown result type (might be due to invalid IL or missing references)
            //IL_0107: Expected O, but got Unknown
            //IL_0108: Expected O, but got Unknown
            //IL_011b: Unknown result type (might be due to invalid IL or missing references)
            //IL_0120: Unknown result type (might be due to invalid IL or missing references)
            //IL_012c: Expected O, but got Unknown
            //IL_0137: Unknown result type (might be due to invalid IL or missing references)
            //IL_013c: Unknown result type (might be due to invalid IL or missing references)
            //IL_0147: Expected O, but got Unknown
            //IL_0148: Expected O, but got Unknown
            //IL_015e: Unknown result type (might be due to invalid IL or missing references)
            //IL_0163: Unknown result type (might be due to invalid IL or missing references)
            //IL_016f: Expected O, but got Unknown
            //IL_017d: Unknown result type (might be due to invalid IL or missing references)
            //IL_0182: Unknown result type (might be due to invalid IL or missing references)
            //IL_018d: Expected O, but got Unknown
            //IL_018e: Expected O, but got Unknown
            //IL_01a5: Unknown result type (might be due to invalid IL or missing references)
            //IL_01aa: Unknown result type (might be due to invalid IL or missing references)
            //IL_01b6: Expected O, but got Unknown
            //IL_01c4: Unknown result type (might be due to invalid IL or missing references)
            //IL_01c9: Unknown result type (might be due to invalid IL or missing references)
            //IL_01d4: Expected O, but got Unknown
            //IL_01d5: Expected O, but got Unknown
            //IL_01e9: Unknown result type (might be due to invalid IL or missing references)
            //IL_01ee: Unknown result type (might be due to invalid IL or missing references)
            //IL_01fa: Expected O, but got Unknown
            //IL_0205: Unknown result type (might be due to invalid IL or missing references)
            //IL_020a: Unknown result type (might be due to invalid IL or missing references)
            //IL_0215: Expected O, but got Unknown
            //IL_0216: Expected O, but got Unknown
            //IL_022d: Unknown result type (might be due to invalid IL or missing references)
            //IL_0232: Unknown result type (might be due to invalid IL or missing references)
            //IL_023e: Expected O, but got Unknown
            //IL_024c: Unknown result type (might be due to invalid IL or missing references)
            //IL_0251: Unknown result type (might be due to invalid IL or missing references)
            //IL_025c: Expected O, but got Unknown
            //IL_025d: Expected O, but got Unknown
            //IL_0271: Unknown result type (might be due to invalid IL or missing references)
            //IL_0276: Unknown result type (might be due to invalid IL or missing references)
            //IL_0282: Expected O, but got Unknown
            //IL_028d: Unknown result type (might be due to invalid IL or missing references)
            //IL_0292: Unknown result type (might be due to invalid IL or missing references)
            //IL_029d: Expected O, but got Unknown
            //IL_029e: Expected O, but got Unknown
            //IL_02b5: Unknown result type (might be due to invalid IL or missing references)
            //IL_02ba: Unknown result type (might be due to invalid IL or missing references)
            //IL_02c6: Expected O, but got Unknown
            //IL_02d4: Unknown result type (might be due to invalid IL or missing references)
            //IL_02d9: Unknown result type (might be due to invalid IL or missing references)
            //IL_02e4: Expected O, but got Unknown
            //IL_02e5: Expected O, but got Unknown
            //IL_02f9: Unknown result type (might be due to invalid IL or missing references)
            //IL_02fe: Unknown result type (might be due to invalid IL or missing references)
            //IL_030a: Expected O, but got Unknown
            //IL_0315: Unknown result type (might be due to invalid IL or missing references)
            //IL_031a: Unknown result type (might be due to invalid IL or missing references)
            //IL_0325: Expected O, but got Unknown
            //IL_0326: Expected O, but got Unknown
            //IL_0342: Unknown result type (might be due to invalid IL or missing references)
            //IL_0347: Unknown result type (might be due to invalid IL or missing references)
            //IL_0360: Expected O, but got Unknown
            //IL_0369: Unknown result type (might be due to invalid IL or missing references)
            //IL_036e: Unknown result type (might be due to invalid IL or missing references)
            //IL_0379: Expected O, but got Unknown
            //IL_037a: Expected O, but got Unknown
            string sql = "INSERT INTO Users\r\n\t\t\t\t(ID,Name,Account,Password,Status,Sort,Note,Mobile,Tel,OtherTel,Fax,Email,QQ,HeadImg,WeiXin,Sex) \r\n\t\t\t\tVALUES(:ID,:Name,:Account,:Password,:Status,:Sort,:Note,:Mobile,:Tel,:OtherTel,:Fax,:Email,:QQ,:HeadImg,:WeiXin,:Sex)";

            OracleParameter[] obj = new OracleParameter[16];
            OracleParameter   val = new OracleParameter(":ID", 126, 40);

            ((DbParameter)val).Value = model.ID;
            obj[0] = val;
            OracleParameter val2 = new OracleParameter(":Name", 119, 100);

            ((DbParameter)val2).Value = model.Name;
            obj[1] = val2;
            OracleParameter val3 = new OracleParameter(":Account", 126, 255);

            ((DbParameter)val3).Value = model.Account;
            obj[2] = val3;
            OracleParameter val4 = new OracleParameter(":Password", 126, 500);

            ((DbParameter)val4).Value = model.Password;
            obj[3] = val4;
            OracleParameter val5 = new OracleParameter(":Status", 112);

            ((DbParameter)val5).Value = model.Status;
            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", 119);
                ((DbParameter)val7).Value = model.Note;
            }
            else
            {
                val7 = new OracleParameter(":Note", 119);
                ((DbParameter)val7).Value = DBNull.Value;
            }
            obj[6] = val7;
            _003F val8;

            if (model.Mobile != null)
            {
                val8 = new OracleParameter("@Mobile", 119, 50);
                ((DbParameter)val8).Value = model.Mobile;
            }
            else
            {
                val8 = new OracleParameter("@Mobile", 119, 50);
                ((DbParameter)val8).Value = DBNull.Value;
            }
            obj[7] = val8;
            _003F val9;

            if (model.Tel != null)
            {
                val9 = new OracleParameter("@Tel", 119, 500);
                ((DbParameter)val9).Value = model.Tel;
            }
            else
            {
                val9 = new OracleParameter("@Tel", 119, 500);
                ((DbParameter)val9).Value = DBNull.Value;
            }
            obj[8] = val9;
            _003F val10;

            if (model.OtherTel != null)
            {
                val10 = new OracleParameter("@OtherTel", 119, 500);
                ((DbParameter)val10).Value = model.OtherTel;
            }
            else
            {
                val10 = new OracleParameter("@OtherTel", 119, 500);
                ((DbParameter)val10).Value = DBNull.Value;
            }
            obj[9] = val10;
            _003F val11;

            if (model.Fax != null)
            {
                val11 = new OracleParameter("@Fax", 119, 50);
                ((DbParameter)val11).Value = model.Fax;
            }
            else
            {
                val11 = new OracleParameter("@Fax", 119, 50);
                ((DbParameter)val11).Value = DBNull.Value;
            }
            obj[10] = val11;
            _003F val12;

            if (model.Email != null)
            {
                val12 = new OracleParameter("@Email", 119, 500);
                ((DbParameter)val12).Value = model.Email;
            }
            else
            {
                val12 = new OracleParameter("@Email", 119, 500);
                ((DbParameter)val12).Value = DBNull.Value;
            }
            obj[11] = val12;
            _003F val13;

            if (model.QQ != null)
            {
                val13 = new OracleParameter("@QQ", 119, 50);
                ((DbParameter)val13).Value = model.QQ;
            }
            else
            {
                val13 = new OracleParameter("@QQ", 119, 50);
                ((DbParameter)val13).Value = DBNull.Value;
            }
            obj[12] = val13;
            _003F val14;

            if (model.HeadImg != null)
            {
                val14 = new OracleParameter("@HeadImg", 119, 500);
                ((DbParameter)val14).Value = model.HeadImg;
            }
            else
            {
                val14 = new OracleParameter("@HeadImg", 119, 500);
                ((DbParameter)val14).Value = DBNull.Value;
            }
            obj[13] = val14;
            _003F val15;

            if (model.WeiXin != null)
            {
                val15 = new OracleParameter("@WeiXin", 119, 50);
                ((DbParameter)val15).Value = model.WeiXin;
            }
            else
            {
                val15 = new OracleParameter("@WeiXin", 119, 50);
                ((DbParameter)val15).Value = DBNull.Value;
            }
            obj[14] = val15;
            _003F val16;

            if (model.Sex.HasValue)
            {
                val16 = new OracleParameter("@Sex", 112, 11);
                ((DbParameter)val16).Value = model.Sex.Value;
            }
            else
            {
                val16 = new OracleParameter("@Sex", 112);
                ((DbParameter)val16).Value = DBNull.Value;
            }
            obj[15] = val16;
            OracleParameter[] parameter = (OracleParameter[])obj;
            return(dbHelper.Execute(sql, parameter));
        }
Ejemplo n.º 15
0
        public ActionResult FlowCopyFor(FormCollection collection)
        {
            RoadFlow.Platform.WorkFlow     workFlow      = new RoadFlow.Platform.WorkFlow();
            RoadFlow.Platform.WorkFlowTask workFlowTask1 = new RoadFlow.Platform.WorkFlowTask();
            string            str1             = this.Request.QueryString["flowid"];
            string            stepid           = this.Request.QueryString["stepid"];
            string            str2             = this.Request.QueryString["groupid"];
            string            str3             = this.Request.QueryString["instanceid"];
            string            flowID           = str1;
            int               num              = 1;
            WorkFlowInstalled workFlowRunModel = workFlow.GetWorkFlowRunModel(flowID, num != 0);

            if (workFlowRunModel == null)
            {
                this.Response.Write("未找到流程运行实体");
                this.Response.End();
                return((ActionResult)null);
            }
            if (workFlowRunModel.Steps.Where <Step>((Func <Step, bool>)(p => p.ID == stepid.ToGuid())).Count <Step>() == 0)
            {
                this.Response.Write("未找到当前步骤");
                this.Response.End();
                return((ActionResult)null);
            }
            RoadFlow.Data.Model.WorkFlowTask workFlowTask2 = workFlowTask1.Get(this.Request.QueryString["taskid"].ToGuid());
            if (workFlowTask2 == null)
            {
                this.Response.Write("当前任务为空,请先保存再抄送!");
                this.Response.End();
                return((ActionResult)null);
            }
            if (collection != null)
            {
                List <RoadFlow.Data.Model.WorkFlowTask> taskList = workFlowTask1.GetTaskList(workFlowTask2.ID, true);
                List <RoadFlow.Data.Model.Users>        allUsers = new RoadFlow.Platform.Organize().GetAllUsers(this.Request.Form["user"] ?? "");
                StringBuilder stringBuilder = new StringBuilder();
                foreach (RoadFlow.Data.Model.Users users in allUsers)
                {
                    RoadFlow.Data.Model.Users user = users;
                    if (taskList.Find((Predicate <RoadFlow.Data.Model.WorkFlowTask>)(p => p.ReceiveID == user.ID)) == null)
                    {
                        Step step = workFlowRunModel.Steps.Where <Step>((Func <Step, bool>)(p => p.ID == this.Request.QueryString["stepid"].ToGuid())).First <Step>();
                        RoadFlow.Data.Model.WorkFlowTask model = new RoadFlow.Data.Model.WorkFlowTask();
                        if (step.WorkTime > Decimal.Zero)
                        {
                            model.CompletedTime = new DateTime?(DateTimeNew.Now.AddHours((double)step.WorkTime));
                        }
                        model.FlowID      = workFlowTask2.FlowID;
                        model.GroupID     = workFlowTask2.GroupID;
                        model.ID          = Guid.NewGuid();
                        model.Type        = 5;
                        model.InstanceID  = workFlowTask2.InstanceID;
                        model.Note        = "抄送任务";
                        model.PrevID      = workFlowTask2.PrevID;
                        model.PrevStepID  = workFlowTask2.PrevStepID;
                        model.ReceiveID   = user.ID;
                        model.ReceiveName = user.Name;
                        model.ReceiveTime = DateTimeNew.Now;
                        model.SenderID    = workFlowTask2.ReceiveID;
                        model.SenderName  = workFlowTask2.ReceiveName;
                        model.SenderTime  = model.ReceiveTime;
                        model.Status      = 0;
                        model.StepID      = workFlowTask2.StepID;
                        model.StepName    = workFlowTask2.StepName;
                        model.Sort        = workFlowTask2.Sort;
                        model.Title       = workFlowTask2.Title;
                        workFlowTask1.Add(model);
                        stringBuilder.Append(model.ReceiveName);
                        stringBuilder.Append(",");
                    }
                }
                // ISSUE: reference to a compiler-generated field
                if (WorkFlowRunController.\u003C\u003Eo__18.\u003C\u003Ep__0 == null)
                {
                    // ISSUE: reference to a compiler-generated field
                    WorkFlowRunController.\u003C\u003Eo__18.\u003C\u003Ep__0 = CallSite <Func <CallSite, object, string, object> > .Create(Binder.SetMember(CSharpBinderFlags.None, "script", typeof(WorkFlowRunController), (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 = WorkFlowRunController.\u003C\u003Eo__18.\u003C\u003Ep__0.Target((CallSite)WorkFlowRunController.\u003C\u003Eo__18.\u003C\u003Ep__0, this.ViewBag, "alert('成功抄送给:" + stringBuilder.ToString().TrimEnd(',') + "');new RoadUI.Window().close();");
            }
            return((ActionResult)this.View());
        }
Ejemplo n.º 16
0
        public int Update(RoadFlow.Data.Model.Users model)
        {
            //IL_001b: Unknown result type (might be due to invalid IL or missing references)
            //IL_0020: 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_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_0079: Unknown result type (might be due to invalid IL or missing references)
            //IL_007e: Unknown result type (might be due to invalid IL or missing references)
            //IL_008f: Expected O, but got Unknown
            //IL_0090: Expected O, but got Unknown
            //IL_009a: Unknown result type (might be due to invalid IL or missing references)
            //IL_009f: Unknown result type (might be due to invalid IL or missing references)
            //IL_00b0: Expected O, but got Unknown
            //IL_00b1: Expected O, but got Unknown
            //IL_00c6: Unknown result type (might be due to invalid IL or missing references)
            //IL_00cb: Unknown result type (might be due to invalid IL or missing references)
            //IL_00d7: Expected O, but got Unknown
            //IL_00e4: Unknown result type (might be due to invalid IL or missing references)
            //IL_00e9: Unknown result type (might be due to invalid IL or missing references)
            //IL_00f4: Expected O, but got Unknown
            //IL_00f5: 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_011c: Expected O, but got Unknown
            //IL_012a: Unknown result type (might be due to invalid IL or missing references)
            //IL_012f: Unknown result type (might be due to invalid IL or missing references)
            //IL_013a: Expected O, but got Unknown
            //IL_013b: Expected O, but got Unknown
            //IL_0154: Unknown result type (might be due to invalid IL or missing references)
            //IL_0159: Unknown result type (might be due to invalid IL or missing references)
            //IL_0165: Expected O, but got Unknown
            //IL_0176: Unknown result type (might be due to invalid IL or missing references)
            //IL_017b: Unknown result type (might be due to invalid IL or missing references)
            //IL_0186: Expected O, but got Unknown
            //IL_0187: Expected O, but got Unknown
            //IL_01a0: Unknown result type (might be due to invalid IL or missing references)
            //IL_01a5: Unknown result type (might be due to invalid IL or missing references)
            //IL_01b1: Expected O, but got Unknown
            //IL_01c2: Unknown result type (might be due to invalid IL or missing references)
            //IL_01c7: Unknown result type (might be due to invalid IL or missing references)
            //IL_01d2: Expected O, but got Unknown
            //IL_01d3: Expected O, but got Unknown
            //IL_01ea: Unknown result type (might be due to invalid IL or missing references)
            //IL_01ef: Unknown result type (might be due to invalid IL or missing references)
            //IL_01fb: Expected O, but got Unknown
            //IL_0209: Unknown result type (might be due to invalid IL or missing references)
            //IL_020e: Unknown result type (might be due to invalid IL or missing references)
            //IL_0219: Expected O, but got Unknown
            //IL_021a: Expected O, but got Unknown
            //IL_0234: Unknown result type (might be due to invalid IL or missing references)
            //IL_0239: Unknown result type (might be due to invalid IL or missing references)
            //IL_0245: Expected O, but got Unknown
            //IL_0256: Unknown result type (might be due to invalid IL or missing references)
            //IL_025b: Unknown result type (might be due to invalid IL or missing references)
            //IL_0266: Expected O, but got Unknown
            //IL_0267: Expected O, but got Unknown
            //IL_027e: Unknown result type (might be due to invalid IL or missing references)
            //IL_0283: Unknown result type (might be due to invalid IL or missing references)
            //IL_028f: Expected O, but got Unknown
            //IL_029d: Unknown result type (might be due to invalid IL or missing references)
            //IL_02a2: Unknown result type (might be due to invalid IL or missing references)
            //IL_02ad: Expected O, but got Unknown
            //IL_02ae: Expected O, but got Unknown
            //IL_02c8: Unknown result type (might be due to invalid IL or missing references)
            //IL_02cd: Unknown result type (might be due to invalid IL or missing references)
            //IL_02d9: Expected O, but got Unknown
            //IL_02ea: Unknown result type (might be due to invalid IL or missing references)
            //IL_02ef: Unknown result type (might be due to invalid IL or missing references)
            //IL_02fa: Expected O, but got Unknown
            //IL_02fb: Expected O, but got Unknown
            //IL_0312: Unknown result type (might be due to invalid IL or missing references)
            //IL_0317: Unknown result type (might be due to invalid IL or missing references)
            //IL_0323: Expected O, but got Unknown
            //IL_0331: Unknown result type (might be due to invalid IL or missing references)
            //IL_0336: Unknown result type (might be due to invalid IL or missing references)
            //IL_0341: Expected O, but got Unknown
            //IL_0342: Expected O, but got Unknown
            //IL_035d: Unknown result type (might be due to invalid IL or missing references)
            //IL_0362: Unknown result type (might be due to invalid IL or missing references)
            //IL_037b: Expected O, but got Unknown
            //IL_0385: Unknown result type (might be due to invalid IL or missing references)
            //IL_038a: Unknown result type (might be due to invalid IL or missing references)
            //IL_0395: Expected O, but got Unknown
            //IL_0396: Expected O, but got Unknown
            //IL_03a5: Unknown result type (might be due to invalid IL or missing references)
            //IL_03aa: Unknown result type (might be due to invalid IL or missing references)
            //IL_03bb: Expected O, but got Unknown
            //IL_03bc: Expected O, but got Unknown
            string sql = "UPDATE Users SET \r\n\t\t\t\tName=@Name,Account=@Account,Password=@Password,Status=@Status,Sort=@Sort,Note=@Note,Mobile=@Mobile,Tel=@Tel,OtherTel=@OtherTel,Fax=@Fax,Email=@Email,QQ=@QQ,HeadImg=@HeadImg,WeiXin=@WeiXin,Sex=@Sex\r\n\t\t\t\tWHERE ID=@ID";

            MySqlParameter[] obj = new MySqlParameter[16];
            MySqlParameter   val = new MySqlParameter("@Name", 253, 50);

            ((DbParameter)val).Value = model.Name;
            obj[0] = val;
            MySqlParameter val2 = new MySqlParameter("@Account", 253, 255);

            ((DbParameter)val2).Value = model.Account;
            obj[1] = val2;
            MySqlParameter val3 = new MySqlParameter("@Password", 752, -1);

            ((DbParameter)val3).Value = model.Password;
            obj[2] = val3;
            MySqlParameter val4 = new MySqlParameter("@Status", 3, 11);

            ((DbParameter)val4).Value = model.Status;
            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", 751, -1);
                ((DbParameter)val6).Value = model.Note;
            }
            else
            {
                val6 = new MySqlParameter("@Note", 751, -1);
                ((DbParameter)val6).Value = DBNull.Value;
            }
            obj[5] = val6;
            _003F val7;

            if (model.Mobile != null)
            {
                val7 = new MySqlParameter("@Mobile", 253, 50);
                ((DbParameter)val7).Value = model.Mobile;
            }
            else
            {
                val7 = new MySqlParameter("@Mobile", 253, 50);
                ((DbParameter)val7).Value = DBNull.Value;
            }
            obj[6] = val7;
            _003F val8;

            if (model.Tel != null)
            {
                val8 = new MySqlParameter("@Tel", 253, 500);
                ((DbParameter)val8).Value = model.Tel;
            }
            else
            {
                val8 = new MySqlParameter("@Tel", 253, 500);
                ((DbParameter)val8).Value = DBNull.Value;
            }
            obj[7] = val8;
            _003F val9;

            if (model.OtherTel != null)
            {
                val9 = new MySqlParameter("@OtherTel", 253, 500);
                ((DbParameter)val9).Value = model.OtherTel;
            }
            else
            {
                val9 = new MySqlParameter("@OtherTel", 253, 500);
                ((DbParameter)val9).Value = DBNull.Value;
            }
            obj[8] = val9;
            _003F val10;

            if (model.Fax != null)
            {
                val10 = new MySqlParameter("@Fax", 253, 50);
                ((DbParameter)val10).Value = model.Fax;
            }
            else
            {
                val10 = new MySqlParameter("@Fax", 253, 50);
                ((DbParameter)val10).Value = DBNull.Value;
            }
            obj[9] = val10;
            _003F val11;

            if (model.Email != null)
            {
                val11 = new MySqlParameter("@Email", 253, 500);
                ((DbParameter)val11).Value = model.Email;
            }
            else
            {
                val11 = new MySqlParameter("@Email", 253, 500);
                ((DbParameter)val11).Value = DBNull.Value;
            }
            obj[10] = val11;
            _003F val12;

            if (model.QQ != null)
            {
                val12 = new MySqlParameter("@QQ", 253, 50);
                ((DbParameter)val12).Value = model.QQ;
            }
            else
            {
                val12 = new MySqlParameter("@QQ", 253, 50);
                ((DbParameter)val12).Value = DBNull.Value;
            }
            obj[11] = val12;
            _003F val13;

            if (model.HeadImg != null)
            {
                val13 = new MySqlParameter("@HeadImg", 253, 500);
                ((DbParameter)val13).Value = model.HeadImg;
            }
            else
            {
                val13 = new MySqlParameter("@HeadImg", 253, 500);
                ((DbParameter)val13).Value = DBNull.Value;
            }
            obj[12] = val13;
            _003F val14;

            if (model.WeiXin != null)
            {
                val14 = new MySqlParameter("@WeiXin", 253, 50);
                ((DbParameter)val14).Value = model.WeiXin;
            }
            else
            {
                val14 = new MySqlParameter("@WeiXin", 253, 50);
                ((DbParameter)val14).Value = DBNull.Value;
            }
            obj[13] = val14;
            _003F val15;

            if (model.Sex.HasValue)
            {
                val15 = new MySqlParameter("@Sex", 3, 11);
                ((DbParameter)val15).Value = model.Sex.Value;
            }
            else
            {
                val15 = new MySqlParameter("@Sex", 3, 11);
                ((DbParameter)val15).Value = DBNull.Value;
            }
            obj[14] = val15;
            MySqlParameter val16 = new MySqlParameter("@ID", 253, 36);

            ((DbParameter)val16).Value = model.ID;
            obj[15] = val16;
            MySqlParameter[] parameter = (MySqlParameter[])obj;
            return(dbHelper.Execute(sql, parameter));
        }
Ejemplo n.º 17
0
        public int Add(RoadFlow.Data.Model.Users model)
        {
            //IL_001b: Unknown result type (might be due to invalid IL or missing references)
            //IL_0020: Unknown result type (might be due to invalid IL or missing references)
            //IL_0031: Expected O, but got Unknown
            //IL_0032: 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_0052: 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_009e: Unknown result type (might be due to invalid IL or missing references)
            //IL_00a3: Unknown result type (might be due to invalid IL or missing references)
            //IL_00b4: Expected O, but got Unknown
            //IL_00b5: 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_00d5: Expected O, but got Unknown
            //IL_00d6: Expected O, but got Unknown
            //IL_00eb: Unknown result type (might be due to invalid IL or missing references)
            //IL_00f0: Unknown result type (might be due to invalid IL or missing references)
            //IL_00fc: 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
            //IL_0130: Unknown result type (might be due to invalid IL or missing references)
            //IL_0135: Unknown result type (might be due to invalid IL or missing references)
            //IL_0141: Expected O, but got Unknown
            //IL_014f: Unknown result type (might be due to invalid IL or missing references)
            //IL_0154: Unknown result type (might be due to invalid IL or missing references)
            //IL_015f: Expected O, but got Unknown
            //IL_0160: Expected O, but got Unknown
            //IL_0179: Unknown result type (might be due to invalid IL or missing references)
            //IL_017e: Unknown result type (might be due to invalid IL or missing references)
            //IL_018a: Expected O, but got Unknown
            //IL_019b: Unknown result type (might be due to invalid IL or missing references)
            //IL_01a0: Unknown result type (might be due to invalid IL or missing references)
            //IL_01ab: Expected O, but got Unknown
            //IL_01ac: Expected O, but got Unknown
            //IL_01c6: Unknown result type (might be due to invalid IL or missing references)
            //IL_01cb: Unknown result type (might be due to invalid IL or missing references)
            //IL_01d7: Expected O, but got Unknown
            //IL_01e8: Unknown result type (might be due to invalid IL or missing references)
            //IL_01ed: Unknown result type (might be due to invalid IL or missing references)
            //IL_01f8: Expected O, but got Unknown
            //IL_01f9: Expected O, but got Unknown
            //IL_0210: Unknown result type (might be due to invalid IL or missing references)
            //IL_0215: Unknown result type (might be due to invalid IL or missing references)
            //IL_0221: Expected O, but got Unknown
            //IL_022f: Unknown result type (might be due to invalid IL or missing references)
            //IL_0234: Unknown result type (might be due to invalid IL or missing references)
            //IL_023f: Expected O, but got Unknown
            //IL_0240: Expected O, but got Unknown
            //IL_025a: Unknown result type (might be due to invalid IL or missing references)
            //IL_025f: Unknown result type (might be due to invalid IL or missing references)
            //IL_026b: Expected O, but got Unknown
            //IL_027c: Unknown result type (might be due to invalid IL or missing references)
            //IL_0281: Unknown result type (might be due to invalid IL or missing references)
            //IL_028c: Expected O, but got Unknown
            //IL_028d: Expected O, but got Unknown
            //IL_02a4: Unknown result type (might be due to invalid IL or missing references)
            //IL_02a9: Unknown result type (might be due to invalid IL or missing references)
            //IL_02b5: Expected O, but got Unknown
            //IL_02c3: Unknown result type (might be due to invalid IL or missing references)
            //IL_02c8: Unknown result type (might be due to invalid IL or missing references)
            //IL_02d3: Expected O, but got Unknown
            //IL_02d4: Expected O, but got Unknown
            //IL_02ee: Unknown result type (might be due to invalid IL or missing references)
            //IL_02f3: Unknown result type (might be due to invalid IL or missing references)
            //IL_02ff: Expected O, but got Unknown
            //IL_0310: Unknown result type (might be due to invalid IL or missing references)
            //IL_0315: Unknown result type (might be due to invalid IL or missing references)
            //IL_0320: Expected O, but got Unknown
            //IL_0321: Expected O, but got Unknown
            //IL_0338: Unknown result type (might be due to invalid IL or missing references)
            //IL_033d: Unknown result type (might be due to invalid IL or missing references)
            //IL_0349: Expected O, but got Unknown
            //IL_0357: Unknown result type (might be due to invalid IL or missing references)
            //IL_035c: Unknown result type (might be due to invalid IL or missing references)
            //IL_0367: Expected O, but got Unknown
            //IL_0368: Expected O, but got Unknown
            //IL_0383: Unknown result type (might be due to invalid IL or missing references)
            //IL_0388: Unknown result type (might be due to invalid IL or missing references)
            //IL_03a1: Expected O, but got Unknown
            //IL_03ab: Unknown result type (might be due to invalid IL or missing references)
            //IL_03b0: Unknown result type (might be due to invalid IL or missing references)
            //IL_03bb: Expected O, but got Unknown
            //IL_03bc: Expected O, but got Unknown
            string sql = "INSERT INTO users\r\n\t\t\t\t(ID,Name,Account,Password,Status,Sort,Note,Mobile,Tel,OtherTel,Fax,Email,QQ,HeadImg,WeiXin,Sex) \r\n\t\t\t\tVALUES(@ID,@Name,@Account,@Password,@Status,@Sort,@Note,@Mobile,@Tel,@OtherTel,@Fax,@Email,@QQ,@HeadImg,@WeiXin,@Sex)";

            MySqlParameter[] obj = new MySqlParameter[16];
            MySqlParameter   val = new MySqlParameter("@ID", 253, 36);

            ((DbParameter)val).Value = model.ID;
            obj[0] = val;
            MySqlParameter val2 = new MySqlParameter("@Name", 253, 50);

            ((DbParameter)val2).Value = model.Name;
            obj[1] = val2;
            MySqlParameter val3 = new MySqlParameter("@Account", 253, 255);

            ((DbParameter)val3).Value = model.Account;
            obj[2] = val3;
            MySqlParameter val4 = new MySqlParameter("@Password", 752, -1);

            ((DbParameter)val4).Value = model.Password;
            obj[3] = val4;
            MySqlParameter val5 = new MySqlParameter("@Status", 3, 11);

            ((DbParameter)val5).Value = model.Status;
            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", 751, -1);
                ((DbParameter)val7).Value = model.Note;
            }
            else
            {
                val7 = new MySqlParameter("@Note", 751, -1);
                ((DbParameter)val7).Value = DBNull.Value;
            }
            obj[6] = val7;
            _003F val8;

            if (model.Mobile != null)
            {
                val8 = new MySqlParameter("@Mobile", 253, 50);
                ((DbParameter)val8).Value = model.Mobile;
            }
            else
            {
                val8 = new MySqlParameter("@Mobile", 253, 50);
                ((DbParameter)val8).Value = DBNull.Value;
            }
            obj[7] = val8;
            _003F val9;

            if (model.Tel != null)
            {
                val9 = new MySqlParameter("@Tel", 253, 500);
                ((DbParameter)val9).Value = model.Tel;
            }
            else
            {
                val9 = new MySqlParameter("@Tel", 253, 500);
                ((DbParameter)val9).Value = DBNull.Value;
            }
            obj[8] = val9;
            _003F val10;

            if (model.OtherTel != null)
            {
                val10 = new MySqlParameter("@OtherTel", 253, 500);
                ((DbParameter)val10).Value = model.OtherTel;
            }
            else
            {
                val10 = new MySqlParameter("@OtherTel", 253, 500);
                ((DbParameter)val10).Value = DBNull.Value;
            }
            obj[9] = val10;
            _003F val11;

            if (model.Fax != null)
            {
                val11 = new MySqlParameter("@Fax", 253, 50);
                ((DbParameter)val11).Value = model.Fax;
            }
            else
            {
                val11 = new MySqlParameter("@Fax", 253, 50);
                ((DbParameter)val11).Value = DBNull.Value;
            }
            obj[10] = val11;
            _003F val12;

            if (model.Email != null)
            {
                val12 = new MySqlParameter("@Email", 253, 500);
                ((DbParameter)val12).Value = model.Email;
            }
            else
            {
                val12 = new MySqlParameter("@Email", 253, 500);
                ((DbParameter)val12).Value = DBNull.Value;
            }
            obj[11] = val12;
            _003F val13;

            if (model.QQ != null)
            {
                val13 = new MySqlParameter("@QQ", 253, 50);
                ((DbParameter)val13).Value = model.QQ;
            }
            else
            {
                val13 = new MySqlParameter("@QQ", 253, 50);
                ((DbParameter)val13).Value = DBNull.Value;
            }
            obj[12] = val13;
            _003F val14;

            if (model.HeadImg != null)
            {
                val14 = new MySqlParameter("@HeadImg", 253, 500);
                ((DbParameter)val14).Value = model.HeadImg;
            }
            else
            {
                val14 = new MySqlParameter("@HeadImg", 253, 500);
                ((DbParameter)val14).Value = DBNull.Value;
            }
            obj[13] = val14;
            _003F val15;

            if (model.WeiXin != null)
            {
                val15 = new MySqlParameter("@WeiXin", 253, 50);
                ((DbParameter)val15).Value = model.WeiXin;
            }
            else
            {
                val15 = new MySqlParameter("@WeiXin", 253, 50);
                ((DbParameter)val15).Value = DBNull.Value;
            }
            obj[14] = val15;
            _003F val16;

            if (model.Sex.HasValue)
            {
                val16 = new MySqlParameter("@Sex", 3, 11);
                ((DbParameter)val16).Value = model.Sex.Value;
            }
            else
            {
                val16 = new MySqlParameter("@Sex", 3, 11);
                ((DbParameter)val16).Value = DBNull.Value;
            }
            obj[15] = val16;
            MySqlParameter[] parameter = (MySqlParameter[])obj;
            return(dbHelper.Execute(sql, parameter));
        }
Ejemplo n.º 18
0
 public int Add(RoadFlow.Data.Model.Users model)
 {
     return(dataUsers.Add(model));
 }
Ejemplo n.º 19
0
 public static void Add(string title, string contents, Types type = Types.其它分类, string oldXML = "", string newXML = "", RoadFlow.Data.Model.Users user = null)
 {
     RoadFlow.Data.Model.Log log = new RoadFlow.Data.Model.Log();
     log.Contents = contents;
     log.ID       = Guid.NewGuid();
     log.Title    = title;
     log.OldXml   = (oldXML.IsNullOrEmpty() ? null : oldXML);
     log.NewXml   = (newXML.IsNullOrEmpty() ? null : newXML);
     log.Type     = type.ToString();
     try
     {
         if (user == null)
         {
             user = Users.CurrentUser;
         }
         if (user != null)
         {
             log.UserID   = user.ID;
             log.UserName = user.Name;
         }
         log.IPAddress = Tools.GetIPAddress();
         log.Others    = string.Format("操作系统:{0} 浏览器:{1}", Tools.GetOSName(), Tools.GetBrowse());
         log.URL       = HttpContext.Current.Request.Url.ToString();
     }
     catch
     {
     }
     log.WriteTime = DateTimeNew.Now;
     Add(log);
 }
Ejemplo n.º 20
0
        public int Add(RoadFlow.Data.Model.Users model)
        {
            string sql = "INSERT INTO Users\r\n\t\t\t\t(ID,Name,Account,Password,Status,Sort,Note,Mobile,Tel,OtherTel,Fax,Email,QQ,HeadImg,WeiXin,Sex) \r\n\t\t\t\tVALUES(@ID,@Name,@Account,@Password,@Status,@Sort,@Note,@Mobile,@Tel,@OtherTel,@Fax,@Email,@QQ,@HeadImg,@WeiXin,@Sex)";

            SqlParameter[] parameter = new SqlParameter[16]
            {
                new SqlParameter("@ID", SqlDbType.UniqueIdentifier, -1)
                {
                    Value = model.ID
                },
                new SqlParameter("@Name", SqlDbType.NVarChar, 100)
                {
                    Value = model.Name
                },
                new SqlParameter("@Account", SqlDbType.VarChar, 255)
                {
                    Value = model.Account
                },
                new SqlParameter("@Password", SqlDbType.VarChar, 500)
                {
                    Value = model.Password
                },
                new SqlParameter("@Status", SqlDbType.Int, -1)
                {
                    Value = model.Status
                },
                new SqlParameter("@Sort", SqlDbType.Int, -1)
                {
                    Value = model.Sort
                },
                (model.Note == null) ? new SqlParameter("@Note", SqlDbType.NVarChar, -1)
                {
                    Value = DBNull.Value
                } : new SqlParameter("@Note", SqlDbType.NVarChar, -1)
                {
                    Value = model.Note
                },
                (model.Mobile == null) ? new SqlParameter("@Mobile", SqlDbType.VarChar, 50)
                {
                    Value = DBNull.Value
                } : new SqlParameter("@Mobile", SqlDbType.VarChar, 50)
                {
                    Value = model.Mobile
                },
                (model.Tel == null) ? new SqlParameter("@Tel", SqlDbType.VarChar, 500)
                {
                    Value = DBNull.Value
                } : new SqlParameter("@Tel", SqlDbType.VarChar, 500)
                {
                    Value = model.Tel
                },
                (model.OtherTel == null) ? new SqlParameter("@OtherTel", SqlDbType.VarChar, 500)
                {
                    Value = DBNull.Value
                } : new SqlParameter("@OtherTel", SqlDbType.VarChar, 500)
                {
                    Value = model.OtherTel
                },
                (model.Fax == null) ? new SqlParameter("@Fax", SqlDbType.VarChar, 50)
                {
                    Value = DBNull.Value
                } : new SqlParameter("@Fax", SqlDbType.VarChar, 50)
                {
                    Value = model.Fax
                },
                (model.Email == null) ? new SqlParameter("@Email", SqlDbType.VarChar, 500)
                {
                    Value = DBNull.Value
                } : new SqlParameter("@Email", SqlDbType.VarChar, 500)
                {
                    Value = model.Email
                },
                (model.QQ == null) ? new SqlParameter("@QQ", SqlDbType.VarChar, 50)
                {
                    Value = DBNull.Value
                } : new SqlParameter("@QQ", SqlDbType.VarChar, 50)
                {
                    Value = model.QQ
                },
                (model.HeadImg == null) ? new SqlParameter("@HeadImg", SqlDbType.VarChar, 500)
                {
                    Value = DBNull.Value
                } : new SqlParameter("@HeadImg", SqlDbType.VarChar, 500)
                {
                    Value = model.HeadImg
                },
                (model.WeiXin == null) ? new SqlParameter("@WeiXin", SqlDbType.VarChar, 50)
                {
                    Value = DBNull.Value
                } : new SqlParameter("@WeiXin", SqlDbType.VarChar, 50)
                {
                    Value = model.WeiXin
                },
                (!model.Sex.HasValue) ? new SqlParameter("@Sex", SqlDbType.Int, -1)
                {
                    Value = DBNull.Value
                } : new SqlParameter("@Sex", SqlDbType.Int, -1)
                {
                    Value = model.Sex
                }
            };
            return(dbHelper.Execute(sql, parameter));
        }
Ejemplo n.º 21
0
 public int Update(RoadFlow.Data.Model.Users model)
 {
     return(dataUsers.Update(model));
 }
Ejemplo n.º 22
0
 public void EditUserAsync(RoadFlow.Data.Model.Users user)
 {
     new del_SaveUser(EditUser).BeginInvoke(user, null, null);
 }