public string Post() { var strJson = new StreamReader(context.Request.InputStream).ReadToEnd(); dynamic newForm = JObject.Parse(strJson); var x0 = new WebReference.UserRes[1]; var y0 = new WebReference.UserRes() { user_kod = newForm.user_kod, user_ad = newForm.user_ad, user_soyad = newForm.user_soyad, user_sifre = Helper.Md5Hash(newForm.user_sifre.ToString()), durum = Helper.HasProperty(newForm, "durum") ? newForm.durum : false }; x0[0] = y0; var z0 = Helper.GetWebService().InsertPortalUSer(x0); if (!z0.Result) { throw new Exception(z0.Message); } return(newForm.user_kod.Value); }
public void Put(List <UserRes> ret) { var strJson = new StreamReader(context.Request.InputStream).ReadToEnd(); dynamic newForm = JObject.Parse(strJson); var x0 = new WebReference.UserRes[1]; var y0 = new WebReference.UserRes() { id = Helper.HasProperty(newForm, "id") ? newForm.id : 0, user_kod = newForm.user_kod, user_ad = newForm.user_ad, user_soyad = newForm.user_soyad, user_sifre = newForm.user_sifre != ret[0].user_sifre ? Helper.Md5Hash(newForm.user_sifre.ToString()) : ret[0].user_sifre, durum = Helper.HasProperty(newForm, "durum") ? newForm.durum : false }; x0[0] = y0; var z0 = Helper.GetWebService().InsertPortalUSer(x0); if (!z0.Result) { throw new Exception(z0.Message); } }