Exemplo n.º 1
0
 protected void Close_model_Click(object sender, EventArgs e)
 {
     Panel_NewName.Visible = false;
     UpdatePanel_NewName.Update();
     Panel_Model.Visible    = false;
     Panel_NewModel.Visible = false;
     UpdatePanel_NewModel.Update();
     Panel_Spare.Visible    = false;
     Panel_NewSpare.Visible = false;
     UpdatePanel_NewSpare.Update();
     Panel1.Visible = false;
     UpdatePanel1.Update();
 }
Exemplo n.º 2
0
 protected void Clear_spare_Click(object sender, EventArgs e)
 {
     TextMaterialName.Text       = "";
     TextMaterialCode.Text       = "";
     TextSpecificationModel.Text = "";
     BindGrid_EquipSpare("and x.EMT_ID='" + Label_mid.Text.ToString() + "'");
     Panel_NewName.Visible = false;
     UpdatePanel_NewName.Update();
     Panel_NewModel.Visible = false;
     UpdatePanel_NewModel.Update();
     Panel_NewSpare.Visible = false;
     UpdatePanel_NewSpare.Update();
 }
Exemplo n.º 3
0
    protected void Search_spare_Click(object sender, EventArgs e)
    {
        Panel_NewName.Visible = false;
        UpdatePanel_NewName.Update();
        Panel_NewModel.Visible = false;
        UpdatePanel_NewModel.Update();
        Panel_NewSpare.Visible = false;
        UpdatePanel_NewSpare.Update();
        string condition = GetCondition();

        BindGrid_EquipSpare(condition);
        Panel_Spare.Visible = true;
        //this.UpdatePanel_Spare.Update();
    }
Exemplo n.º 4
0
    //显示编辑设备型号状态
    protected void Grid_EquipModel_RowEditing(object sender, GridViewEditEventArgs e)
    {
        Panel_NewName.Visible = false;
        UpdatePanel_NewName.Update();
        Panel_NewModel.Visible = false;
        UpdatePanel_NewModel.Update();
        Panel_Spare.Visible    = false;
        Panel_NewSpare.Visible = false;
        UpdatePanel_NewSpare.Update();
        Grid_EquipModel.EditIndex = e.NewEditIndex;
        string condition = GetCondition3();

        BindGrid_EquipModel(condition);
    }
Exemplo n.º 5
0
 protected void Clear_model_Click(object sender, EventArgs e)
 {
     Grid_EquipModel.EditIndex = -1;
     Panel_NewName.Visible     = false;
     UpdatePanel_NewName.Update();
     Panel_NewModel.Visible = false;
     UpdatePanel_NewModel.Update();
     Panel_Spare.Visible    = false;
     Panel_NewSpare.Visible = false;
     UpdatePanel_NewSpare.Update();
     Txtmodel.Text = "";
     BindGrid_EquipModel("and EN_ID ='" + new Guid(Label_enid.Text.ToString()) + "'");
     Panel1.Visible = false;
     UpdatePanel1.Update();
 }
Exemplo n.º 6
0
    //显示编辑设备名称状态
    protected void Grid_EquipName_RowEditing(object sender, GridViewEditEventArgs e)
    {
        Panel_NewName.Visible = false;
        UpdatePanel_NewName.Update();
        Panel_Model.Visible    = false;
        Panel_NewModel.Visible = false;
        UpdatePanel_NewModel.Update();
        Panel_Spare.Visible    = false;
        Panel_NewSpare.Visible = false;
        UpdatePanel_NewSpare.Update();
        Panel1.Visible = false;
        UpdatePanel1.Update();

        Grid_EquipName.EditIndex = e.NewEditIndex;
        BindGrid_EquipName("and EN_EquipName like '%" + Txtname.Text.ToString() + "%'");
    }
Exemplo n.º 7
0
    protected void Search_model_Click(object sender, EventArgs e)
    {
        Grid_EquipModel.EditIndex = -1;
        Panel_NewName.Visible     = false;
        UpdatePanel_NewName.Update();
        Panel_NewModel.Visible = false;
        UpdatePanel_NewModel.Update();
        Panel_Spare.Visible    = false;
        Panel_NewSpare.Visible = false;
        UpdatePanel_NewSpare.Update();
        Guid   eN_ID     = new Guid(Label_enid.Text.ToString());
        string condition = GetCondition3();

        Grid_EquipModel.DataSource = equipNameModelL.Search_EquipModelTableInfo(condition);
        Grid_EquipModel.DataBind();
        Panel1.Visible = false;
        UpdatePanel1.Update();
    }
Exemplo n.º 8
0
 protected void New_name_Click(object sender, EventArgs e)
 {
     Grid_EquipName.EditIndex     = -1;
     Grid_EquipName.SelectedIndex = -1;
     BindGrid_EquipName("");
     UpdatePanel_Name.Update();
     Clear();
     Panel_NewName.Visible = true;
     UpdatePanel_NewName.Update();
     Panel_Model.Visible    = false;
     Panel_NewModel.Visible = false;
     UpdatePanel_NewModel.Update();
     Panel_Spare.Visible    = false;
     Panel_NewSpare.Visible = false;
     UpdatePanel_NewSpare.Update();
     Panel1.Visible = false;
     UpdatePanel1.Update();
 }
