Exemple #1
0
        private void Save()
        {
            string json = string.Empty;
            try
            {
                json = HttpContext.Current.Request["json"].ToString();
            }
            catch { }
            if (string.IsNullOrEmpty(json))
            {
                HttpContext.Current.Response.Write(JsonMessage.FailString("参数丢失!"));
                return;
            }
            if (HttpContext.Current.Session["SYS_USER"] == null)
            {
                HttpContext.Current.Response.Write(JsonMessage.FailStringNohaveOther("登录已失效,请重新登录!"));
                return;
            }
            SYS_USER4SESSION user = HttpContext.Current.Session["SYS_USER"] as SYS_USER4SESSION;
            Prod_Info table = JsonHelper.DeserializeData<Prod_Info>(json);

            table.CreateBy = user.UserID;
            table.UpdateBy = user.UserID;

            ProdListFactory bll = new ProdListFactory();
            HttpContext.Current.Response.Write(bll.Save(table));
        }