Example #1
0
        public ActionResult Insert(KeHuLianXiRen entity)
        {
            if (ModelState.IsValid)
            {
                entity.CreatedBy   = GetCurrentUserName();
                entity.CreatedDate = DateTime.Now;

                _service.AddKeHuLianXiRen(entity);
                _service.Save();

                this.GetCmp <Window>("windowKeHuLianXiRen").Hide();
                this.GetCmp <Store>("storeKeHuLianXiRen").Reload();

                return(this.Direct());
            }
            return(this.Direct());
        }
Example #2
0
        public ActionResult Update(KeHuLianXiRen entity)
        {
            if (ModelState.IsValid)
            {
                entity.LastModifiedBy   = GetCurrentUserName();
                entity.LastModifiedDate = DateTime.Now;

                _service.UpdateKeHuLianXiRen(entity);
                _service.Save();

                var window = this.GetCmp <Window>("windowKeHuLianXiRen");
                window.Hide();
                this.GetCmp <Store>("storeKeHuLianXiRen").Reload();
                return(this.Direct());
            }

            return(this.Direct());
        }