Skip to content

Commit

Permalink
Minor Modifications
Browse files Browse the repository at this point in the history
  • Loading branch information
hbkysf27 committed May 17, 2022
1 parent 80fb5ec commit 9f32818
Show file tree
Hide file tree
Showing 29 changed files with 412 additions and 83 deletions.
Binary file modified .vs/RDA/v16/.suo
Binary file not shown.
28 changes: 28 additions & 0 deletions About Us.aspx
Original file line number Diff line number Diff line change
@@ -1,7 +1,35 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/HomeMaster.Master" AutoEventWireup="true" CodeBehind="About Us.aspx.cs" Inherits="RDA.About_Us" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">


<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">

<style>
body {
background: #edc0bf;
background: linear-gradient(90deg, #edc0bf 0,#c4caef 58%);
margin: 0;
font-family: 'Inter', sans-serif;
}
</style>





</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">



<center><img src="images/CS.JPG" class="img-fluid img-thumbnail" alt="this is a image" width="30%" r/></center>


Expand Down
26 changes: 23 additions & 3 deletions Driver Login.aspx.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,18 @@ public partial class Driver_Login : System.Web.UI.Page
{
string strcon = ConfigurationManager.ConnectionStrings["rdacon"].ConnectionString;
protected void Button1_Click(object sender, EventArgs e)
{
checktxt();
}

protected void Button2_Click(object sender, EventArgs e)
{
Response.Redirect("Driver Signup.aspx");
}



void loginfunc()
{
try
{
Expand Down Expand Up @@ -46,13 +58,21 @@ protected void Button1_Click(object sender, EventArgs e)
}
catch (Exception ex)
{
Response.Write("<script>alert('Exception Occured "+ex+"');</script>");
Response.Write("<script>alert('Exception Occured " + ex + "');</script>");
}
}

protected void Button2_Click(object sender, EventArgs e)

void checktxt()
{
Response.Redirect("Driver Signup.aspx");
if(txtid.Text==""||txtpwd.Text=="")
{
Response.Write("<script>alert('Please Enter Required Fields');</script>");
}
else
{
loginfunc();
}
}


Expand Down
20 changes: 15 additions & 5 deletions Driver Profile.aspx
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/HomeMaster.Master" AutoEventWireup="true" CodeBehind="Driver Profile.aspx.cs" Inherits="RDA.Driver_Profile" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

<script type="text/javascript">
$(document).ready(function() {
$(".table").prepend($("<thead></thead>").append($(this).find("tr:first"))).dataTable();
});
</script>


</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

Expand All @@ -10,7 +18,7 @@
<div class="container-fluid">

<div class="row">
<div class="col-md-5">
<div class="col-md-5 mx-auto">
<div class="card">
<div class="card-body">
<div class="row">
Expand All @@ -37,11 +45,9 @@
</div>
<div class="row">
<div class="col-md-4">
<label>User ID</label>

<div class="form-group">
<div class="input-group">
<asp:TextBox CssClass="form-control" ID="TextBox1" runat="server" placeholder="Driver ID"></asp:TextBox>
<asp:Button ID="Button3" runat="server" Text="OK" class="form-control btn btn-primary" OnClick="Button3_Click"/>
</div>
</div>
</div>
Expand Down Expand Up @@ -112,6 +118,7 @@
<div class="row">
<div class="col">
<center>
<br />
<span class="badge rounded-pill bg-info text-dark"><h6 style="color:whitesmoke">Login Credentials</h6> </span>
</center>
</div>
Expand Down Expand Up @@ -161,11 +168,13 @@
<a href="Home.aspx"><< Back to Home</a><br><br />
</div>

<br />
<br />




<div class="col-md-7">
<div class="col-md-7 mx-auto">

<div class="card">
<div class="card-body">
Expand All @@ -184,6 +193,7 @@
<span>Report Status -</span>
<asp:Label class="badge rounded-pill bg-warning" ID="Label2" runat="server" Text="Pending Approval"></asp:Label>
</center>
<asp:GridView class="table table-striped table-bordered" ID="GridView1" runat="server"></asp:GridView>
</div>
</div>
<div class="row">
Expand Down
41 changes: 20 additions & 21 deletions Driver Profile.aspx.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public partial class Driver_Profile : System.Web.UI.Page
string strcon = ConfigurationManager.ConnectionStrings["rdacon"].ConnectionString;
protected void Page_Load(object sender, EventArgs e)
{

getdriverbyid();
}

//upddate account
Expand All @@ -38,41 +38,40 @@ protected void Button3_Click(object sender, EventArgs e)
}


bool filldriverprofilevalues()


void getdriverbyid()
{
try
{
SqlConnection con = new SqlConnection(strcon);
if(con.State==ConnectionState.Closed)
if (con.State == ConnectionState.Closed)
{
con.Open();
}
SqlCommand cmd = new SqlCommand("SELECT * FROM driver_acc where userID='"+txtid.Text.Trim()+"'", con);
SqlCommand cmd = new SqlCommand("SELECT * from driver_acc where userID='" + Session["username"].ToString() + "';", con);

SqlDataAdapter da = new SqlDataAdapter(cmd);
DataTable dt = new DataTable();
da.Fill(dt);
if(dt.Rows.Count>=1)
{
return true;

}
else
{
return false;
}
GridView1.DataSource = dt;
GridView1.DataBind();





}

catch(Exception ex)
catch (Exception ex)
{
Response.Write("<script>alert('" + ex.Message + "');</script>");
return false;

Response.Write("<script>alert('Exception Occured " + ex + "');</script>");
}
}

void addnewvalues()
{


}



}
}
27 changes: 9 additions & 18 deletions Driver Profile.aspx.designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

