コード例 #1
0
        /// <summary>
        /// 添加沟通记录
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        /// <remarks>tianzhenyun 2012-05-15</remarks>
        public E_ItemExchange Add(E_ItemExchange data)
        {
            SqlParameter[] parms =
            {
                new SqlParameter("@EnterpriseID", SqlDbType.Int),
                new SqlParameter("@ClientInfoID", SqlDbType.Int),
                new SqlParameter("@UserID",       SqlDbType.Int),
                new SqlParameter("@Detail",       SqlDbType.NVarChar, 512)
            };
            parms[0].Value = data.EnterpriseID;
            parms[1].Value = data.ClientInfoID;
            parms[2].Value = data.UserID;
            parms[3].Value = data.Detail;
            DataTable dt = DbHelperSQL.RunProcedureTable("ProcEP_B_ItemExchange_Insert", parms);

            if (dt != null && dt.Rows.Count == 1)
            {
                DataRow row = dt.Rows[0];
                data.ClientInfoID = Convert.ToInt32(row["ClientInfoID"]);
                data.Detail       = row["Detail"].ToString();
                data.AddDate      = Convert.ToDateTime(row["AddDate"]);
                data.RealName     = row["RealName"].ToString();
                return(data);
            }
            return(null);
        }
コード例 #2
0
 /// <summary>
 /// 获取沟通记录列表
 /// </summary>
 /// <param name="data"></param>
 /// <returns></returns>
 /// <remarks>tianzhenyun 2012-05-15</remarks>
 public DataTable GetList(E_ItemExchange data)
 {
     SqlParameter[] parms =
     {
         new SqlParameter("@EnterpriseID", SqlDbType.Int),
         new SqlParameter("@ClientInfoID", SqlDbType.Int)
     };
     parms[0].Value = data.EnterpriseID;
     parms[1].Value = data.ClientInfoID;
     return(DbHelperSQL.RunProcedureTable("ProcEP_B_ItemExchange_ListSelect", parms));
 }
コード例 #3
0
        /// <summary>
        /// 添加沟通记录
        /// </summary>
        private void AddExchange()
        {
            E_ItemExchange data = new E_ItemExchange();

            data.EnterpriseID = pp.EnterpriseID;
            data.UserID       = pp.UserID;
            data.ClientInfoID = Convert.ToInt32(nv["ciid"]);
            data.Detail       = nv["info"];
            data.AddDate      = Convert.ToDateTime(nv["date"]);
            data = new T_ItemExchange().Add(data);
            JsonObjectCollection colDR = new JsonObjectCollection();

            colDR.Add(new JsonStringValue("result", data != null ? "1" : "0"));
            colDR.Add(new JsonStringValue("detail", data.Detail));
            colDR.Add(new JsonStringValue("date", Convert.ToDateTime(data.AddDate).ToString("yyyy-MM-dd HH:mm")));
            colDR.Add(new JsonStringValue("realname", data.RealName));
            HttpContext.Current.Response.Write(colDR.ToString());
        }
コード例 #4
0
 /// <summary>
 /// 获取沟通记录列表
 /// </summary>
 /// <param name="data"></param>
 /// <returns></returns>
 /// <remarks>tianzhenyun 2012-05-15</remarks>
 public DataTable GetList(E_ItemExchange data)
 {
     return(dal.GetList(data));
 }
コード例 #5
0
 /// <summary>
 /// 添加沟通记录
 /// </summary>
 /// <param name="data"></param>
 /// <returns></returns>
 /// <remarks>tianzhenyun 2012-05-15</remarks>
 public E_ItemExchange Add(E_ItemExchange data)
 {
     return(dal.Add(data));
 }