Ejemplo n.º 1
0
    private void BindList(DateTime stime, DateTime etime)
    {
        m_StaffAndScore = new List <List <string> >();
        if (staffid > 0)
        {
            List <string> sas = GetStaffScore(stime, etime, staffid.ToString(), staffname);
            if (sas != null && sas.Count > 0)
            {
                m_StaffAndScore.Add(sas);
            }
        }
        else if (!string.IsNullOrEmpty(deptid))
        {
            HR_STAFF conObj = new HR_STAFF();
            conObj.Where("{0} like '{1}%' ", HR_STAFF.Attribute.DEPT_ID, deptid);
            HR_STAFF valObj = new HR_STAFF();
            valObj.STAFF_ID   = 0;
            valObj.STAFF_NAME = "";
            List <HR_STAFF> staffs = BLLTable <HR_STAFF> .Factory(conn).Select(valObj, conObj);

            foreach (HR_STAFF s in staffs)
            {
                List <string> sas = GetStaffScore(stime, etime, s.STAFF_ID.ToString(), s.STAFF_NAME);
                if (sas != null && sas.Count > 0)
                {
                    m_StaffAndScore.Add(sas);
                }
            }
        }
        repList.DataSource = m_StaffAndScore;
        repList.DataBind();
    }
Ejemplo n.º 2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        #region 外部传入 非主键参数
        if (Request["PID"] != null)
        {
            pid = Request["PID"];
        }
        title      = valObj._ZhName + "选择";
        Page.Title = title;

        #endregion

        if (!IsPostBack)
        {
            txtGENDER.Items.AddRange(FormHelper.GetListItem(HR_STAFF.Attribute.GENDER));
            if (pid == "" || pid == "0")
            {
                a_top.Visible = false;
            }
            if (!string.IsNullOrEmpty(Request["ids"]))
            {
                HR_STAFF roleOld = new HR_STAFF();
                roleOld.Where(HR_STAFF.Attribute.STAFF_ID, Request["ids"].ToString());
                listObj = BLLTable <HR_STAFF> .Factory(conn).Select(valObj, roleOld);

                for (int i = 0; i < listObj.Count; i++)
                {
                    if (i > 0)
                    {
                        hidOld.Value     += ",";
                        hidInitIDS.Value += ",";
                    }
                    hidOld.Value     += "{ID:'" + listObj[i].STAFF_ID + "',Name:'" + listObj[i].STAFF_NAME + "'}";//这里的Name用于显示在列表中,请自行重定义。
                    hidInitIDS.Value += listObj[i].STAFF_ID;
                }
            }

            btn_Find.Text     = LanguageService.GetLanguageString("btnFind", "查询");
            Page.Title        = title + LanguageService.GetLanguageString("Choose", "选择");
            aspPager.PageSize = 15;

            condObj.PID = decimal.Parse(pid);

            BindList(condObj, 1);
            aspPager.CurrentPageIndex = 1;
        }
    }
    private void BindList(DateTime stime, DateTime etime)
    {
        m_StaffAndScore = new List <List <string> >();
        if (selStaff.Staff_ID > 0)
        {
            List <string> sas = GetStaffScore(stime, etime, selStaff.Staff_ID.ToString(), selStaff.Staff_NAME);
            if (sas != null && sas.Count > 0)
            {
                m_StaffAndScore.Add(sas);
            }
        }
        else if (!string.IsNullOrEmpty(selDept.DEPT_ID))
        {
            HR_STAFF conObj = new HR_STAFF();
            conObj.Where("{0} like '{1}%' ", HR_STAFF.Attribute.DEPT_ID, selDept.DEPT_ID);
            HR_STAFF valObj = new HR_STAFF();
            valObj.STAFF_ID   = 0;
            valObj.STAFF_NAME = "";
            List <HR_STAFF> staffs = BLLTable <HR_STAFF> .Factory(conn).Select(valObj, conObj);

            foreach (HR_STAFF s in staffs)
            {
                List <string> sas = GetStaffScore(stime, etime, s.STAFF_ID.ToString(), s.STAFF_NAME);
                if (sas != null && sas.Count > 0)
                {
                    m_StaffAndScore.Add(sas);
                }
            }
        }

        aspPager.RecordCount = m_StaffAndScore.Count;
        List <List <string> > sass = m_StaffAndScore.Count > 0 ? (m_StaffAndScore.GetRange(0, aspPager.CurrentPageIndex == aspPager.PageCount ? (m_StaffAndScore.Count) : aspPager.PageSize)) : new List <List <string> >();

        repList.DataSource = sass;
        repList.DataBind();
        ViewState["StaffAndScore"] = m_StaffAndScore;
        litScript.Text             = "<script>$('.main').unmask();</script>";
    }
