public ActionResult OnSetKanyuanData(string kindergartenName, string name, string gender, string birth, string relateName, string relation, string phoneNumber, string address, string isYoueryuan, string desire, string joinLottery, string ruyuanDate, string isAppointment, string appointmentDate, string relateGender, string haveReceiver, string receiverName, string needSchoolBus, string sessionId) { StatusReport sr = new StatusReport(); //如果未指定幼儿园,返回错误信息 if (string.IsNullOrEmpty(kindergartenName)) { sr.status = "Fail"; sr.result = "未指定幼儿园"; return(Json(sr)); } //如果姓名或联系方式为空,返回错误信息 if (string.IsNullOrEmpty(name) || string.IsNullOrEmpty(phoneNumber)) { sr.status = "Fail"; sr.result = "姓名和联系电话不能为空"; return(Json(sr)); } if (string.IsNullOrEmpty(sessionId)) { sr.status = "Fail"; sr.result = "sessionId不存在"; sr.parameters = sessionId; return(Json(sr)); } SessionBag sessionBag = null; sessionBag = SessionContainer.GetSession(sessionId); if (sessionBag == null) { sr.status = "Fail"; sr.result = "session已失效"; return(Json(sr)); } string openId = sessionBag.OpenId; sr = WXUserDal.SetUserInfo(openId, relateName, phoneNumber, kindergartenName, name, relation); //如果提交的数据满足条件,调用KanyuanDataDal.SetKanyuanData方法,将数据存入数据库中 sr = KanyuanDataDal.SetKanyuanData(kindergartenName, name, gender, birth, relateName, relation, phoneNumber, address, isYoueryuan, desire, joinLottery, ruyuanDate, isAppointment, appointmentDate, relateGender, haveReceiver, receiverName, needSchoolBus, openId); return(Json(sr)); }
public ActionResult OnSetSignUpData(string kindergartenName, string name, string gender, string bagPhone, string birth, string address, string source, string guardianName, string relation, string guardianPhone, string guardianCredentialType, string guardianIdNumber, string occupation, string job, string guardianName2, string relation2, string guardianPhone2, string guardianCredentialType2, string guardianIDNumber2, string occupation2, string job2, string guardianName3, string relation3, string guardianPhone3, string guardianCredentialType3, string guardianIDNumber3, string occupation3, string job3, string guardianName4, string relation4, string guardianPhone4, string guardianCredentialType4, string guardianIDNumber4, string occupation4, string job4, string healthRemarks, string foodDragRemarks, string healthCareNote, string examination, string vaccineNote, string kidCredentialType, string kidIDNumber, string kidNation, string kidNationality, string gangaotai, string area, string areaDetail, string residenceNature, string nonagricultureType, string disabled, string disabledType, string leftChild, string onlyChild, string migrantWorkerChild, string orphan, string healthCondition, string bloodType, string teacherName, string patriarchName, string websiteName, string examDate, string kanyuanID, string sessionId, string shareNumber) { StatusReport sr = new StatusReport(); //如果未指定幼儿园,返回错误信息 if (string.IsNullOrEmpty(kindergartenName)) { sr.status = "Fail"; sr.result = "未指定幼儿园"; return(Json(sr)); } //如果姓名或联系方式为空,返回错误信息 if (string.IsNullOrEmpty(name) || string.IsNullOrEmpty(bagPhone)) { sr.status = "Fail"; sr.result = "姓名和书包电话不能为空"; return(Json(sr)); } if (string.IsNullOrEmpty(sessionId)) { sr.status = "Fail"; sr.result = "sessionId不存在"; sr.parameters = sessionId; return(Json(sr)); } SessionBag sessionBag = null; sessionBag = SessionContainer.GetSession(sessionId); if (sessionBag == null) { sr.status = "Fail"; sr.result = "session已失效"; return(Json(sr)); } string openid = sessionBag.OpenId; sr = WXUserDal.SetUserInfo(openid, guardianName, bagPhone, kindergartenName, name, relation); //如果数据满足条件,调用SignUpDal.SetSignUpData方法,将数据存入数据库中 sr = SignUpDal.SetSignUpData(kindergartenName, name, gender, bagPhone, birth, address, source, guardianName, relation, guardianPhone, guardianCredentialType, guardianIdNumber, occupation, job, guardianName2, relation2, guardianPhone2, guardianCredentialType2, guardianIDNumber2, occupation2, job2, guardianName3, relation3, guardianPhone3, guardianCredentialType3, guardianIDNumber3, occupation3, job3, guardianName4, relation4, guardianPhone4, guardianCredentialType4, guardianIDNumber4, occupation4, job4, healthRemarks, foodDragRemarks, healthCareNote, examination, vaccineNote, kidCredentialType, kidIDNumber, kidNation, kidNationality, gangaotai, area, areaDetail, residenceNature, nonagricultureType, disabled, disabledType, leftChild, onlyChild, migrantWorkerChild, orphan, healthCondition, bloodType, teacherName, patriarchName, websiteName, examDate, kanyuanID, openid, shareNumber); //if (sr.status == "Success") //{ // string data = sr.data.ToString(); // StatusReport report = new StatusReport(); // report = KanyuanDataDal.GetPayInfo(name, bagPhone,kindergartenName); // if (report.status == "Success") // { // string totalFee = report.data.ToString(); // report.data = new { totalFee = totalFee, signUpId = data.ToString() }; // return Json(report); // } //} return(Json(sr)); }