private string Save() { if (Request.QueryString["optype"].Equals("add")) { model.FUNCTIONID = Guid.NewGuid().ToString(); ds.RetrieveObject(model); model.PARENTID = Request.QueryString["id"]; GetValue(model); var inserttrcn = ImplementFactory.GetInsertTransaction <Ua_function>("Ua_functionInsertTransaction", user.User_Name); inserttrcn.EntityList.Add(model); if (inserttrcn.Commit()) { return("保存成功"); } return("保存失败"); } else { model.FUNCTIONID = Request.QueryString["id"]; ds.RetrieveObject(model); GetValue(model); var updatetrcn = ImplementFactory.GetUpdateTransaction <Ua_function>("Ua_functionUpdateTransaction", user.User_Name); if (updatetrcn.Commit(model)) { return("保存成功"); } return("保存失败"); } }
/// <summary> ///保存方法 /// </summary> /// <returns></returns> private string SaveData() { bool result = false; Peer_coun_head head = new Peer_coun_head(); if (string.IsNullOrEmpty(Post("hidOid")))//新增 { head.OID = Guid.NewGuid().ToString(); head.SEQ_NO = GetSeq_no(); GetPageValue(head); var inserttrcn = ImplementFactory.GetInsertTransaction <Peer_coun_head>("Peer_coun_headInsertTransaction"); inserttrcn.EntityList.Add(head); result = inserttrcn.Commit(); } else//修改 { head.OID = Post("hidOid"); ds.RetrieveObject(head); GetPageValue(head); var updatetrcn = ImplementFactory.GetUpdateTransaction <Peer_coun_head>("Peer_coun_headUpdateTransaction", user.User_Name); result = updatetrcn.Commit(head); } if (result) { //成功之后保存表体 SaveDataList(head.SEQ_NO, head.PEER_SEQ_NO); return(head.OID); } else { return(string.Empty); } }
/// <summary> /// 保存数据 /// </summary> /// <returns></returns> private string SaveData() { string oid = Post("hidOid_Content"); bool res = false; Peer_project_list notboth = new Peer_project_list(); if (string.IsNullOrEmpty(oid)) { oid = notboth.OID = Guid.NewGuid().ToString(); ds.RetrieveObject(notboth); notboth.SEQ_NO = Post("hidSeqNo_Content"); notboth.SEQUEUE = cod.ChangeInt(Post("SEQUEUE")); notboth.PEER_CONTENT = Post("PEER_CONTENT"); var inserttrcn = ImplementFactory.GetInsertTransaction <Peer_project_list>("Peer_project_listInsertTransaction"); inserttrcn.EntityList.Add(notboth); res = inserttrcn.Commit(); } else { notboth.OID = oid; ds.RetrieveObject(notboth); notboth.SEQUEUE = cod.ChangeInt(Post("SEQUEUE")); notboth.PEER_CONTENT = Post("PEER_CONTENT"); var updatetrcn = ImplementFactory.GetUpdateTransaction <Peer_project_list>("Peer_project_listUpdateTransaction", user.User_Name); res = updatetrcn.Commit(notboth); } if (res) { return(oid); } else { return(string.Empty); } }
private bool CreateNewData() { head.NUMBER = stu.NUMBER; head.NAME = stu.NAME; head.SEX = stu.SEX; head.BIRTH_DATE = stu.GARDE; head.NATION = stu.NATION; head.IDCARDNO = stu.IDCARDNO; head.POLISTATUS = stu.POLISTATUS; head.COLLEGE = stu.COLLEGE; head.MAJOR = stu.MAJOR; head.CLASS = stu.CLASS; head.GRADE = stu.EDULENTH; head.TELEPHONE = stu.MOBILENUM; head.HOME_ADDRESS = stu.ADDRESS; head.HOME_PHONE = stu.HOMENUM; head.SCHYEAR = sch_info.CURRENT_YEAR; head.OID = Guid.NewGuid().ToString(); head.SEQ_NO = GetSeq_no(); head.DOC_TYPE = this.Doc_type; head.RET_CHANNEL = Ret_Channel_A0000; head.DECLARE_TYPE = WKF_VLAUES.DECLARE_TYPE_D; head.OP_TIME = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); head.OP_CODE = user.User_Id; head.OP_NAME = user.User_Name; head.ANNUAL_INCOME = GetIncome(head.NUMBER, "year"); head.MONTHLY_INCOME = GetIncome(head.NUMBER, "month"); var inserttrcn = ImplementFactory.GetInsertTransaction <Dst_stu_apply>("Dst_stu_applyInsertTransaction"); inserttrcn.EntityList.Add(head); return(inserttrcn.Commit()); }
/// <summary> /// 提交操作 /// </summary> /// <returns></returns> private string SaveData() { try { if (string.IsNullOrEmpty(Post("hidOid"))) { head.OID = Guid.NewGuid().ToString(); head.SEQ_NO = GetSeq_no(); GetValue(head); head.DOC_TYPE = this.Doc_type; head.DECL_NUMBER = user.User_Id; head.DECL_TIME = GetDateLongFormater(); var inserttrcn = ImplementFactory.GetInsertTransaction <Ua_class_group>("Ua_class_groupInsertTransaction"); inserttrcn.EntityList.Add(head); if (!inserttrcn.Commit()) { return("提交失败!"); } } else { head.OID = Post("hidOid"); ds.RetrieveObject(head); GetValue(head); head.DECL_NUMBER = user.User_Id; head.DECL_TIME = GetDateLongFormater(); var updatetrcn = ImplementFactory.GetUpdateTransaction <Ua_class_group>("Ua_class_groupUpdateTransaction", user.User_Name); if (!updatetrcn.Commit(head)) { return("提交失败!"); } } //提交编班申请 string strOpNotes = string.Format("提交编班申请操作"); string strMsg = string.Empty; if (!WKF_ExternalInterface.getInstance().WKF_BusDeclare(head.DOC_TYPE, head.SEQ_NO, user.User_Name, user.User_Role, strOpNotes, out strMsg)) { //20171017 ZZ 新增:由于编班没有暂存功能,所以编班提交失败或者没有权限提交,需要删除生成的数据。 string strDelSql = string.Format("DELETE FROM UA_CLASS_GROUP WHERE SEQ_NO = '{0}' ", head.SEQ_NO); ds.ExecuteTxtNonQuery(strDelSql); return(string.Format("编班提交失败,原因:{0}", strMsg)); } return(string.Empty); } catch (Exception ex) { //20171017 ZZ 新增:由于编班没有暂存功能,所以编班提交失败或者没有权限提交,需要删除生成的数据。 string strDelSql = string.Format("DELETE FROM UA_CLASS_GROUP WHERE SEQ_NO = '{0}' ", head.SEQ_NO); ds.ExecuteTxtNonQuery(strDelSql); LogDBHandleClass.getInstance().LogException(CValue.LOG_LEVEL_ERROR, "编班提交失败,原因:" + ex.ToString()); return("提交失败!"); } }
private string CreateNewData() { string strNumber = Get("number"); Basic_stu_info stu = new Basic_stu_info(); head = FamilySurveyHandleClass.getInstance().GetDst_family_situa(new Dictionary <string, string> { { "NUMBER", strNumber } }); if (head == null) { head = new Dst_family_situa(); object o = ds.ExecuteTxtScalar(string.Format("SELECT OID FROM Basic_stu_info WHERE NUMBER = '{0}'", strNumber)); if (o != null && o.ToString().Trim().Length > 0) { string OID = Guid.NewGuid().ToString(); stu.OID = o.ToString(); ds.RetrieveObject(stu); head.NUMBER = stu.NUMBER; head.NAME = stu.NAME; head.SEX = stu.SEX; head.BIRTH_DATE = stu.GARDE; head.NATION = stu.NATION; head.IDCARDNO = stu.IDCARDNO; head.POLISTATUS = stu.POLISTATUS; head.COLLEGE = stu.COLLEGE; head.MAJOR = stu.MAJOR; head.CLASS = stu.CLASS; head.GRADE = stu.EDULENTH; head.NATIVEPLACE = stu.NATIVEPLACE; head.OID = OID; head.SEQ_NO = GetSeq_no(); head.DOC_TYPE = this.Doc_type; head.RET_CHANNEL = Ret_Channel_A0000; head.SCHYEAR = sch_info.CURRENT_YEAR; head.OP_TIME = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); head.OP_CODE = user.User_Id; head.OP_NAME = user.User_Name; head.ADDRESS = stu.ADDRESS; head.POSTCODE = stu.POSTCODE; head.TELEPHONE = stu.HOMENUM; var inserttrcn = ImplementFactory.GetInsertTransaction <Dst_family_situa>("Dst_family_situaInsertTransaction"); inserttrcn.EntityList.Add(head); inserttrcn.Commit(); } else { return("获取学生基本信息失败!"); } } return(GetApplyData(head.OID)); }
/// <summary> /// 保存附件 /// </summary> /// <param name="strFileName"></param> /// <param name="strFileDirectory"></param> /// <returns></returns> protected bool SaveFile(string strFileName, string strFileDirectory) { try { bool res = false; Insur_apply_check_file head = new Insur_apply_check_file(); if (string.IsNullOrEmpty(hidOid_File.Value)) { head.OID = Guid.NewGuid().ToString(); ds.RetrieveObject(head); head.SEQ_NO = hidRelationSeqNo_File.Value; head.FILE_TYPE = hidFile_FILE_TYPE.Value; head.FILE_NAME = hidFile_FILE_NAME.Value; head.FILE_SAVE_NAME = strFileName; strFileDirectory = strFileDirectory.Replace(@"\", @"/");//将字符串中所有反斜杠\替换成正斜杠/ head.FILE_DIRECTORY = strFileDirectory; var inserttrcn = ImplementFactory.GetInsertTransaction <Insur_apply_check_file>("Insur_apply_check_fileInsertTransaction"); inserttrcn.EntityList.Add(head); res = inserttrcn.Commit(); } else { head.OID = hidOid_File.Value; ds.RetrieveObject(head); head.FILE_TYPE = hidFile_FILE_TYPE.Value; head.FILE_NAME = hidFile_FILE_NAME.Value; head.FILE_SAVE_NAME = strFileName; strFileDirectory = strFileDirectory.Replace(@"\", @"/");//将字符串中所有反斜杠\替换成正斜杠/ head.FILE_DIRECTORY = strFileDirectory; var updatetrcn = ImplementFactory.GetUpdateTransaction <Insur_apply_check_file>("Insur_apply_check_fileUpdateTransaction", user.User_Name); res = updatetrcn.Commit(head); } if (res) { //保存核对表头的参保人员类型 Insur_apply_check check = InsurHandleClass.getInstance().GetApplyCheckInfo(head.SEQ_NO); if (check != null) { ds.RetrieveObject(check); check.APPLY_TYPE = hidFile_FILE_TYPE.Value; ds.UpdateObject(check); } } return(res); } catch (Exception ex) { LogDBHandleClass.getInstance().LogException(CValue.LOG_LEVEL_ERROR, "公告附件上传失败:" + ex.ToString()); return(false); } }
protected bool SavePhoto(string seq_no, string strPhotoName, string strArchiveDirectory) { photo.OID = Guid.NewGuid().ToString(); photo.SEQ_NO = seq_no; photo.PHOTO_NAME = strPhotoName; photo.ARCHIVE_DIRECTORY = strArchiveDirectory; photo.NOTE = Post("NOTE"); photo.SHOW_NAME = Post("PName"); var inserttrcn = ImplementFactory.GetInsertTransaction <Dst_family_photo>("Dst_family_photoInsertTransaction", user.User_Name); inserttrcn.EntityList.Add(photo); return(inserttrcn.Commit()); }
protected bool SavePhoto(string strPhotoName, string strCompressName, string strArchiveDirectory) { DeletePhotoData(user.User_Id); photo = new Ua_user_photo(); photo.USER_ID = user.User_Id; photo.PHOTO_NAME = strPhotoName; photo.COMPRESS_NAME = strCompressName; photo.ARCHIVE_DIRECTORY = strArchiveDirectory; var inserttrcn = ImplementFactory.GetInsertTransaction <Ua_user_photo>("Ua_user_photoInsertTransaction", user.User_Name); inserttrcn.EntityList.Add(photo); return(inserttrcn.Commit()); }
/// <summary> ///保存方法 /// </summary> /// <returns></returns> private string SaveData() { bool result = false; Shoolar_project_head head = new Shoolar_project_head(); if (string.IsNullOrEmpty(Post("hidOid")))//新增 { head.OID = Guid.NewGuid().ToString(); head.SEQ_NO = GetSeq_no(); GetPageValue(head); var inserttrcn = ImplementFactory.GetInsertTransaction <Shoolar_project_head>("Shoolar_project_headInsertTransaction"); inserttrcn.EntityList.Add(head); result = inserttrcn.Commit(); } else//修改 { head.OID = Post("hidOid"); ds.RetrieveObject(head); GetPageValue(head); var updatetrcn = ImplementFactory.GetUpdateTransaction <Shoolar_project_head>("Shoolar_project_headUpdateTransaction", user.User_Name); result = updatetrcn.Commit(head); if (result) { ProjectSettingHandleClass.getInstance().UpdateRelationFunction(head.SEQ_NO); } } if (result) { if (head.PROJECT_CLASS.Equals("LIFE")) { if (string.IsNullOrEmpty(Post("hidOid")))//新增 { InsertIntoLifeApplyData(head, Post("hidStudentType")); } else { UpdateLifeApplyData(head); } } return(head.SEQ_NO);//保存成功 返回单据编号 } else { return(string.Empty); } }
/// <summary> /// 保存数据 /// </summary> /// <returns></returns> private string SaveData() { try { bool res = false; Shoolar_apply_reward head = new Shoolar_apply_reward(); if (string.IsNullOrEmpty(Post("hidOid_Reward"))) { head.OID = Guid.NewGuid().ToString(); ds.RetrieveObject(head); head.SEQ_NO = Post("hidSeqNo_Reward"); head.REWARD_NAME = Post("REWARD_NAME"); head.REWARD_DATE = Post("REWARD_DATE"); //head.REWARD_LEVEL = Post("REWARD_LEVEL"); head.AWARD_DEPARTMENT = Post("AWARD_DEPARTMENT"); head.REWARD_TYPE = Post("REWARD_TYPE"); var inserttrcn = ImplementFactory.GetInsertTransaction <Shoolar_apply_reward>("Shoolar_apply_rewardInsertTransaction"); inserttrcn.EntityList.Add(head); res = inserttrcn.Commit(); } else { head.OID = Post("hidOid_Reward"); ds.RetrieveObject(head); head.REWARD_NAME = Post("REWARD_NAME"); head.REWARD_DATE = Post("REWARD_DATE"); //head.REWARD_LEVEL = Post("REWARD_LEVEL"); head.AWARD_DEPARTMENT = Post("AWARD_DEPARTMENT"); head.REWARD_TYPE = Post("REWARD_TYPE"); var updatetrcn = ImplementFactory.GetUpdateTransaction <Shoolar_apply_reward>("Shoolar_apply_rewardUpdateTransaction", user.User_Name); res = updatetrcn.Commit(head); } if (res) { return(head.OID);//成功返回主键 } else { return(string.Empty); } } catch (Exception ex) { LogDBHandleClass.getInstance().LogException(CValue.LOG_LEVEL_ERROR, "奖助申请,保存获奖情况数据失败:" + ex.ToString()); return(string.Empty); } }
/// <summary> /// 保存数据 /// </summary> /// <returns></returns> private string SaveData() { try { bool res = false; Shoolar_apply_family_list list = new Shoolar_apply_family_list(); if (string.IsNullOrEmpty(Post("hidOid_FamilyMember"))) { list.OID = Guid.NewGuid().ToString(); ds.RetrieveObject(list); list.SEQ_NO = Post("hidSeqNo_FamilyMember"); list.MEMBER_NAME = Post("MEMBER_NAME"); list.MEMBER_AGE = cod.ChangeInt(Post("MEMBER_AGE")); list.MEMBER_RELATION = Post("MEMBER_RELATION"); list.MEMBER_UNIT = Post("MEMBER_UNIT"); var inserttrcn = ImplementFactory.GetInsertTransaction <Shoolar_apply_family_list>("Shoolar_apply_family_listInsertTransaction"); inserttrcn.EntityList.Add(list); res = inserttrcn.Commit(); } else { list.OID = Post("hidOid_FamilyMember"); ds.RetrieveObject(list); list.MEMBER_NAME = Post("MEMBER_NAME"); list.MEMBER_AGE = cod.ChangeInt(Post("MEMBER_AGE")); list.MEMBER_RELATION = Post("MEMBER_RELATION"); list.MEMBER_UNIT = Post("MEMBER_UNIT"); var updatetrcn = ImplementFactory.GetUpdateTransaction <Shoolar_apply_family_list>("Shoolar_apply_family_listUpdateTransaction", user.User_Name); res = updatetrcn.Commit(list); } if (res) { return(list.OID);//成功返回主键 } else { return(string.Empty); } } catch (Exception ex) { LogDBHandleClass.getInstance().LogException(CValue.LOG_LEVEL_ERROR, "奖助申请,保存家庭成员数据失败:" + ex.ToString()); return(string.Empty); } }
/// <summary> ///保存方法 /// </summary> /// <returns></returns> private string SaveData() { bool result = false; Peer_project_head head = new Peer_project_head(); if (string.IsNullOrEmpty(Post("hidOid")))//新增 { head.OID = Guid.NewGuid().ToString(); head.SEQ_NO = GetSeq_no(); GetPageValue(head); var inserttrcn = ImplementFactory.GetInsertTransaction <Peer_project_head>("Peer_project_headInsertTransaction"); inserttrcn.EntityList.Add(head); result = inserttrcn.Commit(); } else//修改 { head.OID = Post("hidOid"); ds.RetrieveObject(head); GetPageValue(head); var updatetrcn = ImplementFactory.GetUpdateTransaction <Peer_project_head>("Peer_project_headUpdateTransaction", user.User_Name); result = updatetrcn.Commit(head); if (result) { ProjectSettingHandleClass.getInstance().UpdateRelationFunction(head.SEQ_NO); } } if (result) { StringBuilder json = new StringBuilder();//用来存放Json的 json.Append("{"); json.Append(Json.StringToJson(head.OID, "OID")); json.Append(","); json.Append(Json.StringToJson(head.SEQ_NO, "SEQ_NO")); json.Append("}"); return(json.ToString()); } else { return(string.Empty); } }
private bool InsertWorkRule1(string input_time, string doc_type, string audit_level, string declare_type, string step_no, string post_code, string audit_result) { Wkf_rule_queue rule = new Wkf_rule_queue(); rule.OID = Guid.NewGuid().ToString(); ds.RetrieveObject(rule); rule.CREATE_USER = user.User_Id; rule.CREATE_TIME = input_time; rule.DOC_TYPE = doc_type; rule.AUDIT_LEVEL = audit_level; rule.DECLARE_TYPE = declare_type; rule.STEP_NO = step_no; rule.POST_CODE = post_code; if (audit_result.Equals("P")) { if (step_no.Equals(CValue.STEP_D1)) { rule.NEXT_POST_CODE = Post("NEXT_POST_CODE1");//一级审核角色 rule.NEXT_STEP_NO = CValue.STEP_D2; } else if (step_no.Equals(CValue.STEP_D2)) { rule.NEXT_POST_CODE = Post("NEXT_POST_CODE2");//二级级审核角色 rule.NEXT_STEP_NO = CValue.STEP_D3; } else if (step_no.Equals(CValue.STEP_D3)) { rule.NEXT_POST_CODE = Post("NEXT_POST_CODE3");//三级审核角色 rule.NEXT_STEP_NO = CValue.STEP_D4; } rule.RET_CHANNEL = string.Format("D{0}010", post_code); rule.NEXT_RET_CHANNEL = rule.NEXT_STEP_NO + "000"; } else { } var inserttrcn = ImplementFactory.GetInsertTransaction<Wkf_rule_queue>("Wkf_rule_queueInsertTransaction"); inserttrcn.EntityList.Add(rule); return inserttrcn.Commit(); }
private bool SaveData(string type) { object o = ds.ExecuteTxtScalar(string.Format("SELECT OID FROM BASIC_STU_INFO_MODI WHERE NUMBER = '{0}'", user.User_Id)); if (o != null && o.ToString().Length > 0) { modi.OID = o.ToString(); ds.RetrieveObject(modi); GetValue(modi); modi.OP_TIME = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); modi.OP_CODE = user.User_Id; modi.OP_NAME = user.User_Name; modi.RET_CHANNEL = CValue.RET_CHANNEL_A0000; var updatetrcn = ImplementFactory.GetUpdateTransaction <Basic_stu_info_modi>("Basic_stu_info_modiUpdateTransaction", user.User_Name); if (updatetrcn.Commit(modi)) { return(true); } } else { modi.OID = Guid.NewGuid().ToString(); GetValue(modi); modi.SEQ_NO = GetSeq_no(); modi.DOC_TYPE = this.Doc_type; modi.NUMBER = user.User_Id; modi.OP_TIME = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); modi.OP_CODE = user.User_Id; modi.OP_NAME = user.User_Name; modi.RET_CHANNEL = CValue.RET_CHANNEL_A0000; var inserttrcn = ImplementFactory.GetInsertTransaction <Basic_stu_info_modi>("Basic_stu_info_modiInsertTransaction"); inserttrcn.EntityList.Add(modi); if (inserttrcn.Commit()) { return(true); } } return(false); }
/// <summary> ///保存数据 /// </summary> /// <returns></returns> private string SaveData() { try { //先删除数据再新增 string strSQL = string.Format("DELETE FROM SHOOLAR_APPLY_TXT WHERE SEQ_NO = '{0}' ", Get("seq_no")); if (ds.ExecuteTxtNonQuery(strSQL) < 0) { return("保存大文本数据失败!"); } var inserttrcn = ImplementFactory.GetInsertTransaction <Shoolar_apply_txt>("Shoolar_apply_txtInsertTransaction"); Shoolar_apply_txt head = new Shoolar_apply_txt(); head.OID = Guid.NewGuid().ToString(); head.SEQ_NO = Get("seq_no"); inserttrcn.EntityList.Add(head); if (!inserttrcn.Commit()) { return("保存大文本数据失败!"); } //重新保存界面的文本数据 StringBuilder strTxt = new StringBuilder(); strTxt.AppendFormat("APPLY_REASON = '{0}', ", Post("APPLY_REASON")); //申请理由 strTxt.AppendFormat("SKILL_INFO = '{0}', ", Post("SKILL_INFO")); //英语、计算机过级情况 strTxt.AppendFormat("PUBLISH_INFO = '{0}', ", Post("PUBLISH_INFO")); //论文发表、获得专利等情况 strTxt.AppendFormat("MOTTO = '{0}', ", Post("MOTTO")); //人生格言 strTxt.AppendFormat("TEACHER_INFO = '{0}', ", Post("TEACHER_INFO")); //师长点评 strTxt.AppendFormat("MODEL_INFO = '{0}' ", Post("MODEL_INFO")); //事迹正文 if (!ComHandleClass.getInstance().UpdateTextContent(Get("seq_no"), "SEQ_NO", strTxt.ToString(), "SHOOLAR_APPLY_TXT")) { return("保存大文本数据失败!"); } return(string.Empty); } catch (Exception ex) { LogDBHandleClass.getInstance().LogException(CValue.LOG_LEVEL_ERROR, "奖助申请,保存大文本数据失败:" + ex.ToString()); return(string.Empty); } }
/// <summary> /// 保存数据 /// </summary> /// <returns></returns> private string SaveData() { string oid = Post("hidOid_Notboth"); bool res = false; Shoolar_project_notboth notboth = new Shoolar_project_notboth(); if (string.IsNullOrEmpty(oid)) { oid = notboth.OID = Guid.NewGuid().ToString(); ds.RetrieveObject(notboth); notboth.SEQ_NO = Post("hidSeqNo_Notboth"); notboth.PROJECT_YEAR = Post("PROJECT_YEAR_NOTBOTH"); notboth.PROJECT_CLASS = Post("PROJECT_CLASS_NOTBOTH"); notboth.PROJECT_TYPE = Post("PROJECT_TYPE_NOTBOTH"); notboth.PROJECT_SEQ_NO = Post("PROJECT_SEQ_NO"); notboth.PROJECT_NAME = Post("hidProName_Notboth"); var inserttrcn = ImplementFactory.GetInsertTransaction <Shoolar_project_notboth>("Shoolar_project_notbothInsertTransaction"); inserttrcn.EntityList.Add(notboth); res = inserttrcn.Commit(); } else { notboth.OID = oid; ds.RetrieveObject(notboth); notboth.PROJECT_YEAR = Post("PROJECT_YEAR_NOTBOTH"); notboth.PROJECT_CLASS = Post("PROJECT_CLASS_NOTBOTH"); notboth.PROJECT_TYPE = Post("PROJECT_TYPE_NOTBOTH"); notboth.PROJECT_SEQ_NO = Post("PROJECT_SEQ_NO"); notboth.PROJECT_NAME = Post("hidProName_Notboth"); var updatetrcn = ImplementFactory.GetUpdateTransaction <Shoolar_project_notboth>("Shoolar_project_notbothUpdateTransaction", user.User_Name); res = updatetrcn.Commit(notboth); } if (res) { return(oid); } else { return(string.Empty); } }
/// <summary> /// 保存数据 /// </summary> /// <returns></returns> private string SaveData() { try { bool res = false; Shoolar_apply_study_list list = new Shoolar_apply_study_list(); if (string.IsNullOrEmpty(Post("hidOid_StudyList"))) { list.OID = Guid.NewGuid().ToString(); ds.RetrieveObject(list); list.SEQ_NO = Post("hidSeqNo_StudyList"); list.COURSE_NAME = Post("COURSE_NAME"); list.SCORE = Math.Round(cod.ChangeDecimal(Post("SCORE")), 1); var inserttrcn = ImplementFactory.GetInsertTransaction <Shoolar_apply_study_list>("Shoolar_apply_study_listInsertTransaction"); inserttrcn.EntityList.Add(list); res = inserttrcn.Commit(); } else { list.OID = Post("hidOid_StudyList"); ds.RetrieveObject(list); list.COURSE_NAME = Post("COURSE_NAME"); list.SCORE = Math.Round(cod.ChangeDecimal(Post("SCORE")), 1); var updatetrcn = ImplementFactory.GetUpdateTransaction <Shoolar_apply_study_list>("Shoolar_apply_study_listUpdateTransaction", user.User_Name); res = updatetrcn.Commit(list); } if (res) { return(list.OID);//成功返回主键 } else { return(string.Empty); } } catch (Exception ex) { LogDBHandleClass.getInstance().LogException(CValue.LOG_LEVEL_ERROR, "奖助申请,保存学习科目数据失败:" + ex.ToString()); return(string.Empty); } }
/// <summary> /// 保存附件 /// </summary> /// <param name="strFileName"></param> /// <param name="strFileDirectory"></param> /// <returns></returns> protected bool SaveFile(string strFileName, string strFileDirectory) { try { bool res = false; Shoolar_apply_file head = new Shoolar_apply_file(); if (string.IsNullOrEmpty(hidOid_File.Value)) { head.OID = Guid.NewGuid().ToString(); ds.RetrieveObject(head); head.SEQ_NO = hidSeqNo_File.Value; head.FILE_TYPE = hidFile_FILE_TYPE.Value; head.FILE_NAME = hidFile_FILE_NAME.Value; head.FILE_SAVE_NAME = strFileName; strFileDirectory = strFileDirectory.Replace(@"\", @"/");//将字符串中所有反斜杠\替换成正斜杠/ head.FILE_DIRECTORY = strFileDirectory; var inserttrcn = ImplementFactory.GetInsertTransaction <Shoolar_apply_file>("Shoolar_apply_fileInsertTransaction"); inserttrcn.EntityList.Add(head); res = inserttrcn.Commit(); } else { head.OID = hidOid_File.Value; ds.RetrieveObject(head); head.FILE_TYPE = hidFile_FILE_TYPE.Value; head.FILE_NAME = hidFile_FILE_NAME.Value; head.FILE_SAVE_NAME = strFileName; strFileDirectory = strFileDirectory.Replace(@"\", @"/");//将字符串中所有反斜杠\替换成正斜杠/ head.FILE_DIRECTORY = strFileDirectory; var updatetrcn = ImplementFactory.GetUpdateTransaction <Shoolar_apply_file>("Shoolar_apply_fileUpdateTransaction", user.User_Name); res = updatetrcn.Commit(head); } return(res); } catch (Exception ex) { LogDBHandleClass.getInstance().LogException(CValue.LOG_LEVEL_ERROR, "奖助申请附件上传失败:" + ex.ToString()); return(false); } }
/// <summary> /// 保存/提交事件 /// </summary> /// <returns></returns> private string Save() { try { bool bFlag = false; Messge_info head = new Messge_info(); if (string.IsNullOrEmpty(Post("OID"))) //新增 { head.OID = Guid.NewGuid().ToString(); ds.RetrieveObject(head); GetFormValue(head); var inserttrcn = ImplementFactory.GetInsertTransaction <Messge_info>("Messge_infoInsertTransaction", user.User_Name); inserttrcn.EntityList.Add(head); bFlag = inserttrcn.Commit(); } else //修改 { head.OID = Post("OID"); ds.RetrieveObject(head); GetFormValue(head); var updatetrcn = ImplementFactory.GetUpdateTransaction <Messge_info>("Messge_infoUpdateTransaction", user.User_Name); bFlag = updatetrcn.Commit(head); } if (bFlag) { //插入接收人表 MessgeHandleClass.getInstance().InsertMessgeAccpter(head.OID, GetAccpter()); return(string.Empty); } return("信息发送失败!"); } catch (Exception ex) { LogDBHandleClass.getInstance().LogException(CValue.LOG_LEVEL_WARN, "信息发送失败:" + ex.ToString()); return("信息发送失败!"); } }
private string SavePermission() { try { //删除 string delStr = string.Format("DELETE FROM UA_ROLE_FUNC WHERE ROLEID='{0}'", Request.QueryString["roleid"]); ds.ExecuteTxtNonQuery(delStr); var insertTran = ImplementFactory.GetInsertTransaction <Ua_role_func>("Ua_role_funcInsertTransaction", Request.QueryString["roleid"]); string[] ids = Post("ids").Split(','); if (ids.Length > 0 && !(ids.Length == 1 && ids[0].Length == 0)) { foreach (string id in ids) { if (insertTran.EntityList.FindAll(p => p.ROLEID.Equals(Request.QueryString["roleid"]) && p.FUNCTIONID.Equals(id)).Count <= 0) { //判断是否已存在 insertTran.EntityList.Add(new Ua_role_func() { ROLEID = Request.QueryString["roleid"], FUNCTIONID = id }); } } } if (insertTran.Commit()) { return(""); } else { return("保存失败!"); } } catch (Exception ex) { return("系统错误!原因:" + ex.Message); } }
/// <summary> ///保存数据 /// </summary> /// <returns></returns> private string SaveData() { try { bool result = false; Question_info head = new Question_info(); if (string.IsNullOrEmpty(Post("hidOid")))//新增 { head.OID = Guid.NewGuid().ToString(); GetPageValue(head); var inserttrcn = ImplementFactory.GetInsertTransaction <Question_info>("Question_infoInsertTransaction"); inserttrcn.EntityList.Add(head); result = inserttrcn.Commit(); } else//修改 { head.OID = Post("hidOid"); ds.RetrieveObject(head); GetPageValue(head); var updatetrcn = ImplementFactory.GetUpdateTransaction <Question_info>("Question_infoUpdateTransaction", user.User_Name); result = updatetrcn.Commit(head); } if (result) { return("提交成功!"); } else { return(string.Empty); } } catch (Exception ex) { LogDBHandleClass.getInstance().LogException(CValue.LOG_LEVEL_ERROR, "提交问题反馈,出错:" + ex.ToString()); return(string.Empty); } }
/// <summary> /// 保存表体数据 /// </summary> /// <returns></returns> private void SaveDataList(string SeqNo, string PeerSeqNo) { //先删除 ds.ExecuteTxtNonQuery(string.Format("DELETE FROM PEER_COUN_LIST WHERE SEQ_NO = '{0}' ", SeqNo)); //再保存 Dictionary <string, string> param = new Dictionary <string, string>(); param.Add("SEQ_NO", PeerSeqNo); List <Peer_project_list> list = PeerInfoHandleClass.getInstance().GetPeerContentList(param); var inserttrcn = ImplementFactory.GetInsertTransaction <Peer_coun_list>("Peer_coun_listInsertTransaction"); decimal decTotalScore = 0; foreach (Peer_project_list temp in list) { if (temp == null) { continue; } Peer_coun_list notboth = new Peer_coun_list(); notboth.OID = Guid.NewGuid().ToString(); ds.RetrieveObject(notboth); notboth.SEQ_NO = SeqNo; notboth.CONTENT_ID = temp.OID; notboth.CONTENT_SCORE = Math.Round(cod.ChangeDecimal(Post(temp.OID)), 1); decTotalScore += notboth.CONTENT_SCORE; inserttrcn.EntityList.Add(notboth); } bool res = inserttrcn.Commit(); if (res) { decimal decPerScore = decTotalScore / list.Count; string strResult = PeerCounHandleClass.getInstance().GetPeerResult(decPerScore); //更新表头字段 ds.ExecuteTxtNonQuery(string.Format("UPDATE PEER_COUN_HEAD SET PEER_SCORE = '{0}' ,PEER_RESULT= '{1}' WHERE SEQ_NO = '{2}' ", decPerScore, strResult, SeqNo)); } }
/// <summary> ///保存数据 /// </summary> /// <returns></returns> private string SaveData() { try { //先删除数据再新增 string strSQL = string.Format("DELETE FROM SHOOLAR_APPLY_STUDY WHERE SEQ_NO = '{0}' ", Get("seq_no")); if (ds.ExecuteTxtNonQuery(strSQL) < 0) { return("保存上学年度综合考评成绩失败!"); } var inserttrcn = ImplementFactory.GetInsertTransaction <Shoolar_apply_study>("Shoolar_apply_studyInsertTransaction"); Shoolar_apply_study head = new Shoolar_apply_study(); head.OID = Guid.NewGuid().ToString(); head.SEQ_NO = Get("seq_no"); head.SCORE_RANK = cod.ChangeInt(Post("SCORE_RANK")); head.SCORE_TOTAL_NUM = cod.ChangeInt(Post("SCORE_TOTAL_NUM")); head.MUST_COURSE_NUM = cod.ChangeInt(Post("MUST_COURSE_NUM")); head.PASS_COURSE_NUM = cod.ChangeInt(Post("PASS_COURSE_NUM")); head.COM_SCORE_RANK = cod.ChangeInt(Post("COM_SCORE_RANK")); head.COM_SCORE_TOTAL_NUM = cod.ChangeInt(Post("COM_SCORE_TOTAL_NUM")); head.COM_SCORE = cod.ChangeDecimal(Post("COM_SCORE")); head.IS_SCORE_FLAG = Post("IS_SCORE_FLAG"); head.PREYEAR_SCORE = Math.Round(cod.ChangeDecimal(Post("PREYEAR_SCORE")), 1); inserttrcn.EntityList.Add(head); if (!inserttrcn.Commit()) { return("保存上学年度综合考评成绩失败!"); } return(string.Empty); } catch (Exception ex) { LogDBHandleClass.getInstance().LogException(CValue.LOG_LEVEL_ERROR, "奖助申请,保存学年度综合考评成绩失败:" + ex.ToString()); return(string.Empty); } }
/// <summary> ///保存数据 /// </summary> /// <returns></returns> private string SaveData() { try { //先删除数据再新增 string strSQL = string.Format("DELETE FROM SHOOLAR_APPLY_FAMILY WHERE SEQ_NO = '{0}' ", Get("seq_no")); if (ds.ExecuteTxtNonQuery(strSQL) < 0) { return("保存家庭基本情况失败!"); } var inserttrcn = ImplementFactory.GetInsertTransaction <Shoolar_apply_family>("Shoolar_apply_familyInsertTransaction"); Shoolar_apply_family head = new Shoolar_apply_family(); head.OID = Guid.NewGuid().ToString(); head.SEQ_NO = Get("seq_no"); head.HK = Post("HK"); head.INCOME_SOURCE = Post("INCOME_SOURCE"); head.TOTAL_INCOME = Math.Round(cod.ChangeDecimal(Post("TOTAL_INCOME")), 1); head.PREMONTH_INCOME = Math.Round(cod.ChangeDecimal(Post("PREMONTH_INCOME")), 1); head.FAMILY_NUM = cod.ChangeInt(Post("FAMILY_NUM")); head.POSTCODE = Post("POSTCODE"); head.ADDRESS = Post("ADDRESS"); head.COGRIZA_INFO = Post("COGRIZA_INFO"); head.IS_JDLK = Post("IS_JDLK"); inserttrcn.EntityList.Add(head); if (!inserttrcn.Commit()) { return("保存家庭基本情况失败!"); } return(string.Empty); } catch (Exception ex) { LogDBHandleClass.getInstance().LogException(CValue.LOG_LEVEL_ERROR, "奖助申请,家庭情况保存失败:" + ex.ToString()); return(string.Empty); } }
/// <summary> /// 保存数据 /// </summary> /// <returns></returns> private string SaveData() { bool bFlag = false; //新增 Loan_apply_check head = new Loan_apply_check(); if (string.IsNullOrEmpty(Post("CHECK_OID"))) { head.OID = Guid.NewGuid().ToString(); ds.RetrieveObject(head); head.SEQ_NO = Post("hidApplySeqNo"); GetFormValue(head); var inserttrcn = ImplementFactory.GetInsertTransaction <Loan_apply_check>("Loan_apply_checkInsertTransaction", user.User_Name); inserttrcn.EntityList.Add(head); if (inserttrcn.Commit()) { bFlag = true; } } else //修改 { head.OID = Post("CHECK_OID"); ds.RetrieveObject(head); GetFormValue(head); var updatetrcn = ImplementFactory.GetUpdateTransaction <Loan_apply_check>("Loan_apply_checkUpdateTransaction", user.User_Name); if (updatetrcn.Commit(head)) { bFlag = true; } } if (bFlag) { #region 保存成功之后,修改的 手机号、银行卡号 同步更新至学生个人信息中 //ZZ 20171213 修改:保存成功之后,修改的 手机号、身份证号 同步更新至学生个人信息中 Dictionary <string, string> param = new Dictionary <string, string>(); param.Add("SEQ_NO", head.SEQ_NO); Loan_project_apply apply = LoanHandleClass.getInstance().GetLoanProjectApplyInfo(param); if (apply != null) { //手机号 if (!string.IsNullOrWhiteSpace(Post("STU_PHONE"))) { StuHandleClass.getInstance().ByStuNumberUpStuInfo_Phone(apply.STU_NUMBER, Post("STU_PHONE")); } //身份证号 if (!string.IsNullOrWhiteSpace(Post("STU_IDNO"))) { StuHandleClass.getInstance().ByStuNumberUpStuInfo_IDNo(apply.STU_NUMBER, Post("STU_IDNO")); } } #endregion 保存成功之后,修改的 手机号、银行卡号 同步更新至学生个人信息中 return(string.Empty); } else { return("保存核对信息失败!"); } }
/// <summary> /// 保存数据 /// </summary> /// <returns></returns> private string SaveData() { bool bFlag = false; //新增 Insur_apply_check head = new Insur_apply_check(); if (string.IsNullOrEmpty(Post("CHECK_OID"))) { head.OID = Guid.NewGuid().ToString(); ds.RetrieveObject(head); head.SEQ_NO = Post("hidApplySeqNo"); GetFormValue(head); //是否申请弃保 字段,如果没有值 就赋值 ,默认值 为否 if (string.IsNullOrWhiteSpace(Post("IS_REFUND"))) { head.IS_REFUND = CValue.FLAG_N; } var inserttrcn = ImplementFactory.GetInsertTransaction <Insur_apply_check>("Insur_apply_checkInsertTransaction", user.User_Name); inserttrcn.EntityList.Add(head); if (inserttrcn.Commit()) { bFlag = true; } } else //修改 { head.OID = Post("CHECK_OID"); ds.RetrieveObject(head); GetFormValue(head); //是否申请弃保 字段,如果没有值 就赋值 ,默认值 为否 if (string.IsNullOrWhiteSpace(Post("IS_REFUND"))) { head.IS_REFUND = CValue.FLAG_N; } var updatetrcn = ImplementFactory.GetUpdateTransaction <Insur_apply_check>("Insur_apply_checkUpdateTransaction", user.User_Name); if (updatetrcn.Commit(head)) { bFlag = true; } } if (bFlag) { #region 保存成功之后,修改的 手机号、身份证号、银行卡号 同步更新至学生个人信息中 //ZZ 20171213 修改:保存成功之后,修改的 手机号、身份证号、银行卡号 同步更新至学生个人信息中 Dictionary <string, string> param = new Dictionary <string, string>(); param.Add("SEQ_NO", head.SEQ_NO); Insur_project_apply apply = InsurHandleClass.getInstance().GetInsurProjectApplyInfo(param); if (apply != null) { //手机号 if (!string.IsNullOrWhiteSpace(Post("STU_PHONE"))) { StuHandleClass.getInstance().ByStuNumberUpStuInfo_Phone(apply.STU_NUMBER, Post("STU_PHONE")); } //身份证号 if (!string.IsNullOrWhiteSpace(Post("STU_IDNO"))) { StuHandleClass.getInstance().ByStuNumberUpStuInfo_IDNo(apply.STU_NUMBER, Post("STU_IDNO")); } //银行卡号 if (!string.IsNullOrWhiteSpace(Post("STU_BANDKCODE"))) { StuHandleClass.getInstance().ByStuNumberUpStuInfo_BankCode(apply.STU_NUMBER, Post("STU_BANDKCODE")); } } #endregion 保存成功之后,修改的 手机号、身份证号、银行卡号 同步更新至学生个人信息中 StringBuilder json = new StringBuilder();//用来存放Json的 json.Append("{"); json.Append(Json.StringToJson(head.OID, "OID")); json.Append(","); json.Append(Json.StringToJson(head.SEQ_NO, "SEQ_NO")); json.Append("}"); return(json.ToString()); } else { return(string.Empty); } }
/// <summary> ///保存数据 /// </summary> /// <returns></returns> private string SaveData() { try { bool result = false; Shoolar_apply_head head = new Shoolar_apply_head(); if (string.IsNullOrEmpty(Post("hidOid")))//新增 { head.OID = Guid.NewGuid().ToString(); head.SEQ_NO = BusDataDeclareTransaction.getInstance().GetSeq_no(CValue.DOC_TYPE_BDM03); head.RET_CHANNEL = Ret_Channel_A0000; //预录入 全程通道(回执状态) head.DOC_TYPE = CValue.DOC_TYPE_BDM03; GetPageValue(head); #region 保存项目信息 //项目信息 Dictionary <string, string> param = new Dictionary <string, string>(); if (!string.IsNullOrEmpty(Post("hidProjectSeqNo"))) { param.Add("SEQ_NO", Post("hidProjectSeqNo")); } Shoolar_project_head project = ProjectSettingHandleClass.getInstance().GetProjectList(param)[0]; if (project == null) { LogDBHandleClass.getInstance().LogException(CValue.LOG_LEVEL_ERROR, string.Format("通过项目单据编号{0},读取项目信息出错!", Post("hidProjectSeqNo"))); return(string.Empty); } head.PROJECT_SEQ_NO = project.SEQ_NO; head.PROJECT_CLASS = project.PROJECT_CLASS; head.PROJECT_TYPE = project.PROJECT_TYPE; head.PROJECT_YEAR = project.APPLY_YEAR; head.PROJECT_NAME = project.PROJECT_NAME; head.PROJECT_MONEY = project.PROJECT_MONEY; #endregion 保存项目信息 #region 保存学生信息 //学生信息 head.STU_NUMBER = user.User_Id; head.STU_NAME = user.User_Name; Basic_stu_info stuInfo = StuHandleClass.getInstance().GetStuInfo_Obj(head.STU_NUMBER); if (stuInfo == null) { LogDBHandleClass.getInstance().LogException(CValue.LOG_LEVEL_ERROR, string.Format("通过学号{0},读取学生信息出错!", head.STU_NUMBER)); return(string.Empty); } //学生信息 if (stuInfo.STUTYPE.Equals(CValue.USER_STUTYPE_B)) { head.STU_TYPE = CValue.USER_STUTYPE_B; } else { head.STU_TYPE = CValue.USER_STUTYPE_Y; } head.XY = stuInfo.COLLEGE; head.ZY = stuInfo.MAJOR; head.GRADE = stuInfo.EDULENTH; head.CLASS_CODE = stuInfo.CLASS; head.STU_IDCARDNO = stuInfo.IDCARDNO; head.STU_BANKCODE = StuHandleClass.getInstance().ByStuNoGetBankCode(head.STU_NUMBER); #endregion 保存学生信息 var inserttrcn = ImplementFactory.GetInsertTransaction <Shoolar_apply_head>("Shoolar_apply_headInsertTransaction"); inserttrcn.EntityList.Add(head); result = inserttrcn.Commit(); if (result) { #region 步其他信息数据 //ZZ 20171125 新增:同步学生其他信息,因为在保存之前这些数据是还没有录入的 可以直接同步 #region 家庭情况 string strSynchroMsg = string.Empty; ProjectApplyHandleClass.getInstance().InsertInto_apply_family(head.SEQ_NO, out strSynchroMsg); if (strSynchroMsg.Length > 0) { LogDBHandleClass.getInstance().LogException(CValue.LOG_LEVEL_ERROR, "奖助申请保存时,同步家庭情况出错:" + strSynchroMsg); } #endregion 家庭情况 #region 学习情况 ProjectApplyHandleClass.getInstance().InsertInto_apply_score(head.SEQ_NO, out strSynchroMsg); if (strSynchroMsg.Length > 0) { LogDBHandleClass.getInstance().LogException(CValue.LOG_LEVEL_ERROR, "奖助申请保存时,同步学习情况出错:" + strSynchroMsg); } #endregion 学习情况 #region 获奖情况 ProjectApplyHandleClass.getInstance().InsertInto_apply_reward(head.SEQ_NO, out strSynchroMsg); if (strSynchroMsg.Length > 0) { LogDBHandleClass.getInstance().LogException(CValue.LOG_LEVEL_ERROR, "奖助申请保存时,同步获奖情况出错:" + strSynchroMsg); } #endregion 获奖情况 #endregion 步其他信息数据 } } else//修改 { head.OID = Post("hidOid"); ds.RetrieveObject(head); GetPageValue(head); var updatetrcn = ImplementFactory.GetUpdateTransaction <Shoolar_apply_head>("Shoolar_apply_headUpdateTransaction", user.User_Name); result = updatetrcn.Commit(head); } if (result) { StringBuilder json = new StringBuilder();//用来存放Json的 json.Append("{"); json.Append(Json.StringToJson(head.OID, "OID")); json.Append(","); json.Append(Json.StringToJson(head.SEQ_NO, "SEQ_NO")); json.Append(","); json.Append(Json.StringToJson(head.PROJECT_SEQ_NO, "PROJECT_SEQ_NO")); json.Append("}"); return(json.ToString()); }//保存成功 返回JSON else { return(string.Empty); } } catch (Exception ex) { LogDBHandleClass.getInstance().LogException(CValue.LOG_LEVEL_ERROR, "保存奖助申请,出错:" + ex.ToString()); return(string.Empty); } }
/// <summary> /// 保存数据 /// </summary> /// <returns></returns> private string SaveData() { bool bFlag = false; //新增 Shoolar_apply_check head = new Shoolar_apply_check(); if (string.IsNullOrEmpty(Post("CHECK_OID"))) { head.OID = Guid.NewGuid().ToString(); ds.RetrieveObject(head); head.SEQ_NO = Post("hidApplySeqNo"); GetFormValue(head); var inserttrcn = ImplementFactory.GetInsertTransaction <Shoolar_apply_check>("Shoolar_apply_checkInsertTransaction", user.User_Name); inserttrcn.EntityList.Add(head); if (inserttrcn.Commit()) { bFlag = true; } } else //修改 { head.OID = Post("CHECK_OID"); ds.RetrieveObject(head); GetFormValue(head); var updatetrcn = ImplementFactory.GetUpdateTransaction <Shoolar_apply_check>("Shoolar_apply_checkUpdateTransaction", user.User_Name); if (updatetrcn.Commit(head)) { bFlag = true; } } if (bFlag) { #region 保存成功之后,修改的 学生信息 同步更新至学生个人信息中 //ZZ 20171213 修改:保存成功之后,修改的 手机号 同步更新至学生个人信息中 Dictionary <string, string> param = new Dictionary <string, string>(); param.Add("SEQ_NO", head.SEQ_NO); Shoolar_apply_head apply = ProjectApplyHandleClass.getInstance().GetApplyHeadInfo(param); if (apply != null) { //手机号 if (!string.IsNullOrWhiteSpace(Post("STU_PHONE"))) { StuHandleClass.getInstance().ByStuNumberUpStuInfo_Phone(apply.STU_NUMBER, Post("STU_PHONE")); } //ZZ 20180319 修改:保存成功之后,修改的 学籍状态以及异动时间 同步更新至学生个人信息中 if (!string.IsNullOrWhiteSpace(Post("STU_REGISTER"))) { StuHandleClass.getInstance().ByStuNumberUpStuInfo_Register(apply.STU_NUMBER, Post("STU_REGISTER")); } if (!string.IsNullOrWhiteSpace(Post("STU_DIFFDATE"))) { StuHandleClass.getInstance().ByStuNumberUpStuInfo_DiffDate(apply.STU_NUMBER, Post("STU_DIFFDATE")); } if (!string.IsNullOrWhiteSpace(Post("STU_RICE_CARD"))) { StuHandleClass.getInstance().ByStuNumberUpStuInfo_RiceCard(apply.STU_NUMBER, Post("STU_RICE_CARD")); } } #endregion 保存成功之后,修改的 学生信息 同步更新至学生个人信息中 return(string.Empty); } else { return("保存核对信息失败!"); } }
/// <summary> /// 保存数据 /// </summary> /// <returns></returns> private string SaveData() { try { //先删除数据再新增 string strSQL = string.Format("DELETE FROM SHOOLAR_PROJECT_LIMIT WHERE SEQ_NO = '{0}' ", Get("seq_no")); string strSQL_Zy = string.Format("DELETE FROM SHOOLAR_PROJECT_LIMIT_ZY WHERE SEQ_NO = '{0}' ", Get("seq_no")); if (ds.ExecuteTxtNonQuery(strSQL) < 0) { return("设置限制条件失败!"); } if (ds.ExecuteTxtNonQuery(strSQL_Zy) < 0) { return("设置限制条件中的专业表体失败!"); } var inserttrcn = ImplementFactory.GetInsertTransaction <Shoolar_project_limit>("Shoolar_project_limitInsertTransaction"); #region 综合考评总分排名 int Limit_ComRank_Value = cod.ChangeInt(Post("Limit_ComRank_Value")); if (Limit_ComRank_Value != 0) { Shoolar_project_limit head_Limit_ComRank = new Shoolar_project_limit(); head_Limit_ComRank.OID = Guid.NewGuid().ToString(); head_Limit_ComRank.SEQ_NO = Get("seq_no"); head_Limit_ComRank.LIMIT_TYPE = CValue.Limit_ComRank;//综合考评总分排名 head_Limit_ComRank.LIMIT_VALUE = Post("Limit_ComRank_Value"); head_Limit_ComRank.LIMIT_COMMENT = string.Format("综合考评总分排名:位于前{0}名", head_Limit_ComRank.LIMIT_VALUE); inserttrcn.EntityList.Add(head_Limit_ComRank); } #endregion 综合考评总分排名 #region 综合考评总分 decimal Limit_ComScore_RankPer = cod.ChangeDecimal(Post("Limit_ComScore_RankPer")); decimal Limit_ComScore_Score = cod.ChangeDecimal(Post("Limit_ComScore_Score")); if (Limit_ComScore_RankPer != 0 || Limit_ComScore_Score != 0) { Shoolar_project_limit head_Limit_ComScore = new Shoolar_project_limit(); head_Limit_ComScore.OID = Guid.NewGuid().ToString(); head_Limit_ComScore.SEQ_NO = Get("seq_no"); head_Limit_ComScore.LIMIT_TYPE = CValue.Limit_ComScore;//综合考评总分 head_Limit_ComScore.LIMIT_RANKPER = Math.Round(cod.ChangeDecimal(Post("Limit_ComScore_RankPer")), 1); head_Limit_ComScore.LIMIT_SCORE = Math.Round(cod.ChangeDecimal(Post("Limit_ComScore_Score")), 1); head_Limit_ComScore.LIMIT_COMMENT = string.Format(" 综合考评总分:位于前{0}%;分数大于{1}分", head_Limit_ComScore.LIMIT_RANKPER, head_Limit_ComScore.LIMIT_SCORE); inserttrcn.EntityList.Add(head_Limit_ComScore); } #endregion 综合考评总分 #region 操行能单项综合分 decimal Limit_Conduct_RankPer = cod.ChangeDecimal(Post("Limit_Conduct_RankPer")); decimal Limit_Conduct_Score = cod.ChangeDecimal(Post("Limit_Conduct_Score")); if (Limit_Conduct_RankPer != 0 || Limit_Conduct_Score != 0) { Shoolar_project_limit head_Limit_Conduct = new Shoolar_project_limit(); head_Limit_Conduct.OID = Guid.NewGuid().ToString(); head_Limit_Conduct.SEQ_NO = Get("seq_no"); head_Limit_Conduct.LIMIT_TYPE = CValue.Limit_Conduct;//操行能单项综合分 head_Limit_Conduct.LIMIT_RANKPER = Math.Round(cod.ChangeDecimal(Post("Limit_Conduct_RankPer")), 1); head_Limit_Conduct.LIMIT_SCORE = Math.Round(cod.ChangeDecimal(Post("Limit_Conduct_Score")), 1); head_Limit_Conduct.LIMIT_COMMENT = string.Format(" 操行能单项综合分:位于前{0}%;分数大于{1}分", head_Limit_Conduct.LIMIT_RANKPER, head_Limit_Conduct.LIMIT_SCORE); inserttrcn.EntityList.Add(head_Limit_Conduct); } #endregion 操行能单项综合分 #region 课程能单项综合分 decimal Limit_Course_RankPer = cod.ChangeDecimal(Post("Limit_Course_RankPer")); decimal Limit_Course_Score = cod.ChangeDecimal(Post("Limit_Course_Score")); if (Limit_Course_RankPer != 0 || Limit_Course_Score != 0) { Shoolar_project_limit head_Limit_Course = new Shoolar_project_limit(); head_Limit_Course.OID = Guid.NewGuid().ToString(); head_Limit_Course.SEQ_NO = Get("seq_no"); head_Limit_Course.LIMIT_TYPE = CValue.Limit_Course;//课程能单项综合分 head_Limit_Course.LIMIT_RANKPER = Math.Round(cod.ChangeDecimal(Post("Limit_Course_RankPer")), 1); head_Limit_Course.LIMIT_SCORE = Math.Round(cod.ChangeDecimal(Post("Limit_Course_Score")), 1); head_Limit_Course.LIMIT_COMMENT = string.Format(" 课程能单项综合分:位于前{0}%;分数大于{1}分", head_Limit_Course.LIMIT_RANKPER, head_Limit_Course.LIMIT_SCORE); inserttrcn.EntityList.Add(head_Limit_Course); } #endregion 课程能单项综合分 #region 体艺能单项综合分 decimal Limit_BodyArt_RankPer = cod.ChangeDecimal(Post("Limit_BodyArt_RankPer")); decimal Limit_BodyArt_Score = cod.ChangeDecimal(Post("Limit_BodyArt_Score")); if (Limit_BodyArt_RankPer != 0 || Limit_BodyArt_Score != 0) { Shoolar_project_limit head_Limit_BodyArt = new Shoolar_project_limit(); head_Limit_BodyArt.OID = Guid.NewGuid().ToString(); head_Limit_BodyArt.SEQ_NO = Get("seq_no"); head_Limit_BodyArt.LIMIT_TYPE = CValue.Limit_BodyArt;//体艺能单项综合分 head_Limit_BodyArt.LIMIT_RANKPER = Math.Round(cod.ChangeDecimal(Post("Limit_BodyArt_RankPer")), 1); head_Limit_BodyArt.LIMIT_SCORE = Math.Round(cod.ChangeDecimal(Post("Limit_BodyArt_Score")), 1); head_Limit_BodyArt.LIMIT_COMMENT = string.Format(" 体艺能单项综合分:位于前{0}%;分数大于{1}分", head_Limit_BodyArt.LIMIT_RANKPER, head_Limit_BodyArt.LIMIT_SCORE); inserttrcn.EntityList.Add(head_Limit_BodyArt); } #endregion 体艺能单项综合分 #region 职业技能单项综合分 decimal Limit_JobSkill_RankPer = cod.ChangeDecimal(Post("Limit_JobSkill_RankPer")); decimal Limit_JobSkill_Score = cod.ChangeDecimal(Post("Limit_JobSkill_Score")); if (Limit_JobSkill_RankPer != 0 || Limit_JobSkill_Score != 0) { Shoolar_project_limit head_Limit_JobSkill = new Shoolar_project_limit(); head_Limit_JobSkill.OID = Guid.NewGuid().ToString(); head_Limit_JobSkill.SEQ_NO = Get("seq_no"); head_Limit_JobSkill.LIMIT_TYPE = CValue.Limit_JobSkill;//职业技能单项综合分 head_Limit_JobSkill.LIMIT_RANKPER = Math.Round(cod.ChangeDecimal(Post("Limit_JobSkill_RankPer")), 1); head_Limit_JobSkill.LIMIT_SCORE = Math.Round(cod.ChangeDecimal(Post("Limit_JobSkill_Score")), 1); head_Limit_JobSkill.LIMIT_COMMENT = string.Format(" 职业技能单项综合分:位于前{0}%;分数大于{1}分", head_Limit_JobSkill.LIMIT_RANKPER, head_Limit_JobSkill.LIMIT_SCORE); inserttrcn.EntityList.Add(head_Limit_JobSkill); } #endregion 职业技能单项综合分 #region 操行、课程、体艺、职业技能四个单项综合分 decimal Limit_Total_RankPer = cod.ChangeDecimal(Post("Limit_Total_RankPer")); if (Limit_Total_RankPer != 0) { Shoolar_project_limit head_Limit_Total = new Shoolar_project_limit(); head_Limit_Total.OID = Guid.NewGuid().ToString(); head_Limit_Total.SEQ_NO = Get("seq_no"); head_Limit_Total.LIMIT_TYPE = CValue.Limit_Total;//操行、课程、体艺、职业技能四个单项综合分 head_Limit_Total.LIMIT_RANKPER = Math.Round(cod.ChangeDecimal(Post("Limit_Total_RankPer")), 1); head_Limit_Total.LIMIT_COMMENT = string.Format("操行、课程、体艺、职业技能四个单项 综合分任一个在评选范围内位于前:{0}%", head_Limit_Total.LIMIT_RANKPER); inserttrcn.EntityList.Add(head_Limit_Total); } #endregion 操行、课程、体艺、职业技能四个单项综合分 #region 操行、课程、体艺、职业技能分项任三个前%,另一个可放宽至 decimal Limit_Three_RankPer = cod.ChangeDecimal(Post("Limit_Three_RankPer")); decimal Limit_One_RankPer = cod.ChangeDecimal(Post("Limit_One_RankPer")); if (Limit_Three_RankPer != 0) { Shoolar_project_limit head_Limit_Three_RankPer = new Shoolar_project_limit(); head_Limit_Three_RankPer.OID = Guid.NewGuid().ToString(); head_Limit_Three_RankPer.SEQ_NO = Get("seq_no"); head_Limit_Three_RankPer.LIMIT_TYPE = CValue.Limit_Three;//操行、课程、体艺、职业技能分项任三个前 head_Limit_Three_RankPer.LIMIT_RANKPER = Math.Round(cod.ChangeDecimal(Post("Limit_Three_RankPer")), 1); head_Limit_Three_RankPer.LIMIT_COMMENT = string.Format("操行、课程、体艺、职业技能分项任三个前:{0}%,另一个可放宽至:{1}%", head_Limit_Three_RankPer.LIMIT_RANKPER, Limit_One_RankPer); inserttrcn.EntityList.Add(head_Limit_Three_RankPer); } if (Limit_One_RankPer != 0) { Shoolar_project_limit head_Limit_One_RankPer = new Shoolar_project_limit(); head_Limit_One_RankPer.OID = Guid.NewGuid().ToString(); head_Limit_One_RankPer.SEQ_NO = Get("seq_no"); head_Limit_One_RankPer.LIMIT_TYPE = CValue.Limit_One;//操行、课程、体艺、职业技能分项任三个前,另一个可放宽至 head_Limit_One_RankPer.LIMIT_RANKPER = Math.Round(cod.ChangeDecimal(Post("Limit_One_RankPer")), 1); head_Limit_One_RankPer.LIMIT_COMMENT = string.Format("操行、课程、体艺、职业技能分项任三个前{0}%,另一个可放宽至:{1}%", Limit_Three_RankPer, head_Limit_One_RankPer.LIMIT_RANKPER); inserttrcn.EntityList.Add(head_Limit_One_RankPer); } #endregion 操行、课程、体艺、职业技能分项任三个前%,另一个可放宽至 #region 年级 if (!string.IsNullOrEmpty(Post("Limit_Grade_Value"))) { Shoolar_project_limit head_Limit_Grade = new Shoolar_project_limit(); head_Limit_Grade.OID = Guid.NewGuid().ToString(); head_Limit_Grade.SEQ_NO = Get("seq_no"); head_Limit_Grade.LIMIT_TYPE = CValue.Limit_Grade;//年级 head_Limit_Grade.LIMIT_VALUE = Post("Limit_Grade_Value"); head_Limit_Grade.LIMIT_COMMENT = string.Format("年级:{0}(含)以上", cod.GetDDLTextByValue("ddl_grade", head_Limit_Grade.LIMIT_VALUE)); inserttrcn.EntityList.Add(head_Limit_Grade); } #endregion 年级 #region 学生类型 if (!string.IsNullOrEmpty(Post("hidStudentType"))) { Shoolar_project_limit head_Limit_Student = new Shoolar_project_limit(); head_Limit_Student.OID = Guid.NewGuid().ToString(); head_Limit_Student.SEQ_NO = Get("seq_no"); head_Limit_Student.LIMIT_TYPE = CValue.Limit_Student;//学生类型 head_Limit_Student.LIMIT_VALUE = Post("hidStudentType"); head_Limit_Student.LIMIT_COMMENT = string.Format("学生类型:{0}", GetStuTypeTxt(head_Limit_Student.LIMIT_VALUE)); inserttrcn.EntityList.Add(head_Limit_Student); } #endregion 学生类型 #region 困难生等级 if (!string.IsNullOrEmpty(Post("hidKN"))) { Shoolar_project_limit head_Limit_KN = new Shoolar_project_limit(); head_Limit_KN.OID = Guid.NewGuid().ToString(); head_Limit_KN.SEQ_NO = Get("seq_no"); head_Limit_KN.LIMIT_TYPE = CValue.Limit_KN;//困难生等级 head_Limit_KN.LIMIT_VALUE = Post("hidKN"); head_Limit_KN.LIMIT_COMMENT = string.Format("困难生等级:{0}", GetKNTypeTxt(head_Limit_KN.LIMIT_VALUE)); inserttrcn.EntityList.Add(head_Limit_KN); } #endregion 困难生等级 if (!inserttrcn.Commit()) { return("设置限制条件失败!"); } #region 专业 Dictionary <string, string> dicZy = GetZy(); if (dicZy != null) { var inserttrcn_zy = ImplementFactory.GetInsertTransaction <Shoolar_project_limit_zy>("Shoolar_project_limit_zyInsertTransaction"); foreach (KeyValuePair <string, string> zy in dicZy) { Shoolar_project_limit_zy head_Limit_Zy = new Shoolar_project_limit_zy(); head_Limit_Zy.OID = Guid.NewGuid().ToString(); head_Limit_Zy.SEQ_NO = Get("seq_no"); head_Limit_Zy.ZY_ID = zy.Key; head_Limit_Zy.ZY_NAME = zy.Value; inserttrcn_zy.EntityList.Add(head_Limit_Zy); } inserttrcn_zy.Commit(); } #endregion 专业 return(string.Empty); } catch (Exception ex) { LogDBHandleClass.getInstance().LogException(CValue.LOG_LEVEL_ERROR, "保存申请限制条件出错:" + ex.ToString()); return("信息发送失败!"); } }