コード例 #1
0
    public void GridViewDataBinding(string shceduleId)
    {
        if (shceduleId == string.Empty)
        {
            string OrderBy = " it.GDT desc ";
            string whereStr;

            ObjectQuery<vUTPScheduleMessager> vScheduleLogObjs;

            whereStr = "";
            BLL_ScheduleLog = new vScheduleLogBLL();
            vScheduleLogObjs = BLL_ScheduleLog.FindJobResult(whereStr, OrderBy);

            RadGrid.DataSource = vScheduleLogObjs;
        }
        else
        {
            string OrderBy = " it.GDT desc ";
            string whereStr;

            ObjectQuery<vUTPScheduleMessager> vScheduleLogObjs;

            whereStr = " and it.SID='" + shceduleId + "'";
            BLL_ScheduleLog = new vScheduleLogBLL();
            vScheduleLogObjs = BLL_ScheduleLog.FindJobResult(whereStr, OrderBy);

            RadGrid.DataSource = vScheduleLogObjs;
        }
    }
コード例 #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        vUTPScheduleMessager vScheduleLogObj;
        tblScheduler SchedulerObj;

        if (!IsPostBack)
        {
            if (Request.QueryString["KeyGuid"] != null && Request.QueryString["KeyGuid"] != string.Empty)
            {
                KeyId = Request.QueryString["KeyGuid"].ToString();
                BLL_ScheduleLog = new vScheduleLogBLL();
                //��ʾUserName��Ϣ
                vScheduleLogObj = BLL_ScheduleLog.FindUserNameByScheduleId(KeyId);
                if (vScheduleLogObj!=null)
                {
                    lbl_UserName.Text = vScheduleLogObj.UserName;
                }
                //��ʾTaskName
                BLL_ScheduleTasks = new ScheduleTasksBLL();
                SchedulerObj = BLL_ScheduleTasks.FindSchedulerById(KeyId);
                lbl_TaskName.Text = SchedulerObj.TaskName.Substring(0, SchedulerObj.TaskName.LastIndexOf("-"));
            }
        }
        GridViewDataBinding(KeyId);
    }