private string CheckAdd() { string seq_no = Get("seq_no"); object o = ds.ExecuteTxtScalar(string.Format("SELECT COUNT(1) FROM DST_FAMILY_MEMBERS WHERE SEQ_NO='{0}'", seq_no)); if (o != null && o.ToString().Length > 0) { int cnt = Int32.Parse(o.ToString()); if (cnt == 8) { return("最多只能添加8位家庭成员!"); } else { //家庭成员+本人=家庭人口数 object size = ds.ExecuteTxtScalar(string.Format("SELECT FAMILY_SIZE FROM DST_FAMILY_SITUA WHERE SEQ_NO='{0}'", seq_no)); if (ComTranClass.getInstance().ToInt(size) == 0) { return("请填写家庭人口数并保存后,再添加家庭成员!"); } if (cnt + 1 >= ComTranClass.getInstance().ToInt(size)) { return("家庭成员已达上限,不允许再添加!"); } } } return(string.Empty); }
/// <summary> /// 保存数据 /// </summary> /// <returns></returns> private string SaveData() { try { Qz_job_manage_set head = new Qz_job_manage_set(); head.OID = Post("OID"); if (head.OID == "") { head.OID = Guid.NewGuid().ToString(); } ds.RetrieveObject(head); head.SCH_YEAR = Post("SCH_YEAR"); head.SCH_TERM = Post("SCH_TERM"); head.IS_ENABLE = Post("IS_ENABLE"); head.DECLARE_START_TIME = Post("DECLARE_START_TIME"); head.DECLARE_END_TIME = Post("DECLARE_END_TIME"); head.REWARD_STD_B = comTran.ToDecimal(Post("REWARD_STD_B")); head.REWARD_UNIT_B = Post("REWARD_UNIT_B"); head.REWARD_STD_Y = comTran.ToDecimal(Post("REWARD_STD_Y")); head.REWARD_UNIT_Y = Post("REWARD_UNIT_Y"); head.OP_CODE = user.User_Id; head.OP_NAME = user.User_Name; head.OP_TIME = ComTranClass.getInstance().GetCurrLongDateTime(); ds.UpdateObject(head); return(head.OID); } catch (Exception ex) { LogDBHandleClass.getInstance().LogException(CValue.LOG_LEVEL_ERROR, "保存岗位申报基本设置出错:" + ex.ToString()); return(string.Empty); } }
/// <summary> /// 保存数据 /// </summary> /// <returns></returns> private string SaveData() { try { Qz_job_proof_set head = new Qz_job_proof_set(); head.OID = Post("OID"); if (head.OID == "") { head.OID = Guid.NewGuid().ToString(); } ds.RetrieveObject(head); head.SCH_YEAR = Post("SCH_YEAR"); head.SCH_TERM = Post("SCH_TERM"); head.YEAR_MONTH = Post("YEAR_MONTH"); head.IS_ENABLE = Post("IS_ENABLE"); head.DECLARE_START_TIME = Post("DECLARE_START_TIME"); head.DECLARE_END_TIME = Post("DECLARE_END_TIME"); head.OP_CODE = user.User_Id; head.OP_NAME = user.User_Name; head.OP_TIME = ComTranClass.getInstance().GetCurrLongDateTime(); ds.UpdateObject(head); //把其他设置改为不启用 if (head.IS_ENABLE.Equals(CValue.FLAG_Y)) { ds.ExecuteTxtNonQuery(string.Format("UPDATE QZ_JOB_PROOF_SET SET IS_ENABLE = 'N' WHERE OID != '{0}'", head.OID)); } return(head.OID); } catch (Exception ex) { LogDBHandleClass.getInstance().LogException(CValue.LOG_LEVEL_ERROR, "保存劳酬凭据基本设置出错:" + ex.ToString()); return(string.Empty); } }
public bool AuditTranHandle(string doc_type, string doc_no, string op_user, string pos_code, string audit_result, string audit_note, string level_info, out string msg) { try { if (!WKF_ExternalInterface.getInstance().Chk_ClientParam(doc_type, doc_no, op_user, out msg)) { return(false); } var m_code = WKF_BusDataHandleCLass.getInstance().GetCodBiz(doc_type, out msg); if (m_code == null) { return(false); } DataRow drData = WKF_BusDataHandleCLass.getInstance().GetBusHeadData(m_code, doc_no, out msg); if (drData == null) { return(false); } if (!WKF_BusDataHandleCLass.getInstance().UpdateChk_status(m_code, doc_no, WKF_VLAUES.HANDLE_STATUS_Y, out msg)) { return(false); } string ret_channel = WKF_AuditHandleCLass.getInstance().GetAuditRet_Channel(drData[WKF_VLAUES.COLUMN_STEP_NO].ToString(), audit_result); Wkf_rule_queue rule = WKF_RuleQueueHandleCLass.getInstance().GetCurrRule(doc_type, WKF_VLAUES.DECLARE_TYPE_D, drData[WKF_VLAUES.COLUMN_STEP_NO].ToString(), ret_channel, drData[WKF_VLAUES.COLUMN_POS_CODE].ToString()); if (rule == null) { return(false); } string next_step_no = rule.NEXT_STEP_NO; string next_ret_channel = rule.NEXT_RET_CHANNEL; string next_post_code = rule.NEXT_POST_CODE; string declare_type = rule.DECLARE_TYPE; string op_time = ComTranClass.getInstance().GetCurrLongDateTime(); string audit_pos_code = audit_result.Equals("P") ? string.Format(",{0}='{1}'", WKF_VLAUES.COLUMN_AUDIT_POS_CODE, pos_code) : string.Empty; ds.ExecuteTxtNonQuery(string.Format("UPDATE {0} SET {3}='{4}',{5}='{6}',{7}='{8}',{9}='{10}',{11}='{12}',{13}='{14}'{15}{16} WHERE {1}='{2}'", m_code.BUS_TABLE, m_code.BUS_COLUMN, doc_no, WKF_VLAUES.COLUMN_STEP_NO, next_step_no, WKF_VLAUES.COLUMN_CHK_STATUS, WKF_VLAUES.HANDLE_STATUS_N, WKF_VLAUES.COLUMN_RET_CHANNEL, next_ret_channel, WKF_VLAUES.COLUMN_POS_CODE, next_post_code, WKF_VLAUES.COLUMN_DECLARE_TYPE, declare_type, WKF_VLAUES.COLUMN_CHK_TIME, op_time, level_info, audit_pos_code)); //创建工作日志 CreateNewLog(doc_type, doc_no, CValue.DECLARE_TYPE_D, drData[WKF_VLAUES.COLUMN_STEP_NO].ToString(), ret_channel, pos_code, op_user, op_time, audit_note); return(true); } catch (Exception ex) { var m_code = WKF_BusDataHandleCLass.getInstance().GetCodBiz(doc_type, out msg); WKF_BusDataHandleCLass.getInstance().UpdateChk_status(m_code, doc_no, WKF_VLAUES.HANDLE_STATUS_N, out msg); msg = ex.Message; return(false); } }
/// <summary> /// 保存数据 /// </summary> /// <returns></returns> private string SaveData() { try { Dst_param_info head = new Dst_param_info(); head.OID = Post("OID"); if (head.OID == "") { head.OID = Guid.NewGuid().ToString(); } ds.RetrieveObject(head); head.SCHYEAR = Post("SCHYEAR"); head.FAMILY_INFO_FLAG = Post("FAMILY_INFO_FLAG"); head.FAMILY_START_TIME = Post("FAMILY_START_TIME"); head.FAMILY_END_TIME = Post("FAMILY_END_TIME"); head.DECLARE_FLAG = Post("DECLARE_FLAG"); head.DECLARE_START_TIME = Post("DECLARE_START_TIME"); head.DECLARE_END_TIME = Post("DECLARE_END_TIME"); head.NEED_FAMILY_FLAG = Post("NEED_FAMILY_FLAG"); head.BATCH_NO = Post("BATCH_NO"); head.OP_USER = user.User_Name; head.OP_TIME = ComTranClass.getInstance().GetCurrLongDateTime(); ds.UpdateObject(head); //修改该学年其他设置的开关状态 try { if (head.FAMILY_INFO_FLAG.Equals(CValue.FLAG_Y)) { ds.ExecuteTxtNonQuery(string.Format("UPDATE DST_PARAM_INFO SET FAMILY_INFO_FLAG = 'N' WHERE SCHYEAR = '{0}' AND OID != '{1}'", head.SCHYEAR, head.OID)); } if (head.DECLARE_FLAG.Equals(CValue.FLAG_Y)) { ds.ExecuteTxtNonQuery(string.Format("UPDATE DST_PARAM_INFO SET DECLARE_FLAG = 'N' WHERE SCHYEAR = '{0}' AND OID != '{1}'", head.SCHYEAR, head.OID)); } } catch (Exception ex) { LogDBHandleClass.getInstance().LogException(CValue.LOG_LEVEL_ERROR, "修改该学年其他设置的开关状态出错:" + ex.ToString()); } return(head.OID); } catch (Exception ex) { LogDBHandleClass.getInstance().LogException(CValue.LOG_LEVEL_ERROR, "保存困难生认定基本设置出错:" + ex.ToString()); return(string.Empty); } }
public bool SubmitSurvey(string doc_type, string doc_no, string op_user, string pos_code, string op_notes, out string msg) { try { //if (!WKF_ExternalInterface.getInstance().Chk_ClientParam(doc_type, doc_no, op_user, out msg)) // return false; var m_code = WKF_BusDataHandleCLass.getInstance().GetCodBiz(doc_type, out msg); if (m_code == null) { return(false); } DataRow drData = WKF_BusDataHandleCLass.getInstance().GetBusHeadData(m_code, doc_no, out msg); if (drData == null) { return(false); } if (!WKF_BusDataHandleCLass.getInstance().UpdateChk_status(m_code, doc_no, WKF_VLAUES.HANDLE_STATUS_Y, out msg)) { return(false); } string op_time = ComTranClass.getInstance().GetCurrLongDateTime(); ds.ExecuteTxtNonQuery(string.Format("UPDATE {0} SET {1}='{2}',{3}='{4}',{5}='{6}' WHERE {7}='{8}'", m_code.BUS_TABLE, WKF_VLAUES.COLUMN_CHK_STATUS, WKF_VLAUES.HANDLE_STATUS_N, WKF_VLAUES.COLUMN_RET_CHANNEL, CValue.RET_CHANNEL_A0010, WKF_VLAUES.COLUMN_POS_CODE, pos_code, m_code.BUS_COLUMN, doc_no)); //创建工作日志 CreateNewLog(doc_type, doc_no, CValue.DECLARE_TYPE_D, CValue.STEP_A0, CValue.RET_CHANNEL_A0010, pos_code, op_user, op_time, op_notes); return(true); } catch (Exception ex) { var m_code = WKF_BusDataHandleCLass.getInstance().GetCodBiz(doc_type, out msg); WKF_BusDataHandleCLass.getInstance().UpdateChk_status(m_code, doc_no, WKF_VLAUES.HANDLE_STATUS_N, out msg); msg = ex.Message; return(false); } }
/// <summary> /// 生成新的流转规则 /// </summary> /// <param name="doc_type"></param> /// <returns></returns> private bool InsertNewRule(string doc_type) { DataTable dtbiz = ds.ExecuteTxtDataTable(string.Format("SELECT * FROM COD_BIZ_CODES A WHERE A.DOC_TYPE='{0}' ", doc_type)); DataRow drbiz = null; if (cod.TableIsValid(dtbiz)) drbiz = dtbiz.Rows[0]; else return false; try { string op_time = ComTranClass.getInstance().GetCurrLongDateTime(); if (Post("hidAudit_type").ToString().Equals("Ctype1")) { WKF_RuleQueueHandleCLass.getInstance().SetOneLevelRule(doc_type, user.User_Id, op_time); } else if (Post("hidAudit_type").ToString().Equals("Ctype2")) { if (Post("hidDeclare_role").ToString().Equals("Declare_S")) WKF_RuleQueueHandleCLass.getInstance().SetTwoLevelRule(doc_type, user.User_Id, op_time); else WKF_RuleQueueHandleCLass.getInstance().SetTwoLevelRule_F(doc_type, user.User_Id, op_time); } else if (Post("hidAudit_type").ToString().Equals("Ctype3")) { if (Post("hidDeclare_role").ToString().Equals("Declare_S")) WKF_RuleQueueHandleCLass.getInstance().SetThreeLevelRule(doc_type, user.User_Id, op_time); else if (Post("hidDeclare_role").ToString().Equals("Declare_F")) WKF_RuleQueueHandleCLass.getInstance().SetThreeLevelRule_F(doc_type, user.User_Id, op_time); else WKF_RuleQueueHandleCLass.getInstance().SetThreeLevelRule_Y(doc_type, user.User_Id, op_time); } else if (Post("hidAudit_type").ToString().Equals("Ctype_Q")) { if (Post("hidDeclare_role").ToString().Equals("Declare_D")) WKF_RuleQueueHandleCLass.getInstance().SetQZRule(doc_type, user.User_Id, op_time); } #region 撤销申请审批流转规则 string audit_type = Post("hidAudit_type").Equals("Ctype1") ? "F" : (Post("hidAudit_type").Equals("Ctype2") ? "Y" : "X"); if (Post("hidDeclare_role").ToString().Equals("Declare_S")) { if (Post("hidRevoke_type").ToString().Equals("Revoke1")) WKF_RuleQueueHandleCLass.getInstance().SetRevokeRule_S_F(doc_type, user.User_Id, op_time, audit_type); else if (Post("hidRevoke_type").ToString().Equals("Revoke2")) WKF_RuleQueueHandleCLass.getInstance().SetRevokeRule_S_Y(doc_type, user.User_Id, op_time, audit_type); else if (Post("hidRevoke_type").ToString().Equals("Revoke3")) WKF_RuleQueueHandleCLass.getInstance().SetRevokeRule_S_X(doc_type, user.User_Id, op_time, audit_type); } else if (Post("hidDeclare_role").ToString().Equals("Declare_F")) { if (Post("hidRevoke_type").ToString().Equals("Revoke2")) WKF_RuleQueueHandleCLass.getInstance().SetRevokeRule_F_Y(doc_type, user.User_Id, op_time, audit_type); else if (Post("hidRevoke_type").ToString().Equals("Revoke3")) WKF_RuleQueueHandleCLass.getInstance().SetRevokeRule_F_X(doc_type, user.User_Id, op_time, audit_type); } else if (Post("hidDeclare_role").ToString().Equals("Declare_Y")) { if (Post("hidRevoke_type").ToString().Equals("Revoke2")) WKF_RuleQueueHandleCLass.getInstance().SetRevokeRule_Y_Y(doc_type, user.User_Id, op_time, audit_type); else if (Post("hidRevoke_type").ToString().Equals("Revoke3")) WKF_RuleQueueHandleCLass.getInstance().SetRevokeRule_Y_X(doc_type, user.User_Id, op_time, audit_type); } #endregion 撤销申请审批流转规则 return true; } catch (Exception ex) { // info = string.Format("生成新的流转规则失败!原因:{0}", ex.Message); return false; } }