Ejemplo n.º 4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        #region �ⲿ���� ����������
        if (Request["PID"] != null)
        {
            pid = Request["PID"];
        }
        title = valObj._ZhName + "ѡ��";
        Page.Title = title;

        #endregion

        if (!IsPostBack)
        {
            txtGENDER.Items.AddRange(FormHelper.GetListItem(HR_STAFF.Attribute.GENDER));
            if (pid == "" || pid == "0")
            {
                a_top.Visible = false;
            }
            if (!string.IsNullOrEmpty(Request["ids"]))
            {
                HR_STAFF roleOld = new HR_STAFF();
                roleOld.Where(HR_STAFF.Attribute.STAFF_ID, Request["ids"].ToString());
                listObj = BLLTable<HR_STAFF>.Factory(conn).Select(valObj, roleOld);
                for (int i = 0; i < listObj.Count; i++)
                {
                    if (i > 0)
                    {
                        hidOld.Value += ",";
                        hidInitIDS.Value += ",";
                    }
                    hidOld.Value += "{ID:'" + listObj[i].STAFF_ID + "',Name:'" + listObj[i].STAFF_NAME + "'}";//�����Name������ʾ���б��У��������ض��塣
                    hidInitIDS.Value += listObj[i].STAFF_ID;
                }
            }

            btn_Find.Text = LanguageService.GetLanguageString("btnFind", "��ѯ");
            Page.Title = title + LanguageService.GetLanguageString("Choose", "ѡ��");
            aspPager.PageSize = 15;

            condObj.PID = decimal.Parse(pid);

            BindList(condObj, 1);
            aspPager.CurrentPageIndex = 1;

        }
    }
Ejemplo n.º 5
0
 private void BindList(DateTime stime, DateTime etime)
 {
     m_StaffAndScore = new List<List<string>>();
     if (staffid > 0)
     {
         List<string> sas = GetStaffScore(stime, etime, staffid.ToString(), staffname);
         if (sas != null && sas.Count > 0)
             m_StaffAndScore.Add(sas);
     }
     else if (!string.IsNullOrEmpty(deptid))
     {
         HR_STAFF conObj = new HR_STAFF();
         conObj.Where("{0} like '{1}%' ", HR_STAFF.Attribute.DEPT_ID, deptid);
         HR_STAFF valObj = new HR_STAFF();
         valObj.STAFF_ID = 0;
         valObj.STAFF_NAME = "";
         List<HR_STAFF> staffs = BLLTable<HR_STAFF>.Factory(conn).Select(valObj, conObj);
         foreach (HR_STAFF s in staffs)
         {
             List<string> sas = GetStaffScore(stime, etime, s.STAFF_ID.ToString(), s.STAFF_NAME);
             if (sas != null && sas.Count > 0)
                 m_StaffAndScore.Add(sas);
         }
     }
     repList.DataSource = m_StaffAndScore;
     repList.DataBind();
 }
    private void BindList(DateTime stime, DateTime etime)
    {
        m_StaffAndScore = new List<List<string>>();
        if (selStaff.Staff_ID > 0)
        {
            List<string> sas = GetStaffScore(stime, etime, selStaff.Staff_ID.ToString(), selStaff.Staff_NAME);
            if (sas != null && sas.Count > 0)
                m_StaffAndScore.Add(sas);
        }
        else if (!string.IsNullOrEmpty(selDept.DEPT_ID))
        {
            HR_STAFF conObj = new HR_STAFF();
            conObj.Where("{0} like '{1}%' ", HR_STAFF.Attribute.DEPT_ID, selDept.DEPT_ID);
            HR_STAFF valObj = new HR_STAFF();
            valObj.STAFF_ID = 0;
            valObj.STAFF_NAME = "";
            List<HR_STAFF> staffs = BLLTable<HR_STAFF>.Factory(conn).Select(valObj, conObj);
            foreach (HR_STAFF s in staffs)
            {
                List<string> sas = GetStaffScore(stime, etime, s.STAFF_ID.ToString(), s.STAFF_NAME);
                if (sas != null && sas.Count > 0)
                    m_StaffAndScore.Add(sas);
            }
        }

        aspPager.RecordCount = m_StaffAndScore.Count;
        List<List<string>> sass = m_StaffAndScore.Count > 0 ? (m_StaffAndScore.GetRange(0, aspPager.CurrentPageIndex == aspPager.PageCount ? (m_StaffAndScore.Count) : aspPager.PageSize)) : new List<List<string>>();
        repList.DataSource = sass;
        repList.DataBind();
        ViewState["StaffAndScore"] = m_StaffAndScore;
        litScript.Text = "<script>$('.main').unmask();</script>";
    }