Beispiel #1
0
 public void DeleteCommencement(string id)
 {
     QuickPM.RentCommencement r = new QuickPM.RentCommencement(long.Parse(id));
     r.Delete();
     //Response.Redirect(Request.Url.PathAndQuery);
 }
Beispiel #2
0
 protected void RentCommencementAdd_Click(object sender, EventArgs e)
 {
     if (tenant == null)
     {
         return;
     }
     int rentTypeIndex = Int32.Parse(DropDownListRentCommencementType.SelectedValue);
     DateTime date;
     if (!DateTime.TryParse(TextBoxDate.Text, out date))
     {
         Session["Message"] = "Please enter a date for the " + DropDownListRentCommencementType.SelectedItem.Text + " commencement";
         Response.Redirect(Request.Url.PathAndQuery);
         return;
     }
     QuickPM.RentCommencement rentCommencement = new QuickPM.RentCommencement();
     rentCommencement.Date = date;
     rentCommencement.RentTypeIndex = rentTypeIndex;
     rentCommencement.TenantId = tenant.TenantId;
     rentCommencement.Save();
     rentCommencements = QuickPM.ActiveRecord.Find<QuickPM.RentCommencement>("TenantId", tenant.TenantId);
     //Response.Redirect(Request.Url.PathAndQuery);
 }