Exemplo n.º 1
0
 /// <summary>
 /// ��ȡһ����¼[�ѹ�ʱ]
 /// </summary>
 /// <param name="A_ID">��¼���</param>
 /// <returns>һ����¼</returns>
 public XYECOM.Model.AuditingInfo GetItem(int A_ID)
 {
     XYECOM.Model.AuditingInfo aut = null;
     SqlParameter[] param = new SqlParameter[]
     {
         new SqlParameter("@strWhere"," Where A_ID=" + A_ID.ToString()),
         new SqlParameter("@strTableName","pl_Auditing"),
         new SqlParameter("@strOrder","")
     };
     using (SqlDataReader rdr = XYECOM.Core.Data.SqlHelper.ExecuteReader(CommandType.StoredProcedure, "XYP_SelectByWhere", param))
     {
         if (rdr.Read())
         {
             aut = new XYECOM.Model.AuditingInfo();
             aut.A_Advice = rdr["A_Advice"].ToString();
             aut.A_ID = Int64.Parse(rdr["A_ID"].ToString());
             aut.A_Reason = rdr["A_Reason"].ToString();
             aut.DescTabID = Int64.Parse(rdr["DescTabID"].ToString());
             aut.DescTabName = rdr["DescTabName"].ToString();
         }
     }
     return aut;
 }
Exemplo n.º 2
0
        /// <summary>
        /// �ܾ�ͨ�����
        /// </summary>
        /// <param name="descTabName">���ݱ�ʶ</param>
        /// <param name="infoId">��ϢId</param>
        /// <param name="reason">ԭ��</param>
        /// <param name="advice">����</param>
        protected int NotPassAudit(string descTabName, long infoId, string reason, string advice)
        {
            XYECOM.Business.Auditing audBLL = new XYECOM.Business.Auditing();
            XYECOM.Model.AuditingInfo audInfo = new XYECOM.Model.AuditingInfo();

            //�޸����״̬
            int i = audBLL.UpdatesAuditing(infoId, descTabName, XYECOM.Model.AuditingState.NoPass);

            audInfo = audBLL.GetItem(infoId + "", descTabName);

            if (audInfo == null)
            {
                audInfo = new XYECOM.Model.AuditingInfo();
                audInfo.DescTabName = descTabName;
                audInfo.DescTabID = infoId;
            }

            audInfo.A_Advice = reason;
            audInfo.A_Reason = advice;

            audBLL.Update(audInfo);

            return i;
        }