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

                if (!IsPostBack)
                {
                    OperatorInfo op = new OperatorInfo(Request.Cookies["bfp_operator"].Value);
                    lblFirstName.Text        = op.FirstName;
                    equip                    = new clsEquipment();
                    equip.iOrgId             = OrgId;
                    equip.iUserId            = op.Id;
                    repEquipments.DataSource = new DataView(equip.GetEquipListByOperator2());
                    repEquipments.DataBind();
                }
            }
            catch (Exception ex)
            {
                _functions.Log(ex, HttpContext.Current.User.Identity.Name, SourcePageName);
                Session["lastpage"]     = "ok_mainMenu.aspx";
                Session["error"]        = ex.Message;
                Session["error_report"] = ex.ToString();
                Response.Redirect("error.aspx", false);
            }
            finally
            {
                if (equip != null)
                {
                    equip.Dispose();
                }
            }
        }