Beispiel #1
0
        public ActionResult AjaxMaintainQuery()
        {
            string sysNoText = Request.Form["SysNo[]"];

            if (!string.IsNullOrEmpty(sysNoText))
            {
                int sysNo = 0;
                int.TryParse(sysNoText, out sysNo);
                if (sysNo > 0)
                {
                    int?currentSellerSysNo = null;

                    int currentSellerSysNoValue = UserAuthHelper.GetCurrentUser().SellerSysNo;
                    if (currentSellerSysNoValue > 0)
                    {
                        currentSellerSysNo = currentSellerSysNoValue;
                    }

                    var result = ProductConsultService.GetProductConsultFactoryReply(sysNo, currentSellerSysNo);

                    return(AjaxGridJson(result));
                }
            }

            return(Json(1));
        }
Beispiel #2
0
        public ActionResult AjaxSaveReplay()
        {
            string sysNoText = Request.Form["SysNo"];
            int    sysNo     = 0;

            int.TryParse(sysNoText, out sysNo);
            if (sysNo > 0)
            {
                string content = Request.Form["Content"];
                if (!string.IsNullOrEmpty(content))
                {
                    ProductConsultReplyInfo entity = new ProductConsultReplyInfo();
                    entity.ReplyContent = content;
                    entity.ConsultSysNo = sysNo;
                    entity.SellerSysNo  = UserAuthHelper.GetCurrentUser().SellerSysNo;
                    entity.Status       = "A";
                    entity.StatusValue  = "A";
                    entity.Type         = "M";
                    //entity.NeedAdditionalText = "N";

                    entity.InUser = UserAuthHelper.GetCurrentUser().UserID;
                    //entity.InUser = UserAuthHelper.GetCurrentUser().SellerName;
                    entity.InDate = DateTime.Now;

                    ProductConsultService.AddProductConsultReply(entity);

                    return(Json(entity));
                }
            }
            return(Json(1));
        }
Beispiel #3
0
        public ActionResult AjaxQuery()
        {
            ProductConsultQueryFilter queryCriteria = BuildQueryFilterEntity <ProductConsultQueryFilter>();

            queryCriteria.SortFields = "ProductSysNo";

            int?currentSellerSysNo = null;

            int currentSellerSysNoValue = UserAuthHelper.GetCurrentUser().SellerSysNo;

            if (currentSellerSysNoValue > 0)
            {
                currentSellerSysNo = currentSellerSysNoValue;
            }

            queryCriteria.SellerSysNo = currentSellerSysNo;

            QueryResult <ProductConsultQueryBasicInfo> result = ProductConsultService.QueryProductConsultBasicInfoList(queryCriteria);

            return(AjaxGridJson(result));
        }
Beispiel #4
0
        public ActionResult AjaxChangeStatus()
        {
            List <int> sysNoList = new List <int>();

            string sysNoText  = Request.Form["SysNo"];
            string statusText = Request.Form["Status"];

            string[] array = sysNoText.Split(',');

            foreach (var item in array)
            {
                int sysNo = 0;
                if (int.TryParse(item, out sysNo))
                {
                    sysNoList.Add(sysNo);
                }
            }
            string currentUser = UserAuthHelper.GetCurrentUser().UserID;

            if (sysNoList.Count > 0)
            {
                //审核
                if (statusText == "A")
                {
                    ProductConsultService.BatchSetProductConsultValid(sysNoList, currentUser);
                }
                //作废
                else if (statusText == "D")
                {
                    ProductConsultService.BatchSetProductConsultInvalid(sysNoList, currentUser);
                }
                //阅读
                else if (statusText == "E")
                {
                    ProductConsultService.BatchSetProductConsultRead(sysNoList, currentUser);
                }
            }

            return(Json(1));
        }
Beispiel #5
0
        /// <summary>
        /// 回复页面
        /// </summary>
        /// <returns></returns>
        public ActionResult Maintain()
        {
            string sysNoText = Request["SysNo"];

            if (!string.IsNullOrEmpty(sysNoText))
            {
                int sysNo = 0;
                int.TryParse(sysNoText, out sysNo);
                ProductConsultInfo entity = ProductConsultService.LoadProductConsultWithoutReply(sysNo);

                if (entity == null)
                {
                    return(RedirectToAction("Index", "ProductConsult"));
                }

                ViewBag.ProductConsultInfo = entity;
            }
            else
            {
                return(RedirectToAction("Index", "ProductConsult"));
            }

            return(View());
        }