protected void Page_Load(object sender, EventArgs e) { logic = new OurClients_Logic(); if (Request["Pics"] != null) { var s = JsonConvert.DeserializeObject <List <UploaderModel> >(Request["Pics"]); List <int> pics = new List <int>(); for (int i = 0; i < s.Count; i++) { pics.Add(Convert.ToInt32(s[i].idOfImg)); } Response.Write(logic.AddPic_Clients(pics)); } }
protected void Page_Load(object sender, EventArgs e) { logic = new OurClients_Logic(); if (Request["Pics"] != null) { var s = Request["Pics"].Split(','); List <int> pics = new List <int>(); for (int i = 0; i < s.Length; i++) { pics.Add(Convert.ToInt32(s[i])); } Response.Write(logic.AddPic_Clients(pics)); } }
protected void Page_Load(object sender, EventArgs e) { if (Session["Admin_Id"] != null) { OurClients_Logic ol = new OurClients_Logic(); string id = Request["idIMG"]; string result = ol.DeletePic_Clients(Convert.ToInt32(id)); if (result == "Success") { Response.Write("با موفقیت حذف شد"); } else { Response.Write("عدم توانایی در حذف"); } } else { Response.Write("عدم توانایی در حذف لطفا صفحه را رفرش کرده و دوباره تلاش فرمایید"); } }
protected void Page_Load(object sender, EventArgs e) { logic = new OurClients_Logic(); Models = logic.GetClients(); }