/// <summary> /// Called when either the WebService or ERP-combobox are called and updates the displayarea with the retrieved data from the corresponding function/query in the comboboxes /// </summary> /// <param name="selectedComboBox"></param> /// <param name="sender"></param> private void HandleComboBoxSelectedIndexChanged(SELECTED_COMBOBOX selectedComboBox, object sender) { string selectedItem = ((ComboBox)sender).SelectedItem as string; object[][] data = null; localhost.WebService proxy; try { proxy = new localhost.WebService(); if (selectedComboBox == SELECTED_COMBOBOX.ERP) { data = proxy.GetERPMethodBasedOnDescriptionString(selectedItem); } else if (selectedComboBox == SELECTED_COMBOBOX.WEBSERVICE) { data = proxy.GetList(selectedItem, true); } } catch (WebException we) { this.HandleWebserviceException(we); } if (data != null) { this.GUIMain.SetWebserviceAndErpData(data); } }
protected void showFoodStation(object sender, EventArgs e) { localhost.WebService food = new localhost.WebService(); FoodGrid.DataSource = food.getFoodStation(); FoodGrid.DataBind(); }
protected void Add_note_Click(object sender, EventArgs e) { localhost.WebService webService = new localhost.WebService(); string note_name = Note_name.Text; string desc_name = Note_description.Text; // Item.save_Item = webService.Add_note(note_name, desc_name); var Saver = webService.Add_note(note_name, desc_name); //using (StreamWriter sw = new StreamWriter("data.txt", true, System.Text.Encoding.Default)) // { // sw.WriteLine(Saver.); // } string value = "<ul>"; foreach (var i in Saver) { value += "<li>" + i.Name_note + "<br><br>" + i.Description_note + "</li>"; } Status.Text = value + "</ul>"; // Response.Redirect("~/WebForm.aspx"); }
protected void Find_Note_Click(object sender, EventArgs e) { localhost.WebService webService = new localhost.WebService(); var Saver = webService.Find_note(Find_note_field.Text); Name_note_field.Text = Saver.Name_note; Description_note_field.Text = Saver.Description_note; }
protected void Page_Load(object sender, EventArgs e) { localhost.WebService dt = new localhost.WebService(); //MyWS dt = new MyWS(); DateTime[] dt_arr = dt.GetDateTimes(); string[] date = dt_arr[1].ToString().Split(' '); Label4.Text = date[0]; }
protected void Button1_Click(object sender, EventArgs e) { localhost.WebService ws = new localhost.WebService(); int tam = ws.insertNhomTaiKhoan(IDnhom.Text, tennhom.Text, quyentruycap.Text, thongtinnhom.Text); if (tam > 0) { Response.Write("<script>alert(Record insert successfuly)</script>"); } }
protected void Button1_Click(object sender, EventArgs e) { localhost.WebService ws = new localhost.WebService(); int tam = ws.updateSach(IDSach.Text, tensach.Text, idtheloai.Text, soluongtong.Text, loigioithieu.Text); if (tam > 0) { Response.Write("<script>alert(Record insert successfuly)</script>"); } }
protected void Button1_Click(object sender, EventArgs e) { localhost.WebService ws = new localhost.WebService(); int tam = ws.UpdateNhanVien(IDnhanvien.Text, hoten.Text, tuoi.Text, anh.Text); if (tam > 0) { Response.Write("<script>alert(Record insert successfuly)</script>"); } }
protected void Button1_Click(object sender, EventArgs e) { localhost.WebService ws = new localhost.WebService(); int tam = ws.updateHoaDonXuat(IDhd.Text, IDnv.Text, ngaylap.Text, IDncc.Text); if (tam > 0) { Response.Write("<script>alert(Record insert successfuly)</script>"); } }
protected void Button1_Click(object sender, EventArgs e) { localhost.WebService ws = new localhost.WebService(); int tam = ws.deleteHoaDonNhap(IDhd.Text); if (tam > 0) { Response.Write("<script>alert(Record insert successfuly)</script>"); } }
protected void Button1_Click(object sender, EventArgs e) { localhost.WebService ws = new localhost.WebService(); int tam = ws.insertTheLoaiSach(IDtheloai.Text, tentheloai.Text); if (tam > 0) { Response.Write("<script>alert(Record insert successfuly)</script>"); } }
protected void Button1_Click(object sender, EventArgs e) { localhost.WebService ws = new localhost.WebService(); int tam = ws.insertNhaXuatBan(idNXB.Text, tenNXB.Text, diachi.Text); if (tam > 0) { Response.Write("<script>alert(Record insert successfuly)</script>"); } }
protected void Button1_Click(object sender, EventArgs e) { localhost.WebService ws = new localhost.WebService(); int tam = ws.UpdateTaiKhoan(IDtaikhoan.Text, tentaikhoan.Text, loai.Text, email.Text, sdt.Text, diachi.Text, idnhom.Text); if (tam > 0) { Response.Write("<script>alert(Record insert successfuly)</script>"); } }
protected void Button3_Click(object sender, EventArgs e) { string a = DropDownList3.SelectedItem.ToString(); string b = DropDownList4.SelectedItem.ToString(); string re = ""; localhost.WebService service = new localhost.WebService(); re = service.選(a, b); Label18.Text = re; }
protected void Button1_Click(object sender, EventArgs e) { localhost.WebService ws = new localhost.WebService(); int tam = ws.updateChiTietSach(IDSach.Text, idNXB.Text, soluong.Text, anh.Text, giaban.Text); if (tam > 0) { Response.Write("<script>alert(Record insert successfuly)</script>"); } }
protected void Button1_Click(object sender, EventArgs e) { localhost.WebService web = new localhost.WebService(); var Saver = web.Items_get(); int index = 0; foreach (var i in Saver) { Output.Text += ++index + ". " + i.Name_note + ": " + i.Description_note + "\r\n"; } }
/// <summary> /// Loads the ERP and WebService comboboxes in the ERP and WS tab /// </summary> private void LoadErpAndWsComboBoxes() { try { localhost.WebService proxy = new localhost.WebService(); string[] wsMethods = proxy.GetTableNames(); string[] erpQueries = proxy.GetErpQueries(); this.GUIMain.SetWebserviceAndErpComboBoxValues(wsMethods, erpQueries); } catch (WebException we) { this.HandleWebserviceException(we); } }
/// <summary> /// Called when the user choses a file to be read through Webservice, creates a file picker dialog /// </summary> /// <param name="sender"></param> /// <param name="e"></param> public void HandleChooseFileWSClick(object sender, EventArgs e) { FolderBrowserDialog fbd = new FolderBrowserDialog(); OpenFileDialog ofd = new OpenFileDialog(); localhost.WebService proxy = new localhost.WebService(); ofd.Filter = "Text Fil (.txt)|*.txt"; ofd.Multiselect = false; if (ofd.ShowDialog() == DialogResult.OK) { string content = proxy.GetFileContent(ofd.FileName).Replace("\n", "\r\n"); this.GUIMain.SetFileContentWS(content); } }
protected void Page_Load(object sender, EventArgs e) { var ctrl = new WebControl(HtmlTextWriterTag.Div) { CssClass = "wrapper" }; ctrl.Attributes["style"] = "float:left;display:inline-block;margin:3px;"; string str = "SELECT ID From idTbl;"; string DbName = "IDmovie.mdb"; DataTable dt = new DataTable(); dt = Dbase.SelectFromTable(str, DbName); string id = ""; int i = 1; localhost.WebService wb = new localhost.WebService(); for (int j = 0; j < dt.Rows.Count; j++) { //hh = Imagename(j); id = dt.Rows[j][0].ToString(); // string[] items = {hh}; string posterUrl = IDimage.IsUrlExist(id, Server.MapPath("~/image/"), "~/image/"); //string posterUrl = wb.fillpicture(id); ImageButton imgbtn = new ImageButton { ImageUrl = Page.ResolveUrl(posterUrl), CssClass = "cool" }; imgbtn.Click += new ImageClickEventHandler(ImageButton1_Click); imgbtn.ID = i.ToString(); ctrl.Controls.Add(imgbtn); i++; } // replace with a placeHolder object PlaceHolder1.Controls.Add(ctrl); }
protected void Button1_Click(object sender, EventArgs e) { localhost.WebService web = new localhost.WebService(); TextBox2.Text = web.Find_note(TextBox1.Text).Name_note + "\n" + web.Find_note(TextBox1.Text).Description_note; }
protected void Button1_Click(object sender, EventArgs e) { localhost.WebService webService = new localhost.WebService(); ///Label.Text = "testing"; Response.Redirect("~/WebFormAddNote.aspx"); }
protected void Button1_Click(object sender, EventArgs e) { localhost.WebService web = new localhost.WebService(); web.Delete_note(TextBox1.Text); }
protected void Edit_note_button_Click(object sender, EventArgs e) { localhost.WebService webService = new localhost.WebService(); webService.Edit_note(webService.Find_note(Find_note_field.Text), Name_note_field.Text, Description_note_field.Text); }
protected void Button1_Click(object sender, EventArgs e) { localhost.WebService myService = new localhost.WebService(); AllUsers.Text = myService.GetUsers(); }
protected void Button2_Click(object sender, EventArgs e) { localhost.WebService webService = new localhost.WebService(); Response.Redirect("~/WebFormEditNote.aspx"); }
public static string f_check_user_role() { log.Debug("f_check_user_role called to check the role of the user."); string role = ""; try { // Fetch the email from Javascript through query string string email = HttpContext.Current.Request.QueryString["uid"].ToString(); localhost.WebService service = new localhost.WebService(); if (email != "") { DataTable dt = service.f_get_password_from_db(email); if (dt.Rows.Count > 0) { string password = dt.Rows[0]["password"].ToString(); DataTable userdetails = service.my_user_details(email, password); role = userdetails.Rows[0]["role"].ToString(); } HttpContext.Current.Session["user_role"] = role; } } catch (Exception ex) { string my_error_popup = "alert('Error in method [f_check_user_role] - " + ex.Message.ToString() + "');"; System.Web.HttpContext.Current.Response.Write("<SCRIPT LANGUAGE='JavaScript'>" + my_error_popup + "</SCRIPT>"); log.Error("Error in f_check_user_role", new Exception(ex.Message)); } return role; }
public static bool f_check_user_logged_in_from_facebook_first_time() { log.Debug("f_check_user_logged_in_from_facebook_first_time called to check the role of the user."); bool if_exists = false; try { // Fetch the email from Javascript through query string string email = HttpContext.Current.Request.QueryString["uid"].ToString(); localhost.WebService service = new localhost.WebService(); if (email != "") { DataTable dt = service.f_get_password_from_db(email); if (dt.Rows.Count > 0) { string password = dt.Rows[0]["password"].ToString(); if_exists = true; HttpContext.Current.Session["username"] = email; } else { if_exists = false; } } } catch (Exception ex) { string my_error_popup = "alert('Error in f_check_user_logged_in_from_facebook_first_time - " + ex.Message.ToString() + "');"; System.Web.HttpContext.Current.Response.Write("<SCRIPT LANGUAGE='JavaScript'>" + my_error_popup + "</SCRIPT>"); log.Error("Error in f_check_user_logged_in_from_facebook_first_time", new Exception(ex.Message)); } return if_exists; }