public static string schsave(string dotype, string schid, string schname, string schaddr, string schmaster, string schmasterpst, string schmastertel, string iscity, string schstat, string selgrades, string selsubs, string areano, string schnote) { string ret = ""; if (Com.Session.userid == null) { ret = "expire"; } else { try { //学校名不能为空, if (string.IsNullOrEmpty(schname)) { ret += "学校名称不能为空!"; } if (!Com.Public.isVa(schid, "")) { ret += "无跨界权限;"; } if (ret == "") { SchSystem.BLL.SchInfo schbll = new SchSystem.BLL.SchInfo(); SchSystem.Model.SchInfo schmodel = new SchSystem.Model.SchInfo(); schmodel.LastRecTime = DateTime.Now; schmodel.LastRecUser = Com.Session.userid; schmodel.SchAddr = schaddr; schmodel.SchMaster = schmaster; schmodel.MasterPostion = schmasterpst; schmodel.SchName = schname; schmodel.SchTel = schmastertel; schmodel.IsCity = int.Parse(iscity); schmodel.Stat = int.Parse(schstat); schmodel.AreaNo = areano; schmodel.SchNote = schnote; if (dotype == "e") { schmodel.SchId = int.Parse(schid); schbll.UpdateSch(schmodel); } if (dotype == "a") { schmodel.RecTime = DateTime.Now; schmodel.RecUser = Com.Session.userid; schid = schbll.Add(schmodel).ToString(); } if (int.Parse(schid) > 0) { //添加年级及科目 SchSystem.BLL.SchGradeInfo gradebll = new SchSystem.BLL.SchGradeInfo(); gradebll.DoSchGrades(Com.Session.userid, schid, selgrades); //添加科目 SchSystem.BLL.SchSub subbll = new SchSystem.BLL.SchSub(); subbll.DoSchSubs(Com.Session.userid, schid, selsubs); } ret = "success"; } } catch (Exception ex) { ret = ex.Message; } } return(ret); }