protected void Button2_Click(object sender, EventArgs e) { exp[0] = DropDownList5.SelectedItem.ToString(); exp[1] = DropDownList1.SelectedItem.ToString() + "-" + DropDownList2.SelectedItem.ToString(); if (CheckBox1.Checked == true) { exp[2] = "currently working"; } else { exp[2] = DropDownList3.SelectedItem.ToString() + "-" + DropDownList4.SelectedItem.ToString(); } exp[3] = TextBox3.Text; salary[2] = Session["c_img_id"].ToString(); salary[1] = TextBox6.Text; salary[0] = TextBox5.Text; string s; updateclass uc = new updateclass(); s = uc.update_experience(exp); s = s + "/ " + uc.update_salary(salary); Response.Write(s); } //EVENT END................
public static void databaseupdate() { if (updatedata == null) { updatedata = new updateclass(); updatedata.download = "http://data.pryx.net/UC%20Uninstaller/update/"; } sqlite.Shutdown(); using (WebClient Client = new WebClient()) { if (File.Exists(Application.StartupPath + @"\uninstaller.udb")) { File.Delete(Application.StartupPath + @"\uninstaller.udb"); } Client.DownloadFile(updatedata.download + "uninstaller.udb", "uninstaller.udb"); } dbconnect(); sqlite.Close(); }
}//btnevent end................................... protected void Button2_Click(object sender, EventArgs e) { string s = ""; string[] ed = new string[6]; ed[1] = TextBox5.Text; ed[0] = gradesfinder(ed[1]); ed[2] = TextBox3.Text; ed[3] = DropDownList2.SelectedItem.ToString() + "-" + DropDownList1.SelectedItem.ToString(); if (CheckBox1.Checked == true) { ed[4] = "In process"; } else { ed[4] = DropDownList4.SelectedItem.ToString() + "-" + DropDownList3.SelectedItem.ToString(); } ed[5] = DropDownList5.SelectedItem.ToString(); if (DropDownList5.SelectedIndex == 0) { updateclass uc = new updateclass(); s = uc.update_education("update_tbl_scc_record", "@ssc_Grades", "@ssc_percentage", "@ssc_institute", "@scc_duration", "@scc_duration_END", ed, "@ssc_degree"); } else if (DropDownList5.SelectedIndex == 1) { updateclass uc = new updateclass(); s = uc.update_education("update_hsc_record", "@hsc_Grades", "@hsc_percentage", "@hsc_institute", "@hcc_duration", "@HSC_duration_END", ed, "@hsc_degree"); } else if (DropDownList5.SelectedIndex == 2) { updateclass uc = new updateclass(); s = uc.update_education("update_grad_record", "@grad_Grades", "@grad_percentage", "@grad_institute", "@grad_duration", "@grad_duration_END", ed, "@grad_degree"); } else if (DropDownList5.SelectedIndex == 3) { updateclass uc = new updateclass(); s = uc.update_education("update_masters_record", "@masters_Grades", "@masters_percentage", "@masters_institute", "@masters_duration", "@masters_duration_END", ed, "@masters_degree"); } Label1.Text = s; } //btnevent end...................................
public static Task <updateclass> updatecheck(bool asynchron) { return(Task.Run(() => { if (lastcheck.Enabled == false) { lastcheck.Interval = 500; lastcheck.Enabled = true; if (network()) { string URL = "http://uninstaller.pryx.net/update.php"; WebClient webClient = new WebClient(); string json = new JavaScriptSerializer().Serialize(new { program = System.Reflection.Assembly.GetEntryAssembly().GetName().Version.ToString().Replace(".", ""), database = database_ver.Replace(".", ""), beta = false }); NameValueCollection post = new NameValueCollection(); post["json"] = json; byte[] responseBytes = webClient.UploadValues(URL, "POST", post); string responsefromserver = Encoding.UTF8.GetString(responseBytes); webClient.Dispose(); JavaScriptSerializer ser = new JavaScriptSerializer(); updatedata = ser.Deserialize <updateclass>(responsefromserver); return updatedata; } else { updatedata = new updateclass(); updatedata.server_status = "down"; return updatedata; } } else { return updatedata; } })); }