예제 #1
0
        public string AddGuestBook(string title, string name, string cellphone, string content, string email, string guesttype, string sex, string workplace, string chuanzhen, string address)
        {
            BLL.GuestBook     bll = new BLL.GuestBook();
            BLL.GuestBookType bllguestbooktype = new BLL.GuestBookType();
            Model.GuestBook   model            = new Model.GuestBook();
            string            strTypeName      = bllguestbooktype.GetModel(Convert.ToInt32(guesttype)).dbo_TypeName;

            model.dbo_Address       = address;
            model.dbo_CellPhone     = cellphone;
            model.dbo_Content       = content;
            model.dbo_Email         = email;
            model.dbo_Flax          = chuanzhen;
            model.dbo_GuestType     = Convert.ToInt32(guesttype);
            model.dbo_GuestTypeName = strTypeName;
            model.dbo_IsReply       = false;
            model.dbo_Name          = name;
            model.dbo_Ptime         = DateTime.Now;
            model.dbo_ReplyContent  = "";
            model.dbo_Sex           = sex;
            model.dbo_Title         = title;
            model.dbo_WorkName      = workplace;
            bll.Add(model);
            string body = "尊敬的客户您好,您的留言已经收到,我们会尽快处理并回复到您的邮箱,请注意查收" + "<br /><br /><br />该邮箱为" + sys.webName + "回复留言的邮件,请勿直接回复<br /><br / >" + name + ",您在" + DateTime.Now + "的来信:<br>" + title + "<br>" + content;

            //sys.SendEmail(sys.webName + "的回复", body, txtEmail);
            //sys.SendEmail(sys.webName + "的消息", sys.webName + "收到用户:'" + name + " 邮箱:'" + email + "'的新邮件:<br>" + title + "<br>" + content, sys.mailAddress);
            return("1");
        }