예제 #1
0
파일: human.aspx.cs 프로젝트: zxl881203/src
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!base.IsPostBack)
     {
         int num = 0;
         try
         {
             num = int.Parse(base.Request.QueryString["deptid"].ToString());
         }
         catch
         {
         }
         if (num != 0 && num != 1)
         {
             userManageDb userManageDb = new userManageDb();
             DataSet      dataSet      = userManageDb.DepUserQuaryForMail(num.ToString());
             DataTable    dataTable    = dataSet.Tables[0];
             this.LBoxHuman.Items.Clear();
             for (int i = 0; i < dataTable.Rows.Count; i++)
             {
                 ListItem item = new ListItem(dataTable.Rows[i]["v_xm"].ToString(), dataTable.Rows[i]["v_yhdm"].ToString());
                 this.LBoxHuman.Items.Add(item);
             }
         }
         this.SelectedList_Restore();
     }
 }
예제 #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        base.Response.Cache.SetNoStore();
        SysManageDb sysManageDb = new SysManageDb();

        if (base.Request.QueryString.Count > 0)
        {
            try
            {
                this._iSysID = int.Parse(base.Request.QueryString["sysid"].ToString());
                goto IL_5F;
            }
            catch
            {
                goto IL_5F;
            }
        }
        this._iSysID = sysManageDb.GetDefault();
IL_5F:
        this.HdnSysID.Value = this._iSysID.ToString();
        if (!base.IsPostBack)
        {
            int num = 0;
            try
            {
                num = int.Parse(base.Request.QueryString["deptid"].ToString());
            }
            catch
            {
            }
            if (num > 1)
            {
                userManageDb userManageDb = new userManageDb();
                DataSet      dataSet      = userManageDb.DepUserQuaryForMail(num.ToString());
                DataTable    dataTable    = dataSet.Tables[0];
                this.LBoxHuman.Items.Clear();
                for (int i = 0; i < dataTable.Rows.Count; i++)
                {
                    ListItem item = new ListItem(dataTable.Rows[i]["v_xm"].ToString(), dataTable.Rows[i]["v_yhdm"].ToString());
                    this.LBoxHuman.Items.Add(item);
                }
            }
            else
            {
                if (num == -1)
                {
                    MailManage mailManage = new MailManage();
                    DataTable  dataTable2 = mailManage.SelLinkman(this.Session["yhdm"].ToString());
                    this.LBoxHuman.Items.Clear();
                    for (int j = 0; j < dataTable2.Rows.Count; j++)
                    {
                        ListItem item2 = new ListItem(dataTable2.Rows[j]["v_xm"].ToString(), dataTable2.Rows[j]["v_yhdm"].ToString());
                        this.LBoxHuman.Items.Add(item2);
                    }
                }
            }
            this.SelectedList_Restore();
        }
    }