Ejemplo n.º 1
0
        public bool GetOpenConference()
        {
            SqlConnection sc = MSSQLDB.CreateDBConnet();
            try
            {
                //                   0    1     2          3        4        5          6          7          8
                string ss = "select mID,mName,mContent,mFileType,mFilePath,mRoomID,mclientShowID,mNoteID,mEnterpriseID from dbo.ConMeeting where getdate()>mstarttime and getdate()<mendtime";
                sc.Open();
                SqlCommand scmd = new SqlCommand(ss, sc);
                DataTable dt = new DataTable();
                SqlDataAdapter sda = new SqlDataAdapter(scmd);
                sda.Fill(dt);
                if (dt.Rows.Count > 0)
                {
                    foreach (DataRow dr in dt.Rows)
                    {
                        string sid = dr[0].ToString();
                        ss = @"select mPersonID,mStatus from dbo.ConPersonAddress where mConID=" + sid + " and mMacAddress='" + sMac + "'";
                        scmd.CommandText = ss;
                        SqlDataReader sdr = scmd.ExecuteReader();
                        if (sdr.Read())
                        {
                            sId = sid;
                            //ver2.0
                            sConname = dr[1].ToString();
                            sConferencecontent = dr[2].ToString();
                            mUser = new User(sdr[0].ToString(), int.Parse(sdr[1].ToString()));
                            sdr.Close();
                            sc.Close();
                            GetAgendos(sid);
                            return true;//ApplyValue(dr);
                        }
                    }
                    sc.Close();
                    sfailedopen = "不是匹配的客户端!" + sMac;
                    return false;
                }
                else
                {
                    sfailedopen = "没有正在召开的会议!";
                    sc.Close();
                    return false;
                }

            }
            catch { sfailedopen = MSSQLDB.error; }
            return false;
        }
Ejemplo n.º 2
0
        private void initDatetime(DateTime dtstart, DateTime dtend)
        {
            dtssend = dtend;
            dtsstart = dtstart;
            if (!(isHoster=initHoster()))
            {
                mUser = null;
            }

            InitFile();//获取附件必须在指定的时间段内
        }
Ejemplo n.º 3
0
 private bool initHoster()
 {
     SqlConnection sc = MSSQLDB.CreateDBConnet();
     try
     {
         string sscmd = "SELECT mPersonID  FROM ConPersonAddress where mStatus=0 and mAgendoID=" + mID;
         sc.Open();
         SqlCommand scmd = new SqlCommand(sscmd, sc);
         mUser = new User(scmd.ExecuteScalar().ToString(), 0);
         sc.Close();
         return true;
     }
     catch { }
     return false;
 }
Ejemplo n.º 4
0
 private void initDatetime(DateTime dtstart, DateTime dtend)
 {
     dtssend = dtend;
     dtsstart = dtstart;
     if (!(isHoster=initHoster()))
     {
         mUser = null;
     }
 }