예제 #1
0
        /// <summary>
        /// 修改公司简介
        /// </summary>
        /// <param name="companyContent">公司内容</param>
        /// <returns></returns>
        public Stream UpdateCompanyIntroduce(Stream stream)
        {
            string resultStr = "";

            if (stream != null)
            {
                StreamReader sr = new StreamReader(stream);
                string       s  = sr.ReadToEnd();
                sr.Dispose();
                CompanysBLL bl = new CompanysBLL();
                try
                {
                    resultStr = bl.UpdateCompanyIntroduce(s);
                }
                catch (Exception err)
                {
                    HF.Cloud.BLL.Common.Logger.Error("UpdateCompanyIntroduce Error", err);
                }
            }
            if (resultStr != "")
            {
                return(new MemoryStream(Encoding.UTF8.GetBytes(resultStr)));
            }
            else
            {
                return(new MemoryStream(Encoding.UTF8.GetBytes("error")));
            }
        }
예제 #2
0
 protected void save()
 {
     try
     {
         decimal amount    = decimal.Parse(txbamount.Text.Trim());
         string  resultmsg = "";
         int     result    = CompanysBLL.updatetotalamount(amount, id, base.UserID, ref resultmsg);
         if (result > 0)
         {
             Page.ClientScript.RegisterClientScriptBlock(this.GetType(), DateTime.Now.ToString(), "alert('充值成功');location.href='companys.aspx';", true);
         }
         else
         {
             Page.ClientScript.RegisterClientScriptBlock(this.GetType(), DateTime.Now.ToString(), "alert('充值失败" + resultmsg.Replace("'", "").Replace("\r", "").Replace("\n", "") + "');", true);
         }
     }
     catch (Exception exc)
     {
         Page.ClientScript.RegisterClientScriptBlock(this.GetType(), DateTime.Now.ToString(), "alert('提交失败" + exc.Message.Replace("'", "").Replace("\r", "").Replace("\n", "") + "');", true);
     }
 }
예제 #3
0
        /// <summary>
        /// 添加关键字
        /// </summary>
        /// <param name="companyID">公司ID</param>
        /// <param name="tag">关键字名称</param>
        /// <returns>返回关键字列表</returns>
        public Stream AddCompanyTag(string companyID, string tag)
        {
            try
            {
                CompanysBLL compBLL   = new CompanysBLL();
                string      strResult = compBLL.AddCompanyTag(companyID, tag);

                if (!string.IsNullOrEmpty(strResult))
                {
                    return(new MemoryStream(Encoding.UTF8.GetBytes(strResult)));
                }
                else
                {
                    return(new MemoryStream(Encoding.UTF8.GetBytes("error")));
                }
            }
            catch (Exception err)
            {
                Logger.Error("AddCompanyTag Error", err);
                return(new MemoryStream(Encoding.UTF8.GetBytes("error")));
            }
        }
예제 #4
0
        /// <summary>
        /// 公司页面,添加或选择公司
        /// </summary>
        /// <param name="session">用户session</param>
        /// <param name="companyName">公司全名称</param>
        /// <returns></returns>
        public Stream AddOrSelectCompany_EditCompany(string session, string companyName)
        {
            try
            {
                CompanysBLL compBLL   = new CompanysBLL();
                string      resultStr = compBLL.AddOrSelectCompany_EditCompany(session, companyName);

                if (!string.IsNullOrEmpty(resultStr))
                {
                    return(new MemoryStream(Encoding.UTF8.GetBytes(resultStr)));
                }
                else
                {
                    return(new MemoryStream(Encoding.UTF8.GetBytes("error")));
                }
            }
            catch (Exception err)
            {
                Logger.Error("AddOrSelectCompany_EditCompany Error", err);
                return(new MemoryStream(Encoding.UTF8.GetBytes("error")));
            }
        }
예제 #5
0
        /// <summary>
        /// 模糊搜索公司
        /// </summary>
        /// <param name="keyword">公司关键字</param>
        /// <returns></returns>
        public Stream SearchCompanyName(string keyword)
        {
            try
            {
                CompanysBLL compBLL   = new CompanysBLL();
                string      strResult = compBLL.SearchCompanyName(keyword);

                if (!string.IsNullOrEmpty(strResult))
                {
                    return(new MemoryStream(Encoding.UTF8.GetBytes(strResult)));
                }
                else
                {
                    return(new MemoryStream(Encoding.UTF8.GetBytes("error")));
                }
            }
            catch (Exception err)
            {
                Logger.Error("SearchCompanyName Error", err);
                return(new MemoryStream(Encoding.UTF8.GetBytes("error")));
            }
        }
예제 #6
0
        /// <summary>
        /// 给公司递名片
        /// </summary>
        /// <param name="session">session</param>
        /// <param name="companyID">公司ID</param>
        /// <returns></returns>
        public Stream SendCard(string session, string companyID)
        {
            try
            {
                CompanysBLL compBLL   = new CompanysBLL();
                string      strResult = compBLL.SendCard(session, companyID);

                if (!string.IsNullOrEmpty(strResult))
                {
                    return(new MemoryStream(Encoding.UTF8.GetBytes(strResult)));
                }
                else
                {
                    return(new MemoryStream(Encoding.UTF8.GetBytes("error")));
                }
            }
            catch (Exception err)
            {
                Logger.Error("SendCard Error", err);
                return(new MemoryStream(Encoding.UTF8.GetBytes("error")));
            }
        }
예제 #7
0
        /// <summary>
        /// 获取本人公司信息
        /// </summary>
        /// <param name="session">用户session</param>
        /// <returns></returns>
        public Stream GetMyCompanyInfo(string session)
        {
            try
            {
                CompanysBLL compBLL   = new CompanysBLL();
                string      strResult = compBLL.GetMyCompanyInfo(session);

                if (!string.IsNullOrEmpty(strResult))
                {
                    return(new MemoryStream(Encoding.UTF8.GetBytes(strResult)));
                }
                else
                {
                    return(new MemoryStream(Encoding.UTF8.GetBytes("error")));
                }
            }
            catch (Exception err)
            {
                Logger.Error("GetCompanyTag Error", err);
                return(new MemoryStream(Encoding.UTF8.GetBytes("error")));
            }
        }