Esempio n. 1
0
        /// <summary>
        /// 添加好友申请
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public int AddRelationsApply(CustRelationsApplyModels model)
        {
            int result;
            const string sql = "insert into cust_relations_apply (innerid, fromid, toid, status, createdtime, modifiedtime, remark, sourceid) values (@innerid, @fromid, @toid, @status, @createdtime, @modifiedtime, @remark, @sourceid);";
            try
            {
                result = Helper.Execute(sql, model);
            }
            catch (Exception ex)
            {
                result = 0;
            }

            return result;
        }
Esempio n. 2
0
        /// <summary>
        /// 修改好友申请By id
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public int UpdateRelationsApplyById(CustRelationsApplyModels model)
        {
            int result;
            const string sql = "update cust_relations_apply set remark=@remark, sourceid=@sourceid where innerid=@innerid;";
            try
            {
                result = Helper.Execute(sql, model);
            }
            catch (Exception ex)
            {
                result = 0;
            }

            return result;
        }
Esempio n. 3
0
        /// <summary>
        /// 修改好友申请[重复申请] by fromid and toid
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public int UpdateRelationsApply(CustRelationsApplyModels model)
        {
            int result;
            const string sql = "update cust_relations_apply set remark=@remark, sourceid=@sourceid where fromid=@fromid and toid=@toid and `status`=0;";
            try
            {
                result = Helper.Execute(sql, model);
            }
            catch (Exception ex)
            {
                result = 0;
            }

            return result;
        }