コード例 #1
0
 private void btnReport_Click(object sender, System.EventArgs e)
 {
     try
     {
         equip                    = new clsEquipment();
         equip.iOrgId             = OrgId;
         equip.iId                = EquipId;
         equip.daMinDate          = adtStartDate.Date;
         equip.daMaxDate          = adtEndDate.Date.AddHours(23).AddMinutes(59);
         dgAssignments.DataSource = new DataView(equip.GetEquipmentAssignmentList());
         dgAssignments.DataBind();
         lblEquipId.Text = equip.sEquipId.Value;
     }
     catch (Exception ex)
     {
         _functions.Log(ex, HttpContext.Current.User.Identity.Name, SourcePageName);
         Session["lastpage"]     = "e_viewEquipAssignmentReport.aspx?id=" + EquipId.ToString();
         Session["error"]        = ex.Message;
         Session["error_report"] = ex.ToString();
         Response.Redirect("error.aspx", false);
     }
     finally
     {
         if (equip != null)
         {
             equip.Dispose();
         }
     }
 }