public JsonResult Create(EbayMessageReType obj)
        {
            try
            {
                EbayMessageType ebaymessage = ebay.GetById(obj.MessageId);

                obj.ItemId = ebaymessage.ItemId;
                obj.EbayId = ebaymessage.MessageId;
                obj.ReplayBy = CurrentUser.Realname;
                obj.SenderEmail = ebaymessage.SenderEmail;
                obj.SenderID = ebaymessage.SenderID;
                obj.Account = ebaymessage.Shop;
                obj.ReplayOn = DateTime.Now;
                obj.UploadTime = Convert.ToDateTime("2000-01-01");
                NSession.Save(obj);
                NSession.Flush();
                ebaymessage.ReplayBy = obj.ReplayBy;
                ebaymessage.ReplayOn = obj.ReplayOn;
                ebaymessage.MessageStatus = "已回复";
                NSession.Update(ebaymessage);
                NSession.Flush();
            }
            catch (Exception ee)
            {
                return Json(new { errorMsg = "出错了" });
            }
            return Json(new { IsSuccess = "true" });
        }
 public JsonResult EditProcessed(int Id)
 {
     EbayMessageType ebaymessage = ebay.GetById(Id);
     EbayMessageReType obj = new EbayMessageReType();
     obj.ItemId = ebaymessage.ItemId;
     obj.EbayId = ebaymessage.MessageId;
     obj.Account = ebaymessage.Shop;
     obj.BodyRe = "";
     obj.ItemId = ebaymessage.ItemId;
     obj.SenderID = ebaymessage.SenderID;
     obj.SenderEmail = ebaymessage.SenderEmail;
     obj.EbayId = ebaymessage.MessageId;
     obj.ReplayBy = CurrentUser.Realname;
     obj.SenderEmail = ebaymessage.SenderEmail;
     obj.SenderID = ebaymessage.SenderID;
     obj.Account = ebaymessage.Shop;
     obj.ReplayOn = DateTime.Now;
     obj.UploadTime = Convert.ToDateTime("2000-01-01");
     NSession.Save(obj);
     NSession.Flush();
     ebaymessage.ReplayBy = CurrentUser.Realname;
     ebaymessage.ReplayOn = DateTime.Now;
     ebaymessage.MessageStatus = "已回复";
     NSession.Update(ebaymessage);
     NSession.Flush();
     return Json(new { IsSuccess = "true" });
 }
        public ActionResult Edit(EbayMessageReType obj)
        {

            try
            {
                NSession.Update(obj);
                NSession.Flush();
            }
            catch (Exception ee)
            {
                return Json(new { errorMsg = "出错了" });
            }
            return Json(new { IsSuccess = "true" });

        }
        public string ChangeStatus(EbayMessageReType obj)
        {
            try
            {
                NSession.Update(obj);
                NSession.Flush();
                return "状态修改成功";
            }
            catch (Exception e)
            {
                return "状态修改出错";
            }

        }