protected void Button1_Click(object sender, EventArgs e) { EmployeeClient.ServiceReference1.EmployeeServiceClient proxy = new EmployeeClient.ServiceReference1.EmployeeServiceClient("BasicHttpBinding_IEmployeeService"); string username = email.Text; string password = pass.Text; String result = proxy.login(username.ToString(), password.ToString()); if ((String.Compare(result, "false") == 1)) { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Username or PAssword May Incorrect !')", true); } else { Session["uid"] = result; ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Login Succesfully')", true); Response.Redirect("Home.aspx"); } // = Session["uid"].ToString() + "this is user id "; // Label4.Text = i++.ToString(); }
protected void btn_register_Click(object sender, EventArgs e) { //EmployeeClient.ServiceReference2.EmployeeServiceClient proxy = new // EmployeeClient.ServiceReference2.EmployeeServiceClient("BasicHttpBinding_IEmployeeService1"); EmployeeClient.ServiceReference1.EmployeeServiceClient proxy = new EmployeeClient.ServiceReference1.EmployeeServiceClient("BasicHttpBinding_IEmployeeService"); string fn = fnm.Text; string ln = lnm.Text; string mobile_no = mno.Text; string email = eid.Text; string password = pass.Text; string cpassword = cpass.Text; string ack = proxy.saveUser(fn, ln, mobile_no, email, password); if (0 == String.Compare(ack, "saved")) { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Record Inserted Successfully')", true); Response.Redirect("Login.aspx"); } else { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('something went wrong')", true); // Label3.Text = ack; } }
protected void Page_Load(object sender, EventArgs e) { uid = Convert.ToInt32(Session["uid"]); EmployeeClient.ServiceReference1.EmployeeServiceClient proxy = new EmployeeClient.ServiceReference1.EmployeeServiceClient("BasicHttpBinding_IEmployeeService"); Label2.Text = proxy.getName(uid); }
protected void Page_Load(object sender, EventArgs e) { proxy = new EmployeeClient.ServiceReference1.EmployeeServiceClient("BasicHttpBinding_IEmployeeService"); uid = Convert.ToInt32(Session["uid"]); DataSet dataSet = proxy.getOwnIncomeCategory(uid); DropDownList1.DataTextField = dataSet.Tables[0].Columns["oinc_name"].ToString(); DropDownList1.DataValueField = dataSet.Tables[0].Columns["oinc_Id"].ToString(); DropDownList1.DataSource = dataSet.Tables[0]; DropDownList1.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { EmployeeClient.ServiceReference1.EmployeeServiceClient proxy = new EmployeeClient.ServiceReference1.EmployeeServiceClient("BasicHttpBinding_IEmployeeService"); DataSet dataSet = proxy.addInncome(); DropDownList1.DataTextField = dataSet.Tables[0].Columns["inc_cat"].ToString(); DropDownList1.DataValueField = dataSet.Tables[0].Columns["incid"].ToString(); DropDownList1.DataSource = dataSet.Tables[0]; DropDownList1.DataBind(); }