Ejemplo n.º 1
0
        protected override bool DoDelete(RequestData data)
        {
            T_BASE_COMPANYModel model = new T_BASE_COMPANYModel();

            model.ISDEL = ((int)DeleteType.Delete).ToString();
            return(model.Update(T_BASE_COMPANY.ID == data.Get("id")));
        }
Ejemplo n.º 2
0
        protected override bool DoEdit(RequestData data)
        {
            T_BASE_COMPANYModel model = new T_BASE_COMPANYModel();

            model.NAME       = data.Get("NAME");
            model.UPDATETIME = DateTime.Now;
            return(model.Update(T_BASE_COMPANY.ID == data.Get("id")));
        }
Ejemplo n.º 3
0
        public ActionResult saveCompanyData(RequestData data)
        {
            var  msg    = new { success = false, data = "保存失败" };
            bool result = false;
            T_BASE_COMPANYModel model = new T_BASE_COMPANYModel();

            this.GetModelValue(model, data);
            if (!string.IsNullOrEmpty(data.Get("SHOWTYPE")) && data.Get("SHOWTYPE").Trim() == "0") //新增
            {
                model.ISDEL = "0";
                result      = model.Update(T_BASE_COMPANY.ID == data.Get("ID").Trim());
            }
            else if (!string.IsNullOrEmpty(data.Get("SHOWTYPE")) && data.Get("SHOWTYPE").Trim() == "1") //编辑
            {
                model.UPDATETIME = DateTime.Now;
                model.UPDATEUSER = CurrentUser.UserName;
                result           = model.Update(T_BASE_COMPANY.ID == data.Get("ID").Trim());
            }
            if (result)
            {
                msg = new { success = true, data = "保存成功" };
            }
            return(Json(msg));
        }
Ejemplo n.º 4
0
        public ActionResult DelCompanyInfoByID(RequestData data)
        {
            string rowID = string.Empty;
            var    msg   = new { success = false, data = "删除失败" };
            T_BASE_COMPANYModel model = new T_BASE_COMPANYModel();

            model.ISDEL      = "1";
            model.UPDATETIME = DateTime.Now;
            model.UPDATEUSER = CurrentUser.UserName;
            bool result = model.Update(T_BASE_COMPANY.ID == data.Get("id"));

            if (result)
            {
                msg = new { success = true, data = "删除成功" };
            }
            return(Json(msg));
        }