示例#1
0
        public JsonResult DeleteLanguage(Guid id)
        {
            MemoryMessageBuss.PushCommand(new DeleteLaguage(id, CurrentUserId, DateTime.Now));
            EngineeCurrentContext.RefreshListLanguage();

            return(Json(new { Ok = true, Data = new { Id = id }, Message = "Success" }, JsonRequestBehavior.AllowGet));
        }
示例#2
0
        public JsonResult SaveLanguage(Guid id, string title, string code, string currencyCode, double currencyExchangeRate)
        {
            if (id == Guid.Empty)
            {
                id = Guid.NewGuid();
                MemoryMessageBuss.PushCommand(new CreateLanguage(id, title, code, currencyCode, currencyExchangeRate, CurrentUserId, DateTime.Now));
            }
            else
            {
                MemoryMessageBuss.PushCommand(new UpdateLanguage(id, title, code, currencyCode, currencyExchangeRate, CurrentUserId, DateTime.Now));
            }

            EngineeCurrentContext.RefreshListLanguage();

            return(Json(new { Ok = true, Data = new { Id = id }, Message = "Success" }, JsonRequestBehavior.AllowGet));
        }