Example #1
0
        private void Page_Load(object sender, System.EventArgs e)
        {
            try
            {
                OrgId = _functions.GetUserOrgId(HttpContext.Current.User.Identity.Name, false);

                if (!IsPostBack)
                {
                    dtCurrentDate = DateTime.Now;
//					adtEndDate.Date = dtCurrentDate;
//					adtStartDate.Date = dtCurrentDate.AddDays(-1);
                    equip                    = new clsEquipment();
                    equip.iOrgId             = OrgId;
                    equip.daMinDate          = dtCurrentDate;            //adtStartDate.Date;
                    equip.daMaxDate          = dtCurrentDate;            //adtEndDate.Date.AddHours(23).AddMinutes(59);
                    dgAssignments.DataSource = new DataView(equip.GetTempOperatorsAssignmentList());
                    dgAssignments.DataBind();
                }
            }
            catch (Exception ex)
            {
                _functions.Log(ex, HttpContext.Current.User.Identity.Name, SourcePageName);
                Session["lastpage"]     = "main.aspx";
                Session["error"]        = ex.Message;
                Session["error_report"] = ex.ToString();
                Response.Redirect("error.aspx", false);
            }
            finally
            {
            }
        }