Esempio n. 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            User_Load("student-add");
            //班级ID
            string cid = Request["cid"];

            if (!string.IsNullOrEmpty(cid))
            {
                try
                {
                    classId = Convert.ToInt32(cid);
                }
                catch (Exception)
                {
                }
            }

            //设置班级
            SchClassId = classId;
            //设置年级
            Entity.GradeEntity       cmodel = new BLL.GradeBLL().GetEntity(SchClassId);
            Entity.SchoolGradeEntity gmodel = null;
            if (cmodel != null)
            {
                SchGradeId = cmodel.GgradeID;
                //获取学校对象
                gmodel = new BLL.SchoolGradeBLL().GetEntity(SchGradeId);
            }
            //设置学校
            if (gmodel != null)
            {
                SchID = gmodel.SchoolID;
            }
        }
Esempio n. 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            User_Load("grade-add");
            // 年级ID
            string gid = Request["gid"];

            if (!string.IsNullOrEmpty(gid))
            {
                try
                {
                    gradeId = Convert.ToInt32(gid);
                }
                catch (Exception)
                {
                }
            }
            //设置年级ID
            SchGradeId = gradeId;
            //设置学校ID
            Entity.SchoolGradeEntity scEntity = new BLL.SchoolGradeBLL().GetEntity(SchGradeId);
            if (scEntity != null)
            {
                SchID = scEntity.SchoolID;
            }
        }
Esempio n. 3
0
        //数据绑定
        void Bind()
        {
            int gid = Str2Int(q("id"), 0);

            Daiv_OA.Entity.StudentEntity model = new Daiv_OA.Entity.StudentEntity();
            model               = new Daiv_OA.BLL.StudentBLL().GetEntity(gid);
            this.Snumber.Text   = model.Snumber;
            this.Sname.Text     = model.Sname;
            this.Sbirthday.Text = model.Sbirthday.ToString("yyyy-MM-dd");
            //绑定家长联系电话
            List <Daiv_OA.Entity.ContactEntity> cModels = new Daiv_OA.BLL.ContactBLL().GetEntitysBySid(model.Sid);
            StringBuilder sbuilder = new StringBuilder();

            sbuilder.AppendLine("<table id = \"contactTable\"  class=\"ipt\" width=\"280px;\" >");
            sbuilder.AppendLine("<thead><tr><td>名称</td><td>电话号码</td><td>操作<input type=\"button\" id =\"contactAdd\" value =\"添加\" /></td></tr></thead>");
            int index = 0;

            if (cModels != null && cModels.Count > 0)
            {
                foreach (var item in cModels)
                {
                    sbuilder.AppendLine("<tr class=\"contactTr\">");
                    sbuilder.AppendLine("<td><input type = \"text\" name =\"contactName\" value =\"" + item.CPhoneName + "\" maxlength=\"32\"  onkeyup =\"value = value.replace(/[^\\a-\\z\\-\\Z0-9\\u4E00-\\u9FA5]/g, '')\" onpaste =\"return false\" oncontextmenu =\"return false; \" /></td>");
                    sbuilder.AppendLine("<td ><input type = \"text\" name =\"contactPhone\" value =\"" + item.Cphone + "\" style =\"width:120px;\" onkeyup=\"value = value.replace(/[^0-9]/g,'')\" onpaste=\"return false\" oncontextmenu=\"return false; \" /></td>");
                    sbuilder.AppendLine("<td><input type = \"button\" class=\"contactDelete\" value =\"删除\"  style =\"" + (index == 0? "display:none;" : "") + "\" /></td>");
                    sbuilder.AppendLine("</tr>");
                    index++;
                }
            }
            else
            {
                sbuilder.AppendLine("<tr class=\"contactTr\">");
                sbuilder.AppendLine("<td><input type = \"text\" name =\"contactName\" value =\"\" style =\"width:60px;\" /></td>");
                sbuilder.AppendLine("<td ><input type = \"text\" name =\"contactPhone\" value =\"\" style =\"width:120px;\" /></td>");
                sbuilder.AppendLine("<td><input type = \"button\" class=\"contactDelete\" value =\"删除\"  style =\"display:none;\" /></td>");
                sbuilder.AppendLine("</tr>");
            }
            sbuilder.AppendLine("</table>");
            this.ltMasterSetting.Text = sbuilder.ToString();

            //设置班级
            SchClassId = model.Gid;
            //设置年级
            Entity.GradeEntity       cmodel = new BLL.GradeBLL().GetEntity(SchClassId);
            Entity.SchoolGradeEntity gmodel = null;
            if (cmodel != null)
            {
                SchGradeId = cmodel.GgradeID;
                //获取学校对象
                gmodel = new BLL.SchoolGradeBLL().GetEntity(SchGradeId);
            }
            //设置学校
            if (gmodel != null)
            {
                SchID = gmodel.SchoolID;
            }
        }
