protected void btncrete_Click(object sender, EventArgs e) { BLcode b = new BLcode(); b.UserID = txtUsername.Text; if (b.CallCheckUser()) { Label2.ForeColor = System.Drawing.Color.Red; Label2.Visible = true; Label2.Text = "user name is not available please choose another name"; } else { b.Password = txtPassword.Text; b.OrgName = txtOrgNmae.Text; b.Area = txtArea.Text; b.Address = txtAddress.Text; b.City = txtCity.Text; b.ContactPhones = txtContactno.Text; b.Squestion = ddlSQuestion.SelectedItem.ToString(); b.Answer = txtAnswer.Text; b.CallCreateNewUser(); Label2.ForeColor = System.Drawing.Color.Green; Label2.Text = "Your account is created pleases click below link to login"; Label2.Visible = true; HyperLink1.Visible = true; } }
protected void btnsubmit_Click(object sender, EventArgs e) { BLcode bcobj = new BLcode(); bcobj.UserID = txtUser.Text; bcobj.Password = txtPassword.Text; HttpCookie cookieobjectuserid = new HttpCookie("userid"); cookieobjectuserid.Value = txtUser.Text; Response.Cookies.Add(cookieobjectuserid); if (bcobj.CallUserValidation()) { bcobj.CallInsertIntoLogsTable(); DataSet ds = bcobj.CallUserInfo(); Session["ds"] = ds; Response.Redirect("AfterLogin.aspx"); } else { Label2.Visible = true; Label2.Text = "pls check the userid and Password"; } }
protected void LoadData() { b = new BLcode(); b.UserID = Request.Cookies["userid"].Value; ds = b.CallSelectData(); GridView1.DataSource = ds.Tables[1]; GridView1.DataBind(); }
protected void Button1_Click(object sender, EventArgs e) { BLcode b = new BLcode(); b.BGroup = ddlGroup.Text; b.BankName = txtBankName.Text; b.Stock = int.Parse(txtStock.Text); b.UserID = Request.Cookies["userid"].Value; b.CallInsertIntoBloodBanks(); LoadData(); }
protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e) { Label l = (Label)GridView1.Rows[e.RowIndex].FindControl("lblID"); BLcode b = new BLcode(); b.UserID = Request.Cookies["userid"].Value; b.ID = int.Parse(l.Text); b.CallDeleteFromtblBloodBanks(); GridView1.EditIndex = -1; LoadData(); }
protected void Button1_Click(object sender, EventArgs e) { BLcode b = new BLcode(); b.BGroup = ddlBloodGoup.Text; b.City = ddlCity.Text; DataSet ds = b.CallBloodBankSearch(); GridView1.DataSource = ds; GridView1.DataBind(); }
protected void Button1_Click(object sender, EventArgs e) { //TextBox tb = Session["user"] as TextBox; b = new BLcode(); b.MedicineName = TextBox2.Text; b.Dosage = TextBox3.Text; b.Stock = int.Parse(TextBox4.Text); b.UserID = Request.Cookies["userid"].Value.ToString(); b.CallInsertIntoMedicineTable(); LoadData(); }
protected void btnUpdate_Click(object sender, EventArgs e) { BLcode b = new BLcode(); b.UserID = Session["a"].ToString(); b.OrgName = txtOrgname.Text; b.Area = txtArea.Text; b.Address = txtAddress.Text; b.City = txtCity.Text; b.ContactPhones = txtPhone.Text; lblMsg.Text = b.CallUpdateUserInfo(); }
protected void Button1_Click(object sender, EventArgs e) { BLcode b = new BLcode(); b.City = DropDownList1.Text; b.MedicineName = TextBox1.Text; b.Dosage = TextBox2.Text; DataSet ds = b.CallMedicineSearch(); GridView1.DataSource = ds; GridView1.DataBind(); }
protected void SelectDataGv2() { GridView1.Visible = false; GridView2.Visible = true; GridView1.Visible = false; BLcode b = new BLcode(); DataSet ds = b.CallSelectAllReadQueries(); GridView2.DataSource = ds; GridView2.DataBind(); btnSend.Visible = false; txtReply.Visible = false; txtTo.Visible = false; Label2.Visible = false; }
protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e) { GridView1.Visible = true; Label l1 = (Label)GridView1.Rows[e.RowIndex].FindControl("lblUID"); Label l2 = (Label)GridView1.Rows[e.RowIndex].FindControl("lblQryID"); BLcode b = new BLcode(); b.QueryID = l2.Text; b.UserID = l1.Text; b.CallDeleteSelectedQueries(); SelectDataGV1(); }
protected void btnSend_Click(object sender, EventArgs e) { BLcode b = new BLcode(); b.UserMessage = TextBox1.Text; b.UserID = Request.Cookies["userid"].Value; b.CallInsrtIntoQueries(); TextBox1.Visible = false; btnSend.Visible = false; lblTypeqry.Visible = false; lblDoYou.Visible = true; btnNo.Visible = true; btnYes.Visible = true; }
protected void Button1_Click(object sender, EventArgs e) { TextBox1.Visible = false; btnSend.Visible = false; lblDoYou.Visible = true; btnYes.Visible = true; btnNo.Visible = true; GridView1.Visible = true;; BLcode b = new BLcode(); b.UserID = Request.Cookies["userid"].Value; DataSet ds = b.CallSelectReplyQueries(); GridView1.DataSource = ds; GridView1.DataBind(); }
protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e) { b = new BLcode(); TextBox t1 = (TextBox)GridView1.Rows[e.RowIndex].FindControl("txt1"); TextBox t2 = (TextBox)GridView1.Rows[e.RowIndex].FindControl("txt2"); TextBox t3 = (TextBox)GridView1.Rows[e.RowIndex].FindControl("txt3"); Label lbl = (Label)GridView1.Rows[e.RowIndex].FindControl("lbl4"); b.MedicineName = t1.Text; b.Dosage = t2.Text; b.Stock = int.Parse(t3.Text); b.UserID = Request.Cookies["userid"].Value; b.ID = int.Parse(lbl.Text); b.CallUpdateMedicines(); b.CallSelectData(); GridView1.EditIndex = -1; LoadData(); }
protected void btnSubmit_Click(object sender, EventArgs e) { string Password; BLcode b = new BLcode(); b.UserID = txtUserName.Text; b.Answer = txtAnswer.Text; b.Squestion = ddlSQuestion.SelectedItem.ToString(); Password = b.CallGivePassword(); if (Password == "") { lblMessage.Text = "Details are not matching we can't provide your password with this details"; } else { lblMessage.Text = "Your Password is :" + Password; } }
protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e) { TextBox txt1 = (TextBox)GridView1.Rows[e.RowIndex].FindControl("txtBgroup"); TextBox txt2 = (TextBox)GridView1.Rows[e.RowIndex].FindControl("txtStock"); Label lbl = (Label)GridView1.Rows[e.RowIndex].FindControl("lblID"); BLcode b = new BLcode(); b.BGroup = txt1.Text; b.Stock = int.Parse(txt2.Text); b.UserID = Request.Cookies["userid"].Value; b.ID = int.Parse(lbl.Text); b.CallUpdateBloodBanks(); //SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["Googleconnectionstring"].ToString()); //SqlCommand cmd = new SqlCommand(); //cmd.Connection = con; //cmd.CommandText = "update tblBloodBanks set BGroup='" + txt1.Text + "', Stock=" + txt2.Text+" where UserID='"+Request.Cookies["userid"].Value+"'"; GridView1.EditIndex = -1; LoadData(); }
protected void btnSend_Click(object sender, EventArgs e) { BLcode b = new BLcode(); b.UserID = txtTo.Text; b.QueryID = txtQryID.Text; b.ReplyText = txtReply.Text; b.CallReplyQueries(); Page_Load(sender, e); if (temp == 1) { GridView1.Visible = false; } Label lb = new Label(); lb.ForeColor = System.Drawing.Color.Green; lb.Text = "Message Sent Successfully"; Panel2.Controls.Add(lb); txtReply.Text = ""; }
protected void btnDRead_Click(object sender, EventArgs e) { BLcode b = new BLcode(); b.CallDeleteAllReadQueries(); }