示例#1
0
        public ActionResult AddIteamDetails(Iteams ObjItems)
        {
            DataSet   ds       = new DataSet();
            ClientDAL objBAL   = new ClientDAL();
            string    jsonData = "";

            try
            {
                string count = objBAL.AddIteams(ObjItems);
                if (ds.Tables[0].Rows.Count > 0)
                {
                    JsonSerializerSettings serializerSettings = new JsonSerializerSettings();
                    serializerSettings.Converters.Add(new DataTableConverter());
                    jsonData = JsonConvert.SerializeObject(ds, Formatting.None, serializerSettings);
                }
                else
                {
                    jsonData = "";
                }
            }
            catch (Exception ex)
            {
                jsonData = "Fail";
            }
            return(Json(jsonData, JsonRequestBehavior.AllowGet));
        }