Esempio n. 4
0
        private ResponeDataEntity GetGrade(HttpContext context, JObject ob)
        {
            string            shid        = ob["shid"].ToString();
            ResponeDataEntity resultModel = new ResponeDataEntity();

            BLL.SchoolGradeBLL       sbgradell = new BLL.SchoolGradeBLL();
            List <SchoolGradeEntity> list      = sbgradell.GetAllListByScId(shid);

            resultModel.Status = 1;
            resultModel.Data   = list;
            return(resultModel);
        }
Esempio n. 5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            User_Load("student-add");
            //班级ID
            string cid = Request["cid"];

            if (!string.IsNullOrEmpty(cid))
            {
                try
                {
                    classId = Convert.ToInt32(cid);
                }
                catch (Exception)
                {
                }
            }

            if (!this.IsPostBack)
            {
                //string sql = "";
                //Daiv_OA.BLL.GradeBLL dp = new Daiv_OA.BLL.GradeBLL();
                //DataSet ds = dp.GetList(sql);
                //for (int j = 0; j < ds.Tables[0].Rows.Count; j++)
                //{
                //    ListItem listItem = new ListItem();
                //    listItem.Text = ds.Tables[0].Rows[j]["Gname"].ToString();
                //    listItem.Value = ds.Tables[0].Rows[j]["Gid"].ToString();
                //    this.ddlGid.Items.Add(listItem);
                //}
                //ds.Clear();
            }

            //设置班级
            SchClassId = classId;
            //设置年级
            Entity.GradeEntity       cmodel = new BLL.GradeBLL().GetEntity(SchClassId);
            Entity.SchoolGradeEntity gmodel = null;
            if (cmodel != null)
            {
                SchGradeId = cmodel.GgradeID;
                //获取学校对象
                gmodel = new BLL.SchoolGradeBLL().GetEntity(SchGradeId);
            }
            //设置学校
            if (gmodel != null)
            {
                SchID = gmodel.SchoolID;
            }
        }
Esempio n. 6
0
        //数据绑定
        void Bind()
        {
            int gid = Str2Int(q("id"), 0);

            Daiv_OA.Entity.GradeEntity model = new Daiv_OA.Entity.GradeEntity();
            model                  = new Daiv_OA.BLL.GradeBLL().GetEntity(gid);
            this.Gname.Text        = model.Gname;
            this.Gsnumber.Text     = model.Gsnumber.ToString();
            this.Gdescription.Text = model.Gdescription;
            //this.GgradeName.Text = model.GgradeName;
            this.Mphone.Text = model.Mphone;


            //设置年级ID
            SchGradeId = model.GgradeID;
            //设置学校ID
            Entity.SchoolGradeEntity scEntity = new BLL.SchoolGradeBLL().GetEntity(SchGradeId);
            if (scEntity != null)
            {
                SchID = scEntity.SchoolID;
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            User_Load("student-list");
            User_Load("student-list");

            //班级ID
            string cid = Request["cid"];

            if (!string.IsNullOrEmpty(cid))
            {
                try
                {
                    classId = Convert.ToInt32(cid);
                }
                catch (Exception)
                {
                }
            }
            //设置班级
            SchClassId = classId;
            //设置年级
            Entity.GradeEntity cmodel = new BLL.GradeBLL().GetEntity(SchClassId);
            if (cmodel != null)
            {
                SchGradeId = cmodel.GgradeID;
                //设置学校ID
                Entity.SchoolGradeEntity scEntity = new BLL.SchoolGradeBLL().GetEntity(SchGradeId);
                SchID = scEntity.SchoolID;
            }

            if (!this.Page.IsPostBack)
            {
                this.user_repeater.DataSource = pds();
                this.user_repeater.DataBind();
            }
        }