Exemplo n.º 9
0
    //检索设备名称
    protected void Search_name_Click(object sender, EventArgs e)
    {
        Grid_EquipName.EditIndex = -1;
        string condition = GetCondition2();

        Grid_EquipName.DataSource = equipNameModelL.Search_EquipNameInfo(condition);
        Grid_EquipName.DataBind();
        UpdatePanel_Name.Update();
        Panel_NewName.Visible = false;
        UpdatePanel_NewName.Update();
        Panel_Model.Visible    = false;
        Panel_NewModel.Visible = false;
        UpdatePanel_NewModel.Update();
        Panel_Spare.Visible    = false;
        Panel_NewSpare.Visible = false;
        UpdatePanel_NewSpare.Update();
        Panel1.Visible = false;
        UpdatePanel1.Update();
    }
Exemplo n.º 10
0
    protected void Grid_EquipModel_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        Panel_NewName.Visible = false;
        UpdatePanel_NewName.Update();
        Panel_NewModel.Visible = false;
        UpdatePanel_NewModel.Update();
        Panel_NewSpare.Visible = false;
        UpdatePanel_NewSpare.Update();
        if (e.CommandName == "Look_Spare")//点击查看设备型号
        {
            //this.Label_enid.Text = Convert.ToString(e.CommandArgument);
            //string eN_ID = e.CommandArgument.ToString();
            GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow;
            Grid_EquipModel.SelectedIndex = row.RowIndex;

            Grid_EquipModel.EditIndex = -1;
            BindGrid_EquipModel("and EN_ID ='" + new Guid(Label_enid.Text.ToString()) + "'");
            Clear();
            string[] al     = e.CommandArgument.ToString().Split(new char[] { ',' });
            string   eMT_ID = al[0];
            Label_mid.Text = eMT_ID;
            string eMT_Type = al[1];
            Label_mname.Text    = eMT_Type;
            Panel_Spare.Visible = true;
            Label_enname1.Text  = Label_enname.Text;
            Label_mname1.Text   = Label_mname.Text;
            string condition = " AND x.EMT_ID='" + eMT_ID + "'";
            BindGrid_EquipSpare(condition);
            Panel1.Visible = false;
            UpdatePanel1.Update();
        }
        if (e.CommandName == "Delete_Model")
        {
            GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow;
            Grid_EquipModel.SelectedIndex = row.RowIndex;

            Guid EN_ID  = new Guid(Label_enid.Text.ToString());
            Guid EMT_ID = new Guid(Convert.ToString(e.CommandArgument));
            equipNameModelL.Delete_EquipModelTableInfo(EN_ID, EMT_ID);
            BindGrid_EquipModel("and EN_ID='" + Label_enid.Text.ToString() + "'");
            //this.UpdatePanel_Model.Update();
        }
    }
Exemplo n.º 11
0
    protected void Grid_EquipName_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        Panel_NewName.Visible = false;
        UpdatePanel_NewName.Update();
        Panel_NewModel.Visible = false;
        UpdatePanel_NewModel.Update();
        Panel_Spare.Visible    = false;
        Panel_NewSpare.Visible = false;
        UpdatePanel_NewSpare.Update();

        if (e.CommandName == "Look_Model")//点击查看设备型号
        {
            Clear();
            GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow;
            Grid_EquipName.SelectedIndex = row.RowIndex;
            //this.Label_enid.Text = Convert.ToString(e.CommandArgument);
            //string eN_ID = e.CommandArgument.ToString();
            string[] al    = e.CommandArgument.ToString().Split(new char[] { ',' });
            string   eN_ID = al[0];
            Label_enid.Text = eN_ID;
            string enname = al[1];
            Label_enname.Text   = enname;
            Panel_Model.Visible = true;
            Label_enname0.Text  = Label_enname.Text;
            BindGrid_EquipModel(" and EN_ID='" + eN_ID + "'");
            Panel1.Visible = false;
            UpdatePanel1.Update();
            Grid_EquipName.EditIndex = -1;
            BindGrid_EquipName("");
            UpdatePanel_Name.Update();
        }
        if (e.CommandName == "Delete_Name")
        {
            GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow;
            Grid_EquipName.SelectedIndex = row.RowIndex;

            Guid eN_ID = new Guid(Convert.ToString(e.CommandArgument));
            Label_enid.Text = Convert.ToString(eN_ID);
            equipNameModelL.Delete_EquipNameInfo(eN_ID);
            BindGrid_EquipName("");
            UpdatePanel_Name.Update();
        }
    }
Exemplo n.º 12
0
 protected void Clear_name_Click(object sender, EventArgs e)
 {
     Grid_EquipName.EditIndex = -1;
     Txtname.Text             = "";
     UpdatePanel_Searchname.Update();
     BindGrid_EquipName("");
     UpdatePanel_Name.Update();
     Panel_NewName.Visible = false;
     UpdatePanel_NewName.Update();
     Panel_Model.Visible    = false;
     Panel_NewModel.Visible = false;
     UpdatePanel_NewModel.Update();
     Panel_Spare.Visible    = false;
     Panel_NewSpare.Visible = false;
     UpdatePanel_NewSpare.Update();
     Panel1.Visible = false;
     UpdatePanel1.Update();
     ;
 }