protected void Button2_Click(object sender, EventArgs e) { RadioButtonList1.ClearSelection(); DropDownList1.ClearSelection(); TextBox4.Text = ""; TextBox5.Text = ""; }
protected void Button1_Click(object sender, EventArgs e) { addValue(); Session["Qid"] = Convert.ToInt16(Session["Qid"]) + 1; int id = Convert.ToInt16(Session["Qid"]); //MAKING THE NEXT BUTTON VISIBLE AND INVISIBLE. if (id < GridView1.Rows.Count - 1) { Button1.Visible = true; } else { Button1.Visible = false; } //INCREAMENTING THE QUESTIONS. // Response.Write(Convert.ToString(id)); QuestionNo.Text = Convert.ToString(id + 1); QuestionID.Text = GridView1.Rows[id].Cells[0].Text; LabelQuestion.Text = GridView1.Rows[id].Cells[1].Text; RadioButtonList1.DataBind(); LoadButton(); }
protected void DropDownList3_SelectedIndexChanged(object sender, EventArgs e) { List <dynamic> dept = sc.getdept(DropDownList3.SelectedItem.Text).ToList(); RadioButtonList1.DataSource = dept; RadioButtonList1.DataTextField = "deptname"; RadioButtonList1.DataValueField = "deptcode"; RadioButtonList1.DataBind(); RadioButtonList1.SelectedIndex = 0; List <int> dis = sc.getdis(RadioButtonList1.SelectedValue); List <dynamic> disbursementitems = new List <dynamic>(); foreach (int i in dis) { List <dynamic> disitem = sc.getdisbursementitems(i).ToList(); disbursementitems.AddRange(disitem); } GridView1.DataSource = disbursementitems; GridView1.DataBind(); if (GridView1.Rows.Count != 0) { //getallocations(); GridView1.HeaderRow.Cells[4].Visible = false; for (int i = 0; i < GridView1.Rows.Count; i++) { GridView1.Rows[i].Cells[4].Visible = false; } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { DataSet ds = new DataSet(); string Path = Server.MapPath("~/App.xml"); ds.ReadXml(Path); DropDownList1.DataSource = ds.Tables[0]; DropDownList1.DataTextField = "Name"; DropDownList1.DataValueField = "Id"; DropDownList1.DataBind(); RadioButtonList1.DataSource = ds.Tables[0]; RadioButtonList1.DataTextField = "Name"; RadioButtonList1.DataValueField = "Id"; RadioButtonList1.DataBind(); ListBox1.DataSource = ds.Tables[0]; ListBox1.DataTextField = "Name"; ListBox1.DataValueField = "Id"; ListBox1.DataBind(); CheckBoxList1.DataSource = ds.Tables[0]; CheckBoxList1.DataTextField = "Name"; CheckBoxList1.DataValueField = "Id"; CheckBoxList1.DataBind(); } }
protected void Button1_Click(object sender, EventArgs e) { if (RadioButtonList1.SelectedItem == null) { ERRORmsg.Text = "Please Select a Candidate!"; } else { ERRORmsg.Text = ""; int cnt = 0; DataView dv = (DataView)SqlDataSource1.Select(DataSourceSelectArguments.Empty); if (dv == null) { //handle error } DataRow row = dv.Table.Rows[RadioButtonList1.SelectedIndex]; cnt = (int)row["Votes"]; cnt++; HiddenField1.Value = cnt.ToString(); SqlDataSource1.Update(); string url = "Votes.aspx"; Response.Redirect(url); RadioButtonList1.ClearSelection(); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { Panel1.Visible = false; Panel2.Visible = false; for (int i = 2017; i < 2050; i++) { DropDownList2.Items.Add(i.ToString()); } submodelid = (string)Session["submodel_id"]; colorid = (string)Session["colorid"]; dml ob = new dml(); DataTable dt = new DataTable(); dt = ob.get_detials(submodelid, colorid); if (dt.Rows.Count > 0) { Label2.Text = dt.Rows[0]["MODEL_NAME"].ToString(); Label3.Text = dt.Rows[0]["SUBMODEL_NAME"].ToString(); Label4.Text = dt.Rows[0]["TYPE_NAME"].ToString(); Label5.Text = dt.Rows[0]["COLOR_NAME"].ToString(); Label6.Text = dt.Rows[0]["PRICE"].ToString(); double d = Double.Parse(dt.Rows[0]["EXPECTED_DAYS"].ToString()); Label7.Text = Convert.ToString(Session["Adv"]); DateTime expdate = System.DateTime.Today.AddDays(d); Label1.Text = expdate.ToString("dd/MM/yyyy"); } RadioButtonList1.DataSource = ob.getPaymentDetails(); RadioButtonList1.DataTextField = "METHOD_NAME"; RadioButtonList1.DataValueField = "METHOD_ID"; RadioButtonList1.DataBind(); } }
protected void Button1_Click(object sender, EventArgs e) { if (RadioButtonList1.SelectedItem == null) { comment.Text = "Select a candidate, please!"; } else { int j = 0; DataView dv = (DataView)SqlDataSource1.Select(DataSourceSelectArguments.Empty); if (dv == null) { //handle error } //The select query has returned the desired row DataRow row = dv.Table.Rows[RadioButtonList1.SelectedIndex]; j = (int)row["Count"]; //comment.Text= RadioButtonList1.SelectedIndex.ToString(); j++; HiddenField1.Value = j.ToString(); SqlDataSource1.Update(); RadioButtonList1.ClearSelection(); Response.Redirect("Votes.aspx"); //comment.Text = j.ToString(); } }
protected void Page_Load(object sender, EventArgs e) { con.Open(); cmd1 = new SqlCommand("select NEWID() as random, * from cexam order by NEWID();", con); SqlDataReader rd1 = cmd1.ExecuteReader(); if (rd1.Read()) { Label1.Text = rd1["qstn"].ToString(); } con.Close(); con.Open(); str = Label1.Text.ToString(); cmd3 = new SqlCommand("select qstn, optn from example;", con); RadioButtonList1.DataSource = cmd3.ExecuteReader(); RadioButtonList1.DataTextField = "optn"; RadioButtonList1.DataValueField = "optn"; RadioButtonList1.DataBind(); con.Close(); }
private void reset() { TextBox2.Text = ""; TextBox3.Text = ""; TextBox4.Text = ""; TextBox5.Text = ""; TextBox6.Text = ""; TextBox7.Text = ""; TextBox8.Text = ""; TextBox9.Text = ""; TextBox10.Text = ""; TextBox11.Text = ""; TextBox15.Text = ""; TextBox16.Text = ""; TextBox17.Text = ""; TextBox18.Text = ""; TextBox19.Text = ""; RadioButtonList1.ClearSelection(); RadioButtonList2.ClearSelection(); RadioButtonList3.ClearSelection(); RadioButtonList5.ClearSelection(); DropDownList1.SelectedIndex = 0; DropDownList2.SelectedIndex = 0; DropDownList3.SelectedIndex = 0; DropDownList5.SelectedIndex = 0; }
public void DataBindEx(bool bIncludeAll) { BLL.T_SystemInfo_BLL sysBLL = new T_SystemInfo_BLL(); List<T_SystemInfo_MDL> sysList = sysBLL.GetModelList(" CurrentType='118' AND IsShow<>0"); for (int i1 = 0; i1 < sysList.Count; i1++) {//颜色显示 //sysList[i1].SystemInfoName = "<span style=\"background-color:" + sysList[i1].SystemInfoCode + "\">" + sysList[i1].SystemInfoName + "<span>"; sysList[i1].SystemInfoName = "<span><span style=\"background-color:" + sysList[i1].SystemInfoCode + ";width:20px\"> </span>" + sysList[i1].SystemInfoName + "</span>"; //<div style="width: 8px; background-color: #00FF00; float: left;" /> } if (bIncludeAll == true) { T_SystemInfo_MDL obj = new T_SystemInfo_MDL(); obj.SystemInfoID = 0; //obj.SystemInfoCode = ""; obj.SystemInfoName = "全部"; sysList.Insert(0, obj); } RadioButtonList1.DataTextField = "SystemInfoName"; RadioButtonList1.DataValueField = "SubType"; RadioButtonList1.DataSource = sysList; RadioButtonList1.DataBind(); if (sysList.Count > 0) { RadioButtonList1.Items[0].Selected = true; } }
private void question() { //if (count < 10) if (Convert.ToInt32(Label2.Text) < 10) { con.Open(); SqlDataAdapter da = new SqlDataAdapter("select q.qid,q.question,q.opt1,q.opt2,q.opt3,q.opt4,q.answer from questions as q,buffer as b where b.qid='" + qid[Convert.ToInt32(Label2.Text)] + "' and b.subject='" + selectedsubject + "' and b.qid=q.qid and b.subject=q.subject", con); DataSet ds = new DataSet(); da.Fill(ds); con.Close(); if (ds.Tables[0].Rows.Count > 0) { Label1.Text = ds.Tables[0].Rows[0]["question"].ToString(); Label9.Text = ds.Tables[0].Rows[0]["qid"].ToString(); RadioButtonList1.ClearSelection(); RadioButtonList1.Items.Clear(); RadioButtonList1.Items.Add(ds.Tables[0].Rows[0]["opt1"].ToString()); RadioButtonList1.Items.Add(ds.Tables[0].Rows[0]["opt2"].ToString()); RadioButtonList1.Items.Add(ds.Tables[0].Rows[0]["opt3"].ToString()); RadioButtonList1.Items.Add(ds.Tables[0].Rows[0]["opt4"].ToString()); } } }
protected void FormPrepare() { switch (tab) { case 1: RadioButtonList1.DataSource = AppEnum.GetGender(); RadioButtonList1.DataTextField = "value"; RadioButtonList1.DataValueField = "key"; RadioButtonList1.DataBind(); District2.IsShowLatLng = false; District2.IsShowOnlyChina = false; drpFateType.SelectedIndex = drpFateType.Items.IndexOf(drpFateType.Items.FindByValue(m_user.FateType.ToString())); drpBirthType.SelectedIndex = drpBirthType.Items.IndexOf(drpBirthType.Items.FindByValue(m_user.IsShowBirth.ToString())); if (m_user.Birth != AppConst.DateTimeNull) { DatePicker2.SelectedTime = m_user.Birth; } else { DatePicker2.SelectedTime = new DateTime(1990, 1, 1); } if (m_user.HomeTown != AppConst.IntNull) { District2.Area3SysNo = m_user.HomeTown; } if (m_user.Gender != AppConst.IntNull) { RadioButtonList1.SelectedIndex = RadioButtonList1.Items.IndexOf(RadioButtonList1.Items.FindByValue(m_user.Gender.ToString())); } txtIntro.Text = m_user.Intro; break; } }
protected void ddlRegions_SelectedIndexChanged(object sender, EventArgs e) { if (ddlRegions.SelectedValue != "0") { lblFeedback.Text = string.Empty; DataTable dt1 = new JpmmsClasses.BL.MainStreet().GetStreetsIRI(); RadioButtonList1.Items.Clear(); RadioButtonList1.Items.AddRange(new SharedClass().CreateRadioBtnSurveys(dt1.Rows[ddlRegions.SelectedIndex - 1][3].ToString())); RadioButtonList1.SelectedValue = dt1.Rows[ddlRegions.SelectedIndex - 1][2].ToString(); RadioButtonList1.DataBind(); gvRegionSamplesIRI.DataSource = new JpmmsClasses.BL.MainStreet().GetStreetsSampleDublicateIRI(ddlRegions.SelectedItem.Text, RadioButtonList1.SelectedValue); gvRegionSamplesIRI.DataBind(); if (gvRegionSamplesIRI.Rows.Count > 0) { lblFeedback0.Text = string.Empty; DataTable dt = new JpmmsClasses.BL.MainStreet().GetStreetsInfo(ddlRegions.SelectedItem.Text, RadioButtonList1.SelectedValue); DataColumn d = new DataColumn("DublicateIRI"); d.DefaultValue = gvRegionSamplesIRI.Rows.Count; dt.Columns.Add(d); gvRegionIRI.DataSource = dt; gvRegionIRI.DataBind(); } else { lblFeedback0.Text = Feedback.NoData(); gvRegionIRI.DataSource = null; gvRegionIRI.DataBind(); } } }
protected void Page_Load(object sender, EventArgs e) { if (Session["indirim"] != null) { h1Baslik.InnerText = Session["indirim"].ToString(); } //Cookie OKUMA //if (Request.Cookies["MyCookie"] != null) //{ // HttpCookie kukim = Request.Cookies["MyCookie"]; // LabelAd.Text = kukim["Ad"]; // LabelSepet.Text = kukim["Sepet"]; //} if (Request.Cookies["MyCookie"] != null) { LabelAd.Text = Request.Cookies["MyCookie"]["Ad"]; LabelSepet.Text = Request.Cookies["MyCookie"]["Sepet"]; } if (IsPostBack == false)// if(!IsPostBack) { CheckBoxList1.DataSource = repoBrand.GetAll().OrderBy(o => o.Name).ToList(); CheckBoxList1.DataBind(); RadioButtonList1.DataSource = repoBrand.GetAll().OrderBy(o => o.Name).ToList(); RadioButtonList1.DataBind(); DropDownList1.DataSource = repoBrand.GetAll().OrderBy(o => o.Name).ToList(); DropDownList1.DataBind(); GridView1.DataSource = repoBrand.GetAll().OrderBy(o => o.Name).ToList(); GridView1.DataBind(); } }
protected override void OnPreRender(EventArgs e) { if (!IsPostBack) { string[] colAlias = SampleConstants.BoundDataColumns; ArrayList ThemeList = new ArrayList(); ThemesAndModifiers.FillThemeNames(ThemeList); DropDownList1.Items.Clear(); DropDownList1.DataSource = ThemeList; DropDownList1.DataBind(); // Prepare CheckBoxes, RadioButtons and note label contents. CheckBoxList1.DataSource = colAlias; CheckBoxList1.DataBind(); CheckBoxList1.Visible = this.IsCheckBoxListVisible(ThemeList[0] as string); RadioButtonList1.DataSource = colAlias; RadioButtonList1.DataBind(); RadioButtonList1.Visible = this.IsRadioButtonListVisible(ThemeList[0] as string); Label2.Visible = this.IsNoteLabelVisible(ThemeList[0] as string); Label2.Text = "Please select two columns from below checkboxes."; DropDownList1.Items.Clear(); DropDownList1.DataSource = ThemeList; DropDownList1.DataBind(); } }
protected void btnQuitarDetalle_Click(object sender, EventArgs e) { LoDet.Eliminar_Detalles(Convert.ToString(ddlProductos.SelectedValue)); GridViewDetalleVenta.DataSource = LoDet.Consultar_Detalles(); GridViewDetalleVenta.DataBind(); bool est = false; foreach (GridViewRow row in GridViewDetalleVenta.Rows) { tot += (Convert.ToInt32(row.Cells[5].Text)); txtTotalPagar.Text = "" + tot; est = true; } if (est == false) { tot = 0; txtTotalPagar.Text = "" + tot; } btnModificarDetalle.Visible = false; btnQuitarDetalle.Visible = false; btnAgregarDetalle.Visible = true; txtCAntidad.Text = ""; ddlProductos.Items.Clear(); ddlCategoria.Items.Clear(); cargarProductos(); txtCAntidad.Text = "0"; txtPrecioVenta.Text = ""; cargarCategorias(); lbtnDescuento.Enabled = true; RadioButtonList1.ClearSelection(); }
protected void reset(int flag) { if (flag == 1) { DropDownList2.SelectedIndex = DropDownList6.SelectedIndex = DropDownList4.SelectedIndex = DropDownList5.SelectedIndex = 0; TextBox7.Text = TextBox4.Text = TextBox5.Text = TextBox2.Text = TextBox6.Text = TextBox3.Text = ""; } if (flag == 2) { DropDownList6.Items.Clear(); DropDownList6.Items.Add(new ListItem("1", "1")); DropDownList6.Items.Add(new ListItem("General", "0")); DropDownList2.Items.Clear(); DropDownList2.Items.Add(new ListItem("1", "1")); DropDownList2.Items.Add(new ListItem("General", "0")); Panel1.Visible = Panel2.Visible = false; GridView3.DataSource = null; GridView3.DataBind(); TextBox9.Text = ""; RadioButtonList1.ClearSelection(); DropDownList2.SelectedIndex = DropDownList6.SelectedIndex = DropDownList4.SelectedIndex = DropDownList5.SelectedIndex = 0; TextBox7.Text = TextBox4.Text = TextBox5.Text = TextBox2.Text = TextBox6.Text = TextBox3.Text = ""; } if (flag == 3) { DropDownList2.SelectedIndex = DropDownList1.SelectedIndex = 0; TextBox10.Text = TextBox11.Text = TextBox12.Text = ""; } }
protected void DropDownList1_SelectedIndexChanged(object sender, System.EventArgs e) { PrepareThemeAndModifierOptions(DropDownList1.SelectedValue); RadioButtonList1.ClearSelection(); CheckBoxList1.ClearSelection(); CleanUp(GetMapObj()); }
protected void Button1_Click(object sender, EventArgs e) { string username = ""; usr = TextBox1.Text + db.numpassword(5); username = db.extscalr("select username from tb_login where username='******' or email='" + TextBox3.Text + "'"); if (username == "") { pass = TextBox1.Text + db.MakePwd(5); if (FileUpload1.HasFiles) { str = "~/CEO/images/" + FileUpload1.FileName + "123"; FileUpload1.SaveAs(MapPath(str)); } string skey = db.MakePwd(3) + db.numpassword(4); bool b = db.extnon("insert into tb_manage_employee values('" + TextBox1.Text + "','" + TextBox3.Text + "','" + TextBox4.Text + "','" + usr + "','" + RadioButtonList1.SelectedItem.Text + "','" + TextBox2.Text + "','" + TextBox5.Text + "','" + str + "','','" + skey + "')"); bool c = db.extnon("insert into tb_login values('" + TextBox3.Text + "','" + usr + "','" + pass + "','" + 1 + "','user','')"); if (b == c == true) { TextBox1.Text = TextBox2.Text = TextBox3.Text = TextBox4.Text = TextBox5.Text = null; RadioButtonList1.ClearSelection(); ma.send_msg("Your secretKey", skey); RegisterStartupScript("", "<script Language=JavaScript>alert('Successfully Inserted')</Script>"); } } else { RegisterStartupScript("", "<script Language=JavaScript>alert('You Already have an account with this email address')</Script>"); } }
protected void Page_Load(object sender, EventArgs e) { string[] automotiveTypeNames = Enum.GetNames(typeof(AutomotiveTypes)); RadioButtonList1.RepeatDirection = RepeatDirection.Vertical; RadioButtonList1.DataSource = automotiveTypeNames; RadioButtonList1.DataBind(); }
protected void Button1_Click(object sender, EventArgs e) { eventsource.InsertParameters["event_title"].DefaultValue = TextBox7.Text.ToUpper().Trim(); eventsource.InsertParameters["event_start_date"].DefaultValue = TextBox10.Text.ToUpper().Trim(); eventsource.InsertParameters["event_end_date"].DefaultValue = TextBox12.Text.ToUpper().Trim(); eventsource.InsertParameters["event_end_time"].DefaultValue = TextBox24.Text.ToUpper().Trim(); eventsource.InsertParameters["event_start_time"].DefaultValue = TextBox11.Text.ToUpper().Trim(); eventsource.InsertParameters["event_place"].DefaultValue = CheckBoxList1.SelectedValue; eventsource.InsertParameters["event_capacity"].DefaultValue = TextBox15.Text.Trim(); eventsource.InsertParameters["multi_day_event"].DefaultValue = RadioButtonList1.SelectedValue; eventsource.InsertParameters["audio_visual"].DefaultValue = RadioButtonList2.SelectedValue; eventsource.InsertParameters["user_id"].DefaultValue = TextBox25.Text.Trim(); eventsource.Insert(); TextBox7.Text = string.Empty; TextBox10.Text = string.Empty; TextBox12.Text = string.Empty; TextBox24.Text = string.Empty; TextBox11.Text = string.Empty; TextBox5.Text = string.Empty; TextBox25.Text = string.Empty; TextBox2.Text = string.Empty; TextBox3.Text = string.Empty; TextBox6.Text = string.Empty; TextBox15.Text = string.Empty; TextBox8.Text = string.Empty; CheckBoxList1.ClearSelection(); RadioButtonList1.ClearSelection(); RadioButtonList2.ClearSelection(); }
protected void Page_Load(object sender, EventArgs e) { lblUser.Text = Session["UserName"].ToString(); if (Page.IsPostBack == false) { SqlConnection con = new SqlConnection(@"Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\OnilneTest.mdf;Integrated Security=True;User Instance=True"); string str = "select * from Test_Master"; SqlCommand cmd = new SqlCommand(str, con); con.Open(); SqlDataReader dr; dr = cmd.ExecuteReader(); RadioButtonList1.DataSource = dr; RadioButtonList1.DataTextField = "TestName"; RadioButtonList1.DataValueField = "TestId"; RadioButtonList1.DataBind(); } }
protected void Button3_Click(object sender, EventArgs e) { //開啟連線 SqlConnection conn = new SqlConnection(data); if (Session["Order_ID"] == null) { Session["Order_ID"] = 0; conn.Open(); // 可刪除訂單選項 SqlCommand cmd = new SqlCommand(); cmd.Connection = conn; cmd.CommandText = "Del_Order"; cmd.CommandType = CommandType.StoredProcedure; //宣告參數和給值 cmd.Parameters.Add("@Customer_ID", SqlDbType.Int); cmd.Parameters["@Customer_ID"].Value = Session["ID"]; cmd.Parameters.Add("@Order_ID", SqlDbType.Int); cmd.Parameters["@Order_ID"].Value = Session["Order_ID"]; SqlDataReader dr = cmd.ExecuteReader(); RadioButtonList1.DataSource = dr; RadioButtonList1.DataTextField = "可以刪除的訂單編號"; RadioButtonList1.DataBind(); dr.Close(); conn.Close(); } /* else * { * conn.Open(); * // 刪除訂單 * SqlCommand cmd = new SqlCommand(); * cmd.Connection = conn; * cmd.CommandText = "Del_Order"; * cmd.CommandType = CommandType.StoredProcedure; * //宣告參數和給值 * cmd.Parameters.Add("@Customer_ID", SqlDbType.Int); * cmd.Parameters["@Customer_ID"].Value = Session["ID"]; * cmd.Parameters.Add("@Order_ID", SqlDbType.Int); * cmd.Parameters["@Order_ID"].Value = Session["Order_ID"]; * cmd.ExecuteNonQuery(); * // 確認刪除狀況 * SqlCommand cmd_1 = new SqlCommand(); * cmd_1.Connection = conn; * cmd_1.CommandText = "Check_Del_Order"; * cmd_1.CommandType = CommandType.StoredProcedure; * //宣告參數和給值 * cmd_1.Parameters.Add("@Customer_ID", SqlDbType.Int); * cmd_1.Parameters["@Customer_ID"].Value = Session["ID"]; * cmd_1.Parameters.Add("@Order_ID", SqlDbType.Int); * cmd_1.Parameters["@Order_ID"].Value = Session["Order_ID"]; * SqlDataReader dr_1 = cmd_1.ExecuteReader(); * GridView2.DataSource = dr_1; * GridView2.DataBind(); * dr_1.Close(); * conn.Close(); * } */ }
protected void Button2_Click(object sender, EventArgs e) { Button1.BackColor = System.Drawing.Color.Silver; Button2.BackColor = System.Drawing.Color.Red; Panel1.Visible = false; Panel2.Visible = true; RadioButtonList1.ClearSelection(); }
protected void btnClear_Click(object sender, EventArgs e) { RadioButtonList1.ClearSelection(); RadioButtonList2.ClearSelection(); RadioButtonList3.ClearSelection(); RadioButtonList4.ClearSelection(); RadioButtonList5.ClearSelection(); }
protected void Button2_Click(object sender, EventArgs e) { DropDownList1.ClearSelection(); TextBox1.Text = ""; TextBox2.Text = ""; RadioButtonList1.ClearSelection(); DropDownList3.ClearSelection(); RadioButtonList2.ClearSelection(); }
protected void clear() { txtroomno.Text = ""; RadioButtonList1.ClearSelection(); RadioButtonList2.ClearSelection(); Image1.ImageUrl = ""; txtdesc.Text = ""; txtrate.Text = ""; }
protected async void Register_Click(object sender, EventArgs e) { FirebaseResponse respo = await client.GetAsync("contrequest"); CountRequest get = respo.ResultAs <CountRequest>(); string cn = (Convert.ToInt32(get.contr) + 1).ToString(); if (FileUpload1.HasFile) { string filepath = Path.Combine(Server.MapPath("~/requestimg"), FileUpload1.FileName); FileUpload1.SaveAs(filepath); var stream = File.Open(filepath, FileMode.Open); var task = new FirebaseStorage("irecycle-b0312.appspot.com").Child(FileUpload1.FileName).PutAsync(stream); task.Progress.ProgressChanged += (s, c) => Console.WriteLine($"Progress:{c.Percentage} %"); var dowenloadurl = await task; var bader = new Bader { EstablishName = name.Text, Phone = phon.Text, Address = addr.Text, RecycleType = RadioButtonList1.SelectedItem.Value, Weight = weight.Text, Type = type.SelectedItem.Value, CompanyName = "", CompanyPhone = "", CompanyAddress = "", TruckName = "", TruckPhone = "", TruckRequest = "", Username = Label1.Text, Date = DateTime.Now.ToString("yyyy-MM-dd"), RequestTime = "", SupmitTime = "", Imageurl = dowenloadurl, RequestType = "قيد المراجعة", Accept = "" }; SetResponse response = await client.SetAsync("Requests/" + cn, bader); Bader result = response.ResultAs <Bader>(); var obj = new CountRequest { contr = cn, }; SetResponse response1 = await client.SetAsync("contrequest", obj); // divexms.Visible = true; RadioButtonList1.ClearSelection(); type.ClearSelection(); weight.Text = ""; MessageBox.Show(GetLocalResourceObject("LabelResource18").ToString()); Response.Redirect("CustomerDefault.aspx", false); } }
protected void ddlMainStreets_SelectedIndexChanged(object o, Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs e) { DataTable dtx = new JpmmsClasses.BL.MainStreet().GetStreetsAssets(); RadioButtonList1.Items.Clear(); RadioButtonList1.Items.AddRange(new SharedClass().CreateRadioBtnSurveys(dtx.Rows[ddlMainStreets.SelectedIndex - 1][3].ToString())); RadioButtonList1.SelectedValue = dtx.Rows[ddlMainStreets.SelectedIndex - 1][2].ToString(); RadioButtonList1.DataBind(); }
//Add screen button protected void Unnamed1_Click(object sender, EventArgs e) { ShoppingCartActions actions = new ShoppingCartActions(); actions.AddToCart(RadioButtonList1.SelectedIndex + 1); TextBox1.Text = ""; RadioButtonList1.ClearSelection(); FileUpload1.Attributes.Clear(); }