Esempio n. 1
0
        /// <summary>
        /// 根据ID查询密保信息
        /// </summary>
        /// <param name="con"></param>
        /// <returns></returns>
        public IssueAnswer_Table GetIssueAnswerTableByConn(string con)
        {
            IssueAnswer_Table obj = null;
            SqlDataReader     dr  = DBHerlper.ExecuteReader(
                "Select * from IssueAnswer_Table where IA_id=@IA_id",
                CommandType.Text, new SqlParameter[] {
                new SqlParameter("@IA_id", con)
            });

            if (dr.Read())
            {
                obj = new IssueAnswer_Table()
                {
                    IA_Answer1 = dr["IA_Answer1"].ToString(),
                    IA_Answer2 = dr["IA_Answer2"].ToString(),
                    IA_Answer3 = dr["IA_Answer3"].ToString(),
                    IA_id      = Convert.ToInt32(dr["IA_id"]),
                    IA_Issue1  = dr["IA_Issue1"].ToString(),
                    IA_Issue2  = dr["IA_Issue2"].ToString(),
                    IA_Issue3  = dr["IA_Issue3"].ToString(),
                    U_UserName = dr["U_UserName"].ToString()
                };
            }
            dr.Close();
            return(obj);
        }
Esempio n. 2
0
 /// <summary>
 /// 添加密保
 /// </summary>
 /// <param name="obj">带入参数</param>
 /// <returns></returns>
 public int Insert_IssueAnswerTableData(IssueAnswer_Table obj)
 {
     return(DBHerlper.ExecuteNonQuery(GetSqlString("Insert"),
                                      CommandType.StoredProcedure,
                                      new SqlParameter[] {
         new SqlParameter("@IA_Answer1", obj.IA_Answer1),
         new SqlParameter("@IA_Answer2", obj.IA_Answer2),
         new SqlParameter("@IA_Answer3", obj.IA_Answer3),
         new SqlParameter("@IA_Issue1", obj.IA_Issue1),
         new SqlParameter("@IA_Issue2", obj.IA_Issue2),
         new SqlParameter("@IA_Issue3", obj.IA_Issue3),
         new SqlParameter("@U_UserName", obj.U_UserName)
     }));
 }
Esempio n. 3
0
        /// <summary>
        /// 获取全部的密保
        /// </summary>
        /// <returns></returns>
        public List <IssueAnswer_Table> GetIssueAnswerTableAll()
        {
            List <IssueAnswer_Table> list = new List <IssueAnswer_Table>();
            SqlDataReader            dr   = DBHerlper.ExecuteReader(GetSqlString("Select"),
                                                                    CommandType.StoredProcedure);

            while (dr.Read())
            {
                IssueAnswer_Table obj = new IssueAnswer_Table()
                {
                    IA_Answer1 = dr["IA_Answer1"].ToString(),
                    IA_Answer2 = dr["IA_Answer2"].ToString(),
                    IA_Answer3 = dr["IA_Answer3"].ToString(),
                    IA_id      = Convert.ToInt32(dr["IA_id"]),
                    IA_Issue1  = dr["IA_Issue1"].ToString(),
                    IA_Issue2  = dr["IA_Issue2"].ToString(),
                    IA_Issue3  = dr["IA_Issue3"].ToString(),
                    U_UserName = dr["U_UserName"].ToString()
                };
                list.Add(obj);
            }
            dr.Close();
            return(list);
        }
Esempio n. 4
0
 /// <summary>
 /// 更改密保信息
 /// </summary>
 /// <param name="obj">带入参数</param>
 /// <returns></returns>
 public int Update_IssueAnswerTableData(IssueAnswer_Table obj)
 {
     return(relevanceClass.Update_IssueAnswerTableData(obj));
 }
Esempio n. 5
0
 /// <summary>
 /// 添加密保信息
 /// </summary>
 /// <param name="obj">带入参数</param>
 /// <returns></returns>
 public int Insert_IssueAnswerTableData(IssueAnswer_Table obj)
 {
     return(relevanceClass.Insert_IssueAnswerTableData(obj));
 }