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");
 }
Beispiel #2
0
 private void ShowInfo(int ConsultationId)
 {
     Maticsoft.Model.Shop.Products.ProductConsults consults = new Maticsoft.Model.Shop.Products.ProductConsults();
     this.txtReplyText.Text = consults.ReplyText;
     this.chkIsStatus.Checked = consults.Status == 1;
 }