Esempio n. 1
0
        /// <summary>
        /// 发送消息/通知界面
        /// </summary>
        /// <returns></returns>
        public ActionResult Index()
        {
            where_model wm = new where_model();

            wm.userid = UserID;
            LoginUser_Info loginuser = UserDataProxy.LoginUser_Info_GetModel(wm);

            wm.kid = loginuser.kid;

            if (loginuser.kid <= 0)
            {
                return(RedirectToAction("NoJoinGarten"));
            }

            //&cid=44146&touid=222323&realname=xx 可以在学生通讯录里进入到发通知界面,并选择这个小朋友
            int cid = 0;

            if (Request.QueryString["cid"] != null)
            {
                cid = int.Parse(Request.QueryString["cid"]);
            }

            int touid = 0;

            if (Request.QueryString["touid"] != null)
            {
                touid = int.Parse(Request.QueryString["touid"]);
            }

            string realname = "";

            if (Request.QueryString["realname"] != null)
            {
                realname = Request.QueryString["realname"];
            }

            IList <Grade_Info>   gradelist = UserDataProxy.Grade_Info_GetList(wm);
            IList <Teacher_Info> tealist   = UserDataProxy.TeacherInfo_GetListV2(wm);

            ViewData["loginuser"] = loginuser;
            ViewData["gradelist"] = gradelist;
            ViewData["tealist"]   = tealist;
            ViewData["kid"]       = loginuser.kid;

            string ulist      = "";
            string selecttype = loginuser.usertype > 1 ? "teachers02" : "teachers";

            if (touid > 0)
            {
                ulist      = string.Format("${0}|0|{1}|", cid, touid);
                selecttype = loginuser.usertype > 1 ? "grades02" : "grades";
            }
            ViewData["touid"]      = touid;
            ViewData["uid"]        = UserID;
            ViewData["realname"]   = realname;
            ViewData["ulist"]      = ulist;
            ViewData["selecttype"] = selecttype;

            Kin_Sms sms = SmsDataProxy.Kin_Sms_GetModel(wm);

            ViewData["sms"] = sms;

            return(View());
        }