public ActionResult AjaxAddConsult(FormCollection Fm)
 {
     if (string.IsNullOrWhiteSpace(Fm["ProductId"]))
     {
         return base.Content("False");
     }
     int num = Globals.SafeInt(Fm["ProductId"], 0);
     string str = InjectionFilter.SqlFilter(Fm["Content"]);
     Maticsoft.BLL.Shop.Products.ProductConsults consults = new Maticsoft.BLL.Shop.Products.ProductConsults();
     Maticsoft.Model.Shop.Products.ProductConsults model = new Maticsoft.Model.Shop.Products.ProductConsults {
         CreatedDate = DateTime.Now,
         TypeId = 0,
         Status = 0,
         UserId = base.currentUser.UserID,
         UserName = base.currentUser.NickName,
         UserEmail = base.currentUser.Email,
         IsReply = false,
         Recomend = 0,
         ProductId = num,
         ConsultationText = str
     };
     if (consults.Add(model) <= 1)
     {
         return base.Content("False");
     }
     return base.Content("True");
 }
示例#2
0
 private void ShowInfo(int ConsultationId)
 {
     Maticsoft.Model.Shop.Products.ProductConsults model = new Maticsoft.BLL.Shop.Products.ProductConsults().GetModel(ConsultationId);
     this.lblConsultationId.Text = model.ConsultationId.ToString();
     this.lblUserId.Text = model.UserId.ToString();
     this.lblProductId.Text = model.ProductId.ToString();
     this.lblUserName.Text = model.UserName;
     this.lblUserEmail.Text = model.UserEmail;
     this.lblConsultationText.Text = model.ConsultationText;
     this.lblCreatedDate.Text = model.CreatedDate.ToString();
     this.lblReplyDate.Text = model.ReplyDate.ToString();
     this.chkIsReply.Checked = model.IsReply;
     this.lblReplyText.Text = model.ReplyText;
     this.lblReplyUserId.Text = model.ReplyUserId.ToString();
     this.chkIsStatus.Checked = model.Status == 1;
     this.lblUserId.Text = new User().GetTrueNameByCache(model.UserId);
     Maticsoft.Model.Shop.Products.ProductInfo info2 = new Maticsoft.BLL.Shop.Products.ProductInfo().GetModel(model.ProductId);
     this.lblProductId.Text = info2.ProductName;
 }