Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/bduong/toms-list
Browse files Browse the repository at this point in the history
  • Loading branch information
Martikos committed Apr 24, 2013
2 parents 97c2e8c + 86748eb commit fb889e5
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion Views/Private/GarageSale.aspx.cs
Expand Up @@ -25,13 +25,26 @@ protected void Button1_Click(object sender, EventArgs e)
string[] dateday = textbox_date.Text.Split('/'); string[] dateday = textbox_date.Text.Split('/');
string[] datetime_begin = textbox_begin.Text.Split(':'); string[] datetime_begin = textbox_begin.Text.Split(':');
string[] datetime_end = textbox_end.Text.Split(':'); string[] datetime_end = textbox_end.Text.Split(':');

DateTime begintime = new DateTime(Convert.ToInt32(dateday[0]), Convert.ToInt32(dateday[1]), Convert.ToInt32(dateday[2]), Convert.ToInt32(datetime_begin[0]), Convert.ToInt32(datetime_begin[1]), 0); DateTime begintime = new DateTime(Convert.ToInt32(dateday[0]), Convert.ToInt32(dateday[1]), Convert.ToInt32(dateday[2]), Convert.ToInt32(datetime_begin[0]), Convert.ToInt32(datetime_begin[1]), 0);
DateTime endtime = new DateTime(Convert.ToInt32(dateday[0]), Convert.ToInt32(dateday[1]), Convert.ToInt32(dateday[2]), Convert.ToInt32(datetime_end[0]), Convert.ToInt32(datetime_end[1]), 0); DateTime endtime = new DateTime(Convert.ToInt32(dateday[0]), Convert.ToInt32(dateday[1]), Convert.ToInt32(dateday[2]), Convert.ToInt32(datetime_end[0]), Convert.ToInt32(datetime_end[1]), 0);


MembershipUser user = Membership.GetUser(); MembershipUser user = Membership.GetUser();
Guid userId = (Guid)user.ProviderUserKey; Guid userId = (Guid)user.ProviderUserKey;


Garage mygarage = new Garage(userId, begintime, endtime, textbox_location.Text, textbox_description.Value);

Garage newgarage = GarageDataService.addGarageSale(mygarage);


textbox_begin.Text = "";
textbox_date.Text = "";
textbox_end.Text = "";
textbox_location.Text = "";
textbox_description.Value = "";

creategarage_output.Text = "Garage Sale successfully created!";
creategarage_output.Style.Add("color", "#00ff00");
} }
catch (Exception ex) catch (Exception ex)
{ {
Expand Down

0 comments on commit fb889e5

Please sign in to comment.