protected void adminJoinUs_Click(object sender, EventArgs e) { if (signupcitylist.SelectedValue != "-1" && signupdistrictlist.SelectedValue != "-1") { using (SqlConnection connection = new SqlConnection(connectionString)) { SqlCommand command = new SqlCommand("EXEC CheckUsername '" + adminsignupusername.Text + "'", connection); connection.Open(); if (command.ExecuteScalar() == null) { Admindublicatelabel.Visible = false; SqlCommand command2 = new SqlCommand("EXEC InsertUser '" + adminsignupusername.Text + "','" + adminsignuppassword1.Text + "'," + signupcitylist.SelectedItem.Value + "," + signupdistrictlist.SelectedItem.Value + ",'" + adminemailtextbox1.Text + "','" + adminphonetextbox.Text + "'," + 1 + "," + 0, connection); command2.ExecuteReader(); Admindublicatelabel.Visible = false; Response.Write("<script>alert('Succesfull.');</script>"); adminsignupusername.Text = ""; adminemailtextbox1.Text = ""; adminemailtextbox2.Text = ""; adminphonetextbox.Text = ""; MultiView2.SetActiveView(emptyView); } else { Admindublicatelabel.Visible = true; } } } }
protected void Post_Payment_Button_Click(object sender, EventArgs e) { PaymentForm1.Clear_Payment_Form(); PaymentForm1.Set_Customer_Id = CustomerId.Value; PaymentForm1.Set_Payment_Amount = CustomerControl1.Get_Due_Amount; MultiView2.SetActiveView(Payments_View); }
protected void grdvResult_OnRowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName.Equals("Select")) { MultiView2.SetActiveView(viewDetails); } }
protected void AdminSignUpButton_Click(object sender, EventArgs e) { if (MultiView2.GetActiveView() == AdminSignUp) { MultiView2.SetActiveView(emptyView); } else { MultiView2.SetActiveView(AdminSignUp); } using (SqlConnection connection = new SqlConnection(connectionString)) { SqlCommand command = new SqlCommand("EXEC ListAllCities", connection); connection.Open(); SqlDataReader reader = command.ExecuteReader(); signupcitylist.DataSource = reader; signupcitylist.DataTextField = "Name"; signupcitylist.DataValueField = "ID"; signupcitylist.DataBind(); } using (SqlConnection connection = new SqlConnection(connectionString)) { signupdistrictlist.Items.Clear(); SqlCommand command = new SqlCommand("EXEC ListAllDistrictsWithCity " + signupcitylist.SelectedItem.Value, connection); connection.Open(); SqlDataReader reader = command.ExecuteReader(); signupdistrictlist.DataSource = reader; signupdistrictlist.DataTextField = "Name"; signupdistrictlist.DataValueField = "ID"; signupdistrictlist.DataBind(); } }
protected void Button1_Click(object sender, EventArgs e) { GridView1.DataSource = null; GridView1.DataBind(); statementError.Text = ""; string AccountNumber = TextBox2.Text.ToString(); string Start = DropDownList2.Text.ToString(); string End = DropDownList3.Text.ToString(); if (String.IsNullOrEmpty(Start) | String.IsNullOrEmpty(End)) { statementError.Text = "Please fill in the dates!"; statementError.Style.Add("color", "red"); } else { DataTable dt = pegpay.GetStatement(AccountNumber, DateTime.Parse(Start), DateTime.Parse(End)); if (dt.Rows.Count > 0) { GridView1.DataSource = dt; GridView1.DataBind(); MultiView2.SetActiveView(View2); } else { //Response.Write("Something went wrong!!"); statementError.Text = "Currently no transactions for this account!"; statementError.Style.Add("color", "red"); } } }
protected void companyNextPage_Click(object sender, EventArgs e) { MultiView2.SetActiveView(CompanyInformation); password = companysignuppassword1.Text; companysignuppassword1.Attributes.Add("value", password); companysignuppassword2.Attributes.Add("value", password); }
protected void userSignUpClick(object sender, EventArgs e) { if (userCityList.SelectedValue != "-1" && UserDistrictList.SelectedValue != "-1") { using (SqlConnection connection = new SqlConnection(connectionString)) { SqlCommand command = new SqlCommand("EXEC CheckUsername '" + usersignupusername.Text + "'", connection); connection.Open(); if (command.ExecuteScalar() == null) { userDublicateLabel.Visible = false; SqlCommand command2 = new SqlCommand("EXEC InsertUser '" + usersignupusername.Text + "','" + usersignuppassword1.Text + "'," + userCityList.SelectedItem.Value + "," + UserDistrictList.SelectedItem.Value + ",'" + usersignupemail1.Text + "','" + usersignupphone.Text + "'," + 3 + "," + 0, connection); command2.ExecuteReader(); userDublicateLabel.Visible = false; Response.Write("<script>alert('Succesfull.');</script>"); usersignupusername.Text = ""; usersignupemail1.Text = ""; usersignupemail2.Text = ""; usersignupphone.Text = ""; MultiView2.SetActiveView(emptyView); } else { userDublicateLabel.Visible = true; } } } }
protected void Due_Orders_Click(object sender, EventArgs e) { SqlDataSource1.SelectParameters["P_USER_ID"].DefaultValue = CustomerId.Value; SqlDataSource1.SelectParameters["P_DUE_ORDER"].DefaultValue = "1"; SqlDataSource1.DataBind(); Orders_GridView.DataBind(); MultiView2.SetActiveView(AllOrdersView); }
protected void DataGrid1_ItemCommand(object source, DataGridCommandEventArgs e) { Label1.Text = e.Item.Cells[0].Text; TextBox5.Text = e.Item.Cells[1].Text; TextBox1.Text = e.Item.Cells[2].Text; TextBox2.Text = e.Item.Cells[3].Text; MultiView2.SetActiveView(View8); }
/* protected void MultiView2_ActiveViewChanged(object sender, EventArgs e) * { * * }*/ protected void Button1_Click(object sender, EventArgs e) { SqlCommand cmd = new SqlCommand(); cmd.CommandText = "insert into amount values('" + id + "','" + Session["id"] + "','" + DropDownList1.Text + "','" + TextBox1.Text + "','" + TextBox2.Text + "')"; a.execute(cmd); MultiView2.SetActiveView(View11); }
protected void Button4_Click(object sender, EventArgs e) { SqlCommand cmd = new SqlCommand(); cmd.CommandText = "delete from amount where tid=" + Label1.Text + ""; a.execute(cmd); Response.Write("<script>alert('deleted')</script>)"); MultiView2.SetActiveView(View11); }
protected void Button3_Click(object sender, EventArgs e) { SqlCommand cmd = new SqlCommand(); cmd.CommandText = "update amount set houramount='" + TextBox3.Text + "',dayamount='" + TextBox4.Text + "' where tid=" + Label1.Text + " "; a.execute(cmd); Response.Write("<script>alert('updated')</script>)"); MultiView2.SetActiveView(View11); }
protected void View_Order_Button_Command(object sender, CommandEventArgs e) { MySqlConnection dbconn = new MySqlConnection(CommonClass.connectionstring); dbconn.Open(); OrderInfo2.Populate_Orders(dbconn, e.CommandArgument.ToString()); dbconn.Close(); MultiView2.SetActiveView(Order_Details_View); }
protected void lnkAmntMis_OnClick(object sender, EventArgs e) { MultiView2.SetActiveView(amountMismatch); if (cbxReconcile1.Checked) { cbxReconcile1.Checked = false; } txtDesc1.Text = ""; lblerr1.Text = ""; }
protected void Address_Book_Button_Click(object sender, EventArgs e) { MySqlConnection dbconn = new MySqlConnection(CommonClass.connectionstring); dbconn.Open(); AddressBook1.Set_User_Id = CustomerId.Value; AddressBook1.Load_Address(dbconn); dbconn.Close(); MultiView2.SetActiveView(Address_View); }
protected void Review_Button_Click(object sender, EventArgs e) { MultiView2.SetActiveView(Review_View); //Details_Button.CssClass = "btn"; //Review_Button.CssClass = "btn btn-primary"; Details_Button_Active_PlaceHolder.Visible = false; Details_Button_InActive_PlaceHolder.Visible = true; Review_Button_Active_PlaceHolder.Visible = true; Review_Button_InActive_PlaceHolder.Visible = false; }
protected void OrderForm1_OnSuccessOrder(object sender, EventArgs e) { MultiView2.SetActiveView(OrderSummaryView); MySqlConnection dbconn = new MySqlConnection(CommonClass.connectionstring); dbconn.Open(); OrderInfo1.Populate_Orders(dbconn, OrderForm1.OrderId); CustomerControl1.Get_Customer_Details(dbconn, CustomerId.Value); dbconn.Close(); }
protected void lnkDFnoRF_OnClick(object sender, EventArgs e) { MultiView2.SetActiveView(viewDFnoRF); if (cbxReconcile1.Checked) { cbxReconcile1.Checked = false; } txtDesc1.Text = ""; lblerr1.Text = ""; }
protected void grdvAmntMis_OnRowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName.Equals("Select")) { int index = Convert.ToInt32(e.CommandArgument); GridViewRow row = grdvAmntMis.Rows[index]; string _yrmo = row.Cells[1].Text; int _chq = Convert.ToInt32(row.Cells[2].Text); bindDetailAmntMis(_yrmo, _chq); MultiView2.SetActiveView(viewAmntMisDetails); } }
protected void rdbtn_Inventory_CheckedChanged(object sender, EventArgs e) { if (rdbtn_Inventory.Checked) { MultiView1.Visible = false; MultiView3.Visible = false; MultiView2.Visible = true; MultiView2.SetActiveView(InventoryView); ReportDataSource rds_Inventory = new ReportDataSource(); rds_Inventory.DataSourceId = "_MedicineLog_"; rds_Inventory.Name = "MedicineLog"; ObjectDataSource _MedicineLog_ = new ObjectDataSource("PaombongDataSetTableAdapters.MedicineLogTableAdapter", "GetData"); rds_Inventory.Value = _MedicineLog_; ReportPaombong.LocalReport.ReportPath = Server.MapPath("Report_MedicineLog.rdlc"); ReportPaombong.LocalReport.DisplayName = "PaombongMedicineLog"; ReportPaombong.LocalReport.DataSources.Clear(); ReportPaombong.LocalReport.DataSources.Add(rds_Inventory); ReportPaombong.LocalReport.Refresh(); ReportPaombong.Visible = true; Label4.Visible = true; Label5.Visible = true; ddlLogType.Visible = true; //From Other Type Of Reports //Reports Label1.Visible = false; Label2.Visible = false; Label3.Visible = false; DropDownList1.Visible = false; ddlQuarter.Visible = false; //Consultation Label6.Visible = false; rdbtn_Age.Visible = false; rdbtn_Barangay.Visible = false; rdbtn_Disease.Visible = false; rdbtn_Month.Visible = false; rdbtn_Year.Visible = false; Label7.Visible = false; DropDownList2.Visible = false; Label8.Visible = false; ddlDisease.Visible = false; Label9.Visible = false; ddlAge.Visible = false; Label10.Visible = false; ddlMonth.Visible = false; Label11.Visible = false; ddlYear.Visible = false; } }
protected void btnConfirm_Click(object sender, EventArgs e) { Entity result = bll.UpdateInjectionStatus(user.CompanyCode, lblID.Text, user.UserId); if (result.StatusCode != "0") { ShowMessage(result.StatusDesc, true); } else { ShowMessage("Injection has been Deleted Successfully", false); MultiView2.SetActiveView(EmptyView); } }
protected void grdvDFnoRF_OnRowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName.Equals("Select")) { int index = Convert.ToInt32(e.CommandArgument); GridViewRow row = grdvDFnoRF.Rows[index]; string _yrmo = row.Cells[1].Text; string _ssn = row.Cells[2].Text; string _dcn = row.Cells[3].Text; string _paiddt = row.Cells[4].Text; bindDetailDFnoRF(_yrmo, _dcn, _ssn, _paiddt); MultiView2.SetActiveView(viewDFnoRFDetails); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { MultiView2.SetActiveView(View11); SqlCommand cmd = new SqlCommand(); cmd.CommandText = "select max_id(tid) from amount"; id = a.max_id(cmd); cmd.CommandText = "select aname from auditorium where aid=" + Session["id"] + ""; DataTable dt = a.getdata(cmd); cmd.CommandText = "select * from amount"; DataGrid1.DataSource = a.getdata(cmd); DataGrid1.DataBind(); } }
protected void dataGridResults_RowCommand(object sender, GridViewCommandEventArgs e) { int index = 0; GridViewRow row; GridView grid = sender as GridView; index = Convert.ToInt32(e.CommandArgument); row = grid.Rows[index]; string CompanyCode = row.Cells[1].Text; string IncomeNo = row.Cells[2].Text; string Amount = row.Cells[3].Text; Label lblmsg = (Label)Master.FindControl("lblmsg"); if (e.CommandName.Equals("DeleteRecord")) { lblID.Text = IncomeNo; lblID.Visible = false; MultiView2.SetActiveView(ConfirmView); } else if (e.CommandName.Equals("EditRecord")) { if (IncomeNo != "") { if (ddType.SelectedValue == "Income") { Server.Transfer("~/AddIncome.aspx?IncomeID=" + IncomeNo + "&CompanyCode=" + CompanyCode + "&Amount=" + Amount); } else if (ddType.SelectedValue == "Expense") { Server.Transfer("~/AddExpense.aspx?ExpenseID=" + IncomeNo + "&CompanyCode=" + CompanyCode + "&Amount=" + Amount); } else { ShowMessage("No Record To Edit", true); } } else { bll.ShowMessage(lblmsg, "Income Missing details", true, Session); } } else { bll.ShowMessage(lblmsg, "Record Missing details", true, Session); } }
protected void Page_Load(object sender, EventArgs e) { if (Session.IsNewSession == true | User.Identity.Name == "") { Response.Redirect("Logout.aspx"); } if (HttpContext.Current.Session["username"] == null) { Response.Redirect("Logout.aspx"); } MultiView1.SetActiveView(ViewButtons); MultiView2.SetActiveView(View_Entry); MultiView3.SetActiveView(View_Table); MultiView4.SetActiveView(View_Vehicle_User); BindEmployeeDropDownList(); }
protected void companymenubutton_Click(object sender, EventArgs e) { companysignuppassword1.Attributes.Add("value", password); companysignuppassword2.Attributes.Add("value", password); if (companyCityList.SelectedValue != "-1" && CompanyDistrictList.SelectedValue != "-1") { using (SqlConnection connection = new SqlConnection(connectionString)) { SqlCommand command = new SqlCommand("EXEC CheckUsername '" + companysignupusername.Text + "'", connection); connection.Open(); if (command.ExecuteScalar() == null) { companyDublicateLabel.Visible = false; SqlCommand command2 = new SqlCommand("EXEC InsertUser '" + companysignupusername.Text + "','" + password + "'," + companyCityList.SelectedItem.Value + "," + CompanyDistrictList.SelectedItem.Value + ",'" + companysignupemail1.Text + "','" + companysignupphone.Text + "'," + 2 + "," + 0, connection); command2.ExecuteReader(); SqlCommand command3 = new SqlCommand("EXEC showIDbyUsername " + companysignupusername.Text, connection); int userID = ((int)command3.ExecuteScalar()); SqlCommand command4 = new SqlCommand("EXEC InsertCompany '" + companyinformationname.Text + "'," + userID + ",'" + companysignupemail1.Text + "'," + companysignupphone.Text + "," + CompanyDistrictList.SelectedItem.Value + "," + Convert.ToInt32(workstartlist.SelectedValue) + "," + Convert.ToInt32(workendlist.SelectedValue) + "," + Convert.ToInt32(companyservicetime.SelectedValue) + "," + Convert.ToInt32(companyminprice.SelectedValue) + "," + 0, connection); command4.ExecuteReader(); Admindublicatelabel.Visible = false; Response.Write("<script>alert('Succesfull.');</script>"); companysignupusername.Text = ""; companysignupemail1.Text = ""; companysignupemail2.Text = ""; companysignupphone.Text = ""; companyinformationname.Text = ""; MultiView2.SetActiveView(emptyView); } else { companyDublicateLabel.Visible = true; } } } }
protected void dataGridResults_RowCommand(object sender, GridViewCommandEventArgs e) { int index = 0; GridViewRow row; GridView grid = sender as GridView; index = Convert.ToInt32(e.CommandArgument); row = grid.Rows[index]; string CompanyCode = ""; string ClientID = row.Cells[1].Text; string CustomerName = row.Cells[2].Text; string PhoneNumber = row.Cells[4].Text; string IDNumber = row.Cells[6].Text; string status = row.Cells[11].Text; string Gender = row.Cells[8].Text; Label lblmsg = (Label)Master.FindControl("lblmsg"); if (e.CommandName.Equals("Details")) { if (IDNumber != "") { MultiView2.SetActiveView(DetailsView); exportSec.Visible = false; InterConnect.LeshLaonApi.ClientDetails Cli = bll.GetClientDetails(user, ClientID); imgUrlClientPhoto.Text = Cli.ClientPhoto; ImgUrlIDPhoto.Text = Cli.IDPhoto; imgUrlClientPhoto.Visible = false; ImgUrlIDPhoto.Visible = false; lblClientNo.Text = ClientID; lblClientName.Text = CustomerName; lblTelNo.Text = PhoneNumber; lblGender.Text = Gender; } else { bll.ShowMessage(lblmsg, "Client Missing details", true, Session); } } }
protected void btnOK1_Click(object sender, EventArgs e) { string _Id; lblFErr.Text = ""; try { string _notes = txtDesc1.Text; if (!cbxReconcile1.Checked) { lblerr1.Text = "* Required"; } else { _Id = dtvDFnoRF.Rows[2].Cells[1].Text; ClaimsRecon adObject = new ClaimsRecon(); adObject.updateForcedRecon(_Id, "DFnoRF", _notes, Session["userName"].ToString()); MultiView2.SetActiveView(viewDFnoRF); bindDFAging(); } } catch (Exception ex) { lblFErr.Text = ex.Message; } finally { if (cbxReconcile1.Checked) { cbxReconcile1.Checked = false; } txtDesc1.Text = ""; lblerr1.Text = ""; } }
protected void Page_Load(object sender, EventArgs e) { if (Session.IsNewSession == true | User.Identity.Name == "") { Response.Redirect("Logout.aspx"); } if (HttpContext.Current.Session["username"] == null) { Response.Redirect("Logout.aspx"); } if (string.IsNullOrEmpty(Request.QueryString["ID"]) == false) { if (Request.QueryString["ID"].ToString() == "ViewAccessory") { MultiView1.SetActiveView(ViewButtons); MultiView2.SetActiveView(ViewAccessory); lblMenu.Text = "/ <i class='fa fa-steam fa-fw'></i>Accessory : "; } else if (Request.QueryString["ID"].ToString() == "ViewAccessoryGroup") { MultiView1.SetActiveView(ViewButtons); MultiView2.SetActiveView(ViewAccessoryGroup); lblMenu.Text = "/ <i class='fa fa-cubes fa-fw'></i>Accessory Group : "; } else if (Request.QueryString["ID"].ToString() == "ViewVehicleAccessory") { MultiView1.SetActiveView(ViewNothing); MultiView2.SetActiveView(ViewVehicleAccessory); lblMenu.Text = "/ <i class='fa fa-car fa-fw'></i>Vehicle Accessory : "; } } //MultiView1.SetActiveView(ViewButtons); //MultiView2.SetActiveView(ViewAccessory); hidden_username.Value = HttpContext.Current.Session["username"].ToString(); }
protected void prevpage_Click(object sender, EventArgs e) { MultiView2.SetActiveView(CompanySignUp); companysignuppassword1.Attributes.Add("value", password); companysignuppassword2.Attributes.Add("value", password); }