44 changes: 25 additions & 19 deletions Driver Report.aspx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
<div class="row">
<div class="col-md-8 mx-auto">
<div class="card">

<div class="card-body">
<div class="row">
<div class="col">
Expand Down Expand Up @@ -53,7 +54,7 @@
<div class="col-md-6">
<label>Driver ID</label>
<div class="form-group">
<asp:TextBox CssClass="form-control" ID="txtid" runat="server" placeholder="Driver ID"></asp:TextBox>
<asp:TextBox CssClass="form-control" ID="txtid" runat="server" placeholder="Driver ID" MaxLength="15"></asp:TextBox>
</div>
</div>
</div>
Expand Down Expand Up @@ -118,7 +119,7 @@
<div class="col-md-8">
<label>Accident Desciption</label>
<div class="form-group">
<asp:TextBox CssClass="form-control" ID="txtaccdescr" runat="server" placeholder="Accident Description" Rows="5" MaxLength="100" TextMode="MultiLine" Width="350px"></asp:TextBox>
<asp:TextBox CssClass="form-control" ID="txtaccdescr" runat="server" placeholder="Accident Description" Rows="5" MaxLength="300" TextMode="MultiLine" Width="350px"></asp:TextBox>
</div>
</div>

Expand Down Expand Up @@ -253,17 +254,21 @@
<div class="card">
<div class="card-body">
<div class="row">
<div class="col-md-5-auto">

</div>
<div class="row">
<div class="col">
<center>
<h4>USER DETAILS</h4>
<img width="100px" src="images/user.png"/>
</center>
</div>
</div>
<div class="row">
<div class="col">
<div class="col-md-5-auto">
<center>

<img width="100px" src="images/adminlogin.png" />
<br />
YOUR ACCOUNT<h4>&nbsp;DETAILS</h4>
<span >
<asp:Label class="badge rounded-pill bg-info " id="Label1" runat="server" Text="Account Status"></asp:Label>
</span>
</center>
</div>
</div>
Expand All @@ -277,15 +282,15 @@
<label>Driver ID</label>
<div class="form-group">
<div class="input-group">
<asp:TextBox CssClass="form-control" ID="id" runat="server" placeholder="User ID"></asp:TextBox>
<asp:TextBox CssClass="form-control" ID="id" runat="server" placeholder="User ID" MaxLength="15"></asp:TextBox>
<asp:LinkButton class="btn btn-primary" ID="primary" runat="server" OnClick="primary_Click" ><i class="fas fa-check-circle"></i></asp:LinkButton>
</div>
</div>
</div>
<div class="col-md-5 mx-auto">
<label>Full Name</label>
<div class="form-group">
<asp:TextBox CssClass="form-control" ID="updname" runat="server" placeholder="Full Name" ></asp:TextBox>
<asp:TextBox CssClass="form-control" MaxLength="15" ID="updname" runat="server" placeholder="Full Name" ></asp:TextBox>
</div>
</div>

Expand All @@ -294,13 +299,13 @@
<div class="col-md-5 mx-auto">
<label>Insurance Number</label>
<div class="form-group">
<asp:TextBox CssClass="form-control" ID="updins" runat="server" placeholder="Insurance Number" ></asp:TextBox>
<asp:TextBox CssClass="form-control" ID="updins" runat="server" placeholder="Insurance Number" MaxLength="15" ></asp:TextBox>
</div>
</div>
<div class="col-md-5 mx-auto">
<label>Vehicle Register Number</label>
<div class="form-group">
<asp:TextBox CssClass="form-control" ID="updreg" runat="server" placeholder="Vehicle Register Number" ></asp:TextBox>
<asp:TextBox CssClass="form-control" ID="updreg" runat="server" placeholder="Vehicle Register Number" MaxLength="12" ></asp:TextBox>
</div>
</div>

Expand All @@ -312,13 +317,13 @@
<div class="col-md-5 mx-auto">
<label>Password</label>
<div class="form-group">
<asp:TextBox CssClass="form-control" ID="updpwd" runat="server" placeholder="Password" TextMode="Password" ></asp:TextBox>
<asp:TextBox CssClass="form-control" ID="updpwd" runat="server" placeholder="Password" TextMode="Password" MaxLength="25" ></asp:TextBox>
</div>
</div>
<div class="col-md-5 mx-auto">
<label>E-mail</label>
<div class="form-group">
<asp:TextBox CssClass="form-control" ID="updemail" runat="server" placeholder="Email Address" ></asp:TextBox>
<asp:TextBox CssClass="form-control" ID="updemail" runat="server" placeholder="Email Address" MaxLength="25" ></asp:TextBox>
</div>
</div>
</div>
Expand Down Expand Up @@ -347,14 +352,15 @@


</div>
</div>










</div>



</asp:Content>
Loading

0 comments on commit 9f32818

Please sign in to comment.