Пример #1
0
    protected void ButtonSearch_Click(object sender, EventArgs e)
    {
        PanelOverTimeNew.Visible = false;
        UpdatePanelOverTimeNew.Update();
        Panel_Parameter.Visible = false;
        UpdatePanel_Parameter.Update();
        Panel_AddPS.Visible = false;
        UpdatePanel_AddPS.Update();
        Label_Grid1_State.Text = "模糊搜索数据源";
        string name = TextBoxOverTime.Text;

        if (name != "")
        {
            Session["BindTable"] = OverTimeOption.SearchOverTime(name);
            BindData();
            UpdatePanelList.Update();
        }
        else
        {
            Label_Grid1_State.Text = "默认数据源";
            Session["BindTable"]   = OverTimeOption.BindOverTime();
            BindData();
            UpdatePanelList.Update();
        }
    }
Пример #2
0
 protected void ButtonNew_Click(object sender, EventArgs e)
 {
     PanelOverTimeNew.Visible = true;//Panel可见
     UpdatePanelOverTimeNew.Update();
     Panel_Parameter.Visible = false;
     UpdatePanel_Parameter.Update();
     Panel_AddPS.Visible = false;
     UpdatePanel_AddPS.Update();
     GridViewOverTime.EditIndex = -1;
     Session["BindTable"]       = OverTimeOption.BindOverTime();
     BindData();
     UpdatePanelList.Update();
 }
Пример #3
0
    protected void GridViewOverTime_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        if (e.CommandName == "DeleteOTO")//删除某行数据
        {
            GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow;
            GridViewOverTime.SelectedIndex = row.RowIndex;
            string id      = e.CommandArgument.ToString();
            Guid   guid_id = new Guid(id);
            if (OverTimeOption.DeleteOverTime(guid_id))
            {
                //Message.Text = "数据已成功删除!";
                ScriptManager.RegisterClientScriptBlock(Page, typeof(Page), "alert", "alert('数据已成功删除!')", true);
            }
            else
            {
                Message.Text = "";
            }
            Session["BindTable"] = OverTimeOption.BindOverTime();
            BindData();
        }
        if (e.CommandName == "Check_Detail")//
        {
            GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow;
            GridViewOverTime.SelectedIndex = row.RowIndex;
            GridViewOverTime.EditIndex     = -1;
            string[] al = e.CommandArgument.ToString().Split(new char[] { ',' });
            Label_PTP.Text          = al[1];
            Label1.Text             = al[0];
            Panel_Parameter.Visible = true;
            databind_detail();
            GridView_Parameter.SelectedIndex = -1;
            GridView_Parameter.EditIndex     = -1;
            GridView_Parameter.PageIndex     = 0;
            PanelOverTimeNew.Visible         = false;
            UpdatePanelOverTimeNew.Update();

            UpdatePanel_Parameter.Update();
            Panel_AddPS.Visible = false;
            UpdatePanel_AddPS.Update();
        }
    }
Пример #4
0
 protected void ButtonClose_Click(object sender, EventArgs e)
 {
     PanelOverTimeNew.Visible = false;//Panel不可见
     UpdatePanelOverTimeNew.Update();
 }