protected void Page_Load(object sender, EventArgs e) { try { var ccDal = new DAL.ctt_contract_dal(); var contractId = Request.QueryString["contract_id"]; if (!string.IsNullOrEmpty(contractId)) { thisContract = ccDal.FindNoDeleteById(long.Parse(contractId)); } if (thisContract == null) { Response.End(); } else { if (thisContract.exclusion_contract_id != null) { excContract = ccDal.FindNoDeleteById((long)thisContract.exclusion_contract_id); } thisCodeList = new DAL.d_cost_code_dal().GetConExsCode(thisContract.id); allCodeList = new DAL.d_cost_code_dal().GetNotConExsCode(thisContract.id); thisRoleList = new DAL.sys_role_dal().GetConExcRole(thisContract.id); allRoleList = new DAL.sys_role_dal().GetNotConExcRole(thisContract.id); } } catch (Exception msg) { Response.End(); } }
/// <summary> /// 保存合同的例外因素 /// </summary> private void SaveExclu(HttpContext context) { var contract_id = context.Request.QueryString["contract_id"]; if (!string.IsNullOrEmpty(contract_id)) { var ccDal = new DAL.ctt_contract_dal(); var thisCon = ccDal.FindNoDeleteById(long.Parse(contract_id)); if (thisCon != null) { var excContractId = context.Request.QueryString["exc_contract_id"]; var roleIds = context.Request.QueryString["roleIds"]; var workTypeIds = context.Request.QueryString["typeIds"]; var result = new ContractBLL().ContractExcManage(thisCon.id, excContractId, roleIds, workTypeIds, LoginUserId); context.Response.Write(result); } } }