Exemplo n.º 1
0
        public bool UpdateIteam(MODEL.LoginUser model)
        {
            bool   result = false;
            string str    = "update LoginUser set LoginName=@LoginName,UserPwd=@UserPwd,UserName=@UserName,shgl=@shgl,hygl=@hygl,jcsj=@jcsj,jcgl=@jcgl,spgl=@spgl,tjbb=@tjbb,dxgl=@dxgl,tcgl=@tcgl,glysz=@glysz,lsdsz=@lsdsz,sjkgl=@sjkgl,jbcs=@jbcs,qtfw=@qtfw,flgl=@flgl,yggl=@yggl,dmjs=@dmjs where ID=@ID";

            SqlParameter[] pms = new SqlParameter[] {
                new SqlParameter("@LoginName", model.LoginName),
                new SqlParameter("@UserPwd", model.UserPwd),
                new SqlParameter("@UserName", model.UserName),
                new SqlParameter("@shgl", model.shgl),
                new SqlParameter("@hygl", model.hygl),
                new SqlParameter("@jcsj", model.jcsj),
                new SqlParameter("@jcgl", model.jcgl),
                new SqlParameter("@spgl", model.spgl),
                new SqlParameter("@tjbb", model.tjbb),
                new SqlParameter("@dxgl", model.dxgl),
                new SqlParameter("@tcgl", model.tcgl),
                new SqlParameter("@glysz", model.glysz),
                new SqlParameter("@lsdsz", model.lsdsz),
                new SqlParameter("@sjkgl", model.sjkgl),
                new SqlParameter("@jbcs", model.jbcs),
                new SqlParameter("@qtfw", model.qtfw),
                new SqlParameter("@flgl", model.flgl),
                new SqlParameter("@yggl", model.yggl),
                new SqlParameter("@dmjs", model.dmjs),
                new SqlParameter("@ID", model.ID)
            };
            if (SqlHelper.ExecuteNonQuery(str, pms) > 0)
            {
                result = true;
            }
            return(result);
        }
Exemplo n.º 2
0
        public bool AddUserIteam(MODEL.LoginUser model)
        {
            bool   result = false;
            string str    = "insert into LoginUser(LoginName,UserPwd,UserName,shgl,hygl,jcsj,jcgl,spgl,tjbb,dxgl,tcgl,glysz,lsdsz,sjkgl,jbcs,qtfw,flgl,yggl,dmjs) values(@LoginName,@UserPwd,@UserName,@shgl,@hygl,@jcsj,@jcgl,@spgl,@tjbb,@dxgl,@tcgl,@glysz,@lsdsz,@sjkgl,@jbcs,@qtfw,@flgl,@yggl,@dmjs)";

            SqlParameter[] pms = new SqlParameter[] {
                new SqlParameter("@LoginName", model.LoginName),
                new SqlParameter("@UserPwd", model.UserPwd),
                new SqlParameter("@UserName", model.UserName),
                new SqlParameter("@shgl", model.shgl),
                new SqlParameter("@hygl", model.hygl),
                new SqlParameter("@jcsj", model.jcsj),
                new SqlParameter("@jcgl", model.jcgl),
                new SqlParameter("@spgl", model.spgl),
                new SqlParameter("@tjbb", model.tjbb),
                new SqlParameter("@dxgl", model.dxgl),
                new SqlParameter("@tcgl", model.tcgl),
                new SqlParameter("@glysz", model.glysz),
                new SqlParameter("@lsdsz", model.lsdsz),
                new SqlParameter("@sjkgl", model.sjkgl),
                new SqlParameter("@jbcs", model.jbcs),
                new SqlParameter("@qtfw", model.qtfw),
                new SqlParameter("@flgl", model.flgl),
                new SqlParameter("@dmjs", model.dmjs),
                new SqlParameter("@yggl", model.yggl)
            };
            if (SqlHelper.ExecuteNonQuery(str, pms) > 0)
            {
                result = true;
            }
            return(result);
        }
Exemplo n.º 3
0
 public bool SelectUser(string LoginName, string UserPwd, string UserName)
 {
     //LoginUserDAl userdal=new LoginUserDAl();
     MODEL.LoginUser user = userdal.SelectUser(LoginName, UserPwd, UserName);
     if (user.LoginName != null)
     {
         //if (user.LoginName.Trim() == "admin" && user.UserPwd.Trim() == "admin" && user.UserName.Trim() == "admin")
         //    {
         filter(user, user.UserName);
         return(true);
         //}
         //filter(user);
         //return true;
         //return false;
     }
     else
     {
         string name = ConfigurationManager.AppSettings["UserName"].ToString();
         string pwd  = ConfigurationManager.AppSettings["UserPwd"].ToString();
         if (LoginName == name && UserPwd == pwd && UserName == "admin")
         {
             //虽然登陆验证可以通过,但是放置后未知错误
             user.LoginName = "admin";
             user.UserName  = "******";
             user.UserPwd   = "admin";
             filter(user, user.UserName);
             return(true);
         }
         return(false);
     }
 }
Exemplo n.º 4
0
        public void filter(MODEL.LoginUser model, string dpname)
        {
            //在此处,将登陆的店铺合用户名存入数据可下次登陆的时候,自动选择上

            string[] pict = bll.selectPicImg(dpname);
            FilterClass.dic        = bll.SelectAllDictionary();
            FilterClass.PicImg     = pict[0];
            FilterClass.DXInfo     = pict[1];
            FilterClass.ID         = pict[2];
            FilterClass.MemberXF   = pict[3];
            FilterClass.BGJPrinter = pict[4];
            FilterClass.DPTel      = pict[5];
            FilterClass.Address    = pict[6];
            //将登陆人的信息保存在过滤器中,在用户执行其他操作时进行权限过滤
            AddDPAndUser(pict[2], dpname, model.LoginName);
            FilterClass.DianPu1 = model;
            blls.InsertIpAddress();
        }
Exemplo n.º 5
0
 public bool UpdateIteam(MODEL.LoginUser model)
 {
     return(userdal.UpdateIteam(model));
 }
Exemplo n.º 6
0
 public bool AddUserIteam(MODEL.LoginUser model)
 {
     return(userdal.AddUserIteam(model));
 }