Ejemplo n.º 1
0
 public static int updatePassword(string userId, string pssword, string psd)//根据二维码设置人员信息
 {
     try
     {
         string  sqlStr = "select * from MeUserInfo where uId=" + userId + " and uPassword='******'";
         DataSet dt     = SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sqlStr);
         if (dt.Tables[0].Rows.Count > 0)
         {
             string sqlStr1 = "update MeUserInfo set uPassword='******' where uId=" + userId;
             int    i       = SqlHelper.ExecuteNonQuery(SqlHelper.GetConnSting(), CommandType.Text, sqlStr1);
             if (i > 0)
             {
                 return(i);
             }
             return(-1);
         }
         else
         {
             return(-1);
         }
     }
     catch (SyntaxErrorException e)
     {
         ErrorHandle.showError(e);
         return(-1);
     }
 }
Ejemplo n.º 2
0
        public static int setloginState(string userId, string loginState)//根据二维码设置人员信息
        {
            try
            {
                string sqlStr = "update MeUserInfo set loginState=" + loginState + " where uId=" + userId;

                int i = SqlHelper.ExecuteNonQuery(SqlHelper.GetConnSting(), CommandType.Text, sqlStr);

                if (i > 0)
                {
                    return(i);
                }
                return(-1);
            }
            catch (SyntaxErrorException e)
            {
                ErrorHandle.showError(e);
                return(-1);
            }
        }
Ejemplo n.º 3
0
        public static int   setMeeterInfo(string QRcode, string checkTime, string mID, string meetid)//根据二维码设置人员信息
        {
            try
            {
                string sqlStr = "update MePerAttend set attendState=1,attendTime='" + checkTime + "',manageId='" + mID + "' where QRcode='" + QRcode + "' and meetingId=" + meetid;

                int i = SqlHelper.ExecuteNonQuery(SqlHelper.GetConnSting(), CommandType.Text, sqlStr);

                if (i > 0)
                {
                    return(i);
                }
                return(-1);
            }
            catch (SyntaxErrorException e)
            {
                ErrorHandle.showError(e);

                return(-1);
            }
        }
Ejemplo n.º 4
0
        public static DataTable getMeeter(string id) //根据会议获取人员信息
        {
            try
            {
                string sqlStr = "select MePerAttend.*,MeDelegation.* from MePerAttend,MeDelegation where MePerAttend.meetingId=" + id + " and MeDelegation.id=MePerAttend.delegationId order by MePerAttend.delegationId";

                DataSet dt = SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sqlStr);

                if (dt.Tables[0].Rows.Count > 0)
                {
                    return(dt.Tables[0]);
                }
                return(null);
            }
            catch (SyntaxErrorException e)
            {
                ErrorHandle.showError(e);

                return(null);
            }
        }
Ejemplo n.º 5
0
        public static DataTable getCheck(string QRcode)//根据会议获取人员信息
        {
            try
            {
                string sqlStr = "select * from MePerAttend where QRcode='" + QRcode + "'";

                DataSet dt = SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sqlStr);

                if (dt.Tables[0].Rows.Count > 0)
                {
                    return(dt.Tables[0]);
                }
                return(null);
            }
            catch (SyntaxErrorException e)
            {
                ErrorHandle.showError(e);

                return(null);
            }
        }
Ejemplo n.º 6
0
        public static int updateNumber(string totalNum, string arriveNum, string noarriveNum, string meetingId)//根据二维码设置人员信息
        {
            try
            {
                string sqlStr = "update MeNumber set  nTotal='" + totalNum + "',nReal='" + arriveNum + "',nNotArrive='" + noarriveNum + "' where meetingId=" + meetingId;

                int i = SqlHelper.ExecuteNonQuery(SqlHelper.GetConnSting(), CommandType.Text, sqlStr);

                if (i > 0)
                {
                    return(i);
                }
                return(-1);
            }
            catch (SyntaxErrorException e)
            {
                ErrorHandle.showError(e);

                return(-1);
            }
        }
Ejemplo n.º 7
0
        public static DataTable getIsMeeting(string meetingId)//
        {
            try
            {
                string sqlStr = "select * from MeNumber where meetingId=" + meetingId;

                DataSet dt = SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sqlStr);

                if (dt.Tables[0].Rows.Count > 0)
                {
                    return(dt.Tables[0]);
                }
                return(null);
            }
            catch (SyntaxErrorException e)
            {
                ErrorHandle.showError(e);

                return(null);
            }
        }
Ejemplo n.º 8
0
        public static DataTable getMeet(string time, string departID)//根据时间获取会议信息
        {
            try
            {
                string sqlStr = "select * from MeMeetInfo where mDate='" + time + "' and mDeptCode='" + departID + "'";

                DataSet dt = SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sqlStr);

                if (dt.Tables[0].Rows.Count > 0)
                {
                    return(dt.Tables[0]);
                }
                return(null);
            }
            catch (SyntaxErrorException e)
            {
                ErrorHandle.showError(e);

                return(null);
            }
        }
Ejemplo n.º 9
0
        public static DataRow Login(string userName, string userPwd)
        {
            try
            {
                string  sq  = "select * from MeUserInfo where uId='" + userName + "' and uPassword='******'";
                DataSet obj = SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sq);

                if (obj.Tables[0].Rows.Count > 0)
                {
                    if (obj.Tables[0].Rows[0]["uId"].ToString() == userName && obj.Tables[0].Rows[0]["uPassword"].ToString() == userPwd)
                    {
                        return(obj.Tables[0].Rows[0]);
                    }
                }
                return(null);
            }
            catch (SystemException e)
            {
                ErrorHandle.showError(e);
                return(null);
            }
        }
Ejemplo n.º 10
0
        public static int insertNumber(string meetingId)//根据二维码设置人员信息
        {
            //string totalNum, string arriveNum,string noarriveNum,
            try
            {
                string sqlStr = "insert MeNumber(meetingId,state) values(" + meetingId + ",0)";
                //"insert MeNumber(nTotal,nReal,nNotArrive,meetingId) values('" + totalNum + "','" + arriveNum + "','" + noarriveNum + "'," + meetingId + ")";

                int i = SqlHelper.ExecuteNonQuery(SqlHelper.GetConnSting(), CommandType.Text, sqlStr);

                if (i > 0)
                {
                    return(i);
                }
                return(-1);
            }
            catch (SyntaxErrorException e)
            {
                ErrorHandle.showError(e);

                return(-1);
            }
        }