Permalink
Browse files

Merge branch 'master' of https://github.com/bduong/toms-list

  • Loading branch information...
Martikos committed Apr 24, 2013
2 parents 97c2e8c + 86748eb commit fb889e5182415406cce817a860fd2a0ad4f70f6f
Showing with 14 additions and 1 deletion.
  1. +14 −1 Views/Private/GarageSale.aspx.cs
@@ -25,13 +25,26 @@ protected void Button1_Click(object sender, EventArgs e)
string[] dateday = textbox_date.Text.Split('/');
string[] datetime_begin = textbox_begin.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 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();
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)
{

0 comments on commit fb889e5

Please sign in to comment.