コード例 #1
0
        public JsonResult EditInline(int?Id, string fieldName, string value)
        {
            Dictionary <string, object> field_value = new Dictionary <string, object>();

            field_value.Add(fieldName, value);
            field_value.Add("ModifiedDate", DateTime.Now.ToString("yyyy-MM-dd H:mm:ss"));
            field_value.Add("ModifiedUserId", WebSecurity.CurrentUserId);

            var flag = QueryHelper.UpdateFields("Sale_CustomerDiscount", field_value, Id.Value);

            if (flag == true)
            {
                return(Json(new { status = "success", id = Id, fieldName = fieldName, value = value }, JsonRequestBehavior.AllowGet));
            }

            return(Json(new { status = "error", id = Id, fieldName = fieldName, value = value }, JsonRequestBehavior.AllowGet));
        }
コード例 #2
0
        public JsonResult EditInline(int Id, string fieldName, string value)
        {
            Dictionary <string, object> field_value = new Dictionary <string, object>();

            field_value.Add(fieldName, value);

            var flag = QueryHelper.UpdateFields("System_Page", field_value, Id);

            if (fieldName == "Name")
            {
            }

            if (flag == true)
            {
                return(Json(new { status = "success", id = Id, fieldName = fieldName, value = value }, JsonRequestBehavior.AllowGet));
            }

            return(Json(new { status = "error", id = Id, fieldName = fieldName, value = value }, JsonRequestBehavior.AllowGet));
        }