/// <summary> /// 通过审批表主键id找到民政局批复的详细信息 /// </summary> /// <returns>返回详细信息类</returns> public static Ass_Fee SelectInfoByStepId(long stepId) { Ass_Fee ass_Fee = new Ass_Fee(); try { DataSet ds = new DataSet(); StringBuilder strSql = new StringBuilder(); strSql.Append(" select * from Ass_YiLiaoInfo where StepId=@stepId "); SqlParameter[] parameters = { new SqlParameter("@stepId", SqlDbType.BigInt), }; parameters[0].Value = stepId; ds = DbHelperSQL.Query(strSql.ToString(), parameters); ass_Fee.StepId = stepId; ass_Fee.GouYao_Fee = (decimal)ds.Tables[0].Rows[0]["GouYao_Fee"]; ass_Fee.Men_Fee = (decimal)ds.Tables[0].Rows[0]["Men_Fee"]; ass_Fee.Feng_Fee = (decimal)ds.Tables[0].Rows[0]["Feng_Fee"]; ass_Fee.CiShu = (int)ds.Tables[0].Rows[0]["CiShu"]; ass_Fee.BiLi = (int)ds.Tables[0].Rows[0]["BiLi"]; ds.Dispose(); } catch (Exception e) { Log4Net.LogWrite("err", "Med_Ass:SelectInfoByStepId:" + e.Message); } return ass_Fee; }
/// <summary> /// 把 民政局批复的金额等信息添加到批复表中 /// </summary> /// <param name="ass_Fee"></param> /// <returns>成功返回true</returns> public static bool InsertYiLiAoInfo(Ass_Fee ass_Fee) { bool result = false; try { StringBuilder strSql = new StringBuilder(); strSql.Append("insert into Ass_YiLiaoInfo(StepId,GouYao_Fee,Men_Fee,Feng_Fee,BiLi,CiShu) values("); strSql.Append(" @StepId,@GouYao_Fee,@Men_Fee,@Feng_Fee,@BiLi,@CiShu"); strSql.Append(")"); SqlParameter[] parameters = { new SqlParameter("@StepId", SqlDbType.BigInt), new SqlParameter("@GouYao_Fee",SqlDbType.Decimal), new SqlParameter("@Men_Fee",SqlDbType.Decimal), new SqlParameter("@Feng_Fee",SqlDbType.Decimal), new SqlParameter("@BiLi",SqlDbType.Int), new SqlParameter("@CiShu",SqlDbType.Int), }; parameters[0].Value = ass_Fee.StepId; parameters[1].Value = ass_Fee.GouYao_Fee; parameters[2].Value = ass_Fee.Men_Fee; parameters[3].Value = ass_Fee.Feng_Fee; parameters[4].Value = ass_Fee.BiLi; parameters[5].Value = ass_Fee.CiShu; int count = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters); if (count == 1) { result = true; } } catch (Exception e) { Log4Net.LogWrite("err", "Controler.Med_Ass.InsertYiLiAoInfo:" + e.Message); } return result; }