Пример #1
0
    protected void Cell_Click(object sender, AjaxEventArgs e)
    {
        try//为null时出错
        {
            CellSelectionModel sm = this.GridPanel1.SelectionModel.Primary as CellSelectionModel;
            if (sm.SelectedCell.ColIndex == 0 || sm.SelectedCell.Value.Trim() == "0")
            {
                return;
            }
            string url = "";
            switch (sm.SelectedCell.Name.Trim())
            {
            case "XJ":
                Window1.Width  = 840;
                Window1.Height = 422;
                Window1.Title  = "下井信息";
                Window1.Html   = GetXJDate(sm.SelectedCell.RecordID.Trim());
                //url = string.Format("YHcondition.aspx?MainDeptID={0}&begin={1}&end={2}", sm.SelectedCell.RecordID.Trim(), dfBegin.SelectedDate.ToString("yyyy-MM-dd"), dfEnd.SelectedDate.ToString("yyyy-MM-dd"));
                Window1.Show();
                break;

            case "YH":
                Window1.Width  = 840;
                Window1.Height = 422;
                Window1.Title += "隐患信息";
                url            = string.Format("YHcondition.aspx?PCperson={0}&begin={1}&end={2}&jctype={3}", sm.SelectedCell.RecordID.Trim(), dfBegin.SelectedDate.ToString("yyyy-MM-dd"), dfEnd.SelectedDate.ToString("yyyy-MM-dd"), "2");
                Window1.ClearContent();
                Ext.DoScript("#{Window1}.load('" + url + "');");
                Window1.Show();
                break;
            }
        }
        catch
        {
        }
        //if (url != "")
        //{
        //    Window1.ClearContent();
        //    Ext.DoScript("#{Window1}.load('" + url + "');");
        //}
    }
Пример #2
0
    protected void Cell_Click(object sender, AjaxEventArgs e)
    {
        CellSelectionModel sm = this.GridPanel1.SelectionModel.Primary as CellSelectionModel;

        if (sm.SelectedCell.ColIndex < 5 || sm.SelectedCell.Value.Trim() == "0")
        {
            return;
        }
        string url = "";

        switch (sm.SelectedCell.Name.Trim())
        {
        case "XJ":
            Window1.Width  = 840;
            Window1.Height = 422;
            Window1.Title  = "下井信息";
            Window1.Html   = GetXJDate(sm.SelectedCell.RecordID.Trim());
            Window1.Show();
            //url = string.Format("YHcondition.aspx?MainDeptID={0}&begin={1}&end={2}", sm.SelectedCell.RecordID.Trim(), dfBegin.SelectedDate.ToString("yyyy-MM-dd"), dfEnd.SelectedDate.ToString("yyyy-MM-dd"));
            break;

        case "YH":
            Window1.Width  = 840;
            Window1.Height = 422;
            Window1.Title += "隐患信息";
            url            = string.Format("YHcondition.aspx?PCperson={0}&begin={1}&end={2}", sm.SelectedCell.RecordID.Trim(), dfBegin.SelectedDate.ToString("yyyy-MM-dd"), dfEnd.SelectedDate.ToString("yyyy-MM-dd"));
            Window1.Show();
            break;

        case "YXC":
            Window1.Width  = 840;
            Window1.Height = 422;
            Window1.Title += "现场整改隐患信息";
            url            = string.Format("YHcondition.aspx?PCperson={0}&begin={1}&end={2}&status=3", sm.SelectedCell.RecordID.Trim(), dfBegin.SelectedDate.ToString("yyyy-MM-dd"), dfEnd.SelectedDate.ToString("yyyy-MM-dd"));
            Window1.Show();
            break;

        case "FXC":
            Window1.Width  = 840;
            Window1.Height = 422;
            Window1.Title += "非现场整改隐患信息";
            url            = string.Format("YHcondition.aspx?PCperson={0}&begin={1}&end={2}&status=2", sm.SelectedCell.RecordID.Trim(), dfBegin.SelectedDate.ToString("yyyy-MM-dd"), dfEnd.SelectedDate.ToString("yyyy-MM-dd"));
            Window1.Show();
            break;

        case "YBH":
            Window1.Width  = 840;
            Window1.Height = 422;
            Window1.Title += "已闭合隐患信息";
            url            = string.Format("YHcondition.aspx?PCperson={0}&begin={1}&end={2}&status=1", sm.SelectedCell.RecordID.Trim(), dfBegin.SelectedDate.ToString("yyyy-MM-dd"), dfEnd.SelectedDate.ToString("yyyy-MM-dd"));
            Window1.Show();
            break;

        case "WBH":
            Window1.Width  = 840;
            Window1.Height = 422;
            Window1.Title += "未闭合隐患信息";
            url            = string.Format("YHcondition.aspx?PCperson={0}&begin={1}&end={2}&status=0", sm.SelectedCell.RecordID.Trim(), dfBegin.SelectedDate.ToString("yyyy-MM-dd"), dfEnd.SelectedDate.ToString("yyyy-MM-dd"));
            Window1.Show();
            break;

        case "SW":
            Window1.Width  = 890;
            Window1.Height = 400;
            Window1.Title += "三违信息";
            url            = string.Format("SWcondition.aspx?PCperson={0}&begin={1}&end={2}", sm.SelectedCell.RecordID.Trim(), dfBegin.SelectedDate.ToString("yyyy-MM-dd"), dfEnd.SelectedDate.ToString("yyyy-MM-dd"));
            Window1.Show();
            break;

        case "LOGINCOUNT":
            return;
        }
        if (url != "")
        {
            Window1.ClearContent();
            Ext.DoScript("#{Window1}.load('" + url + "');");
        }
        // Window1.Show();
    }