示例#1
0
 protected void Btn_cancel0_Click(object sender, EventArgs e)
 {
     Panel_areal.Visible     = false;
     Panel_arealedit.Visible = false;
     Panel_newareal.Visible  = false;
     UpdatePanel_areal.Update();
     UpdatePanel_arealedit.Update();
     UpdatePanel_newareal.Update();
 }
示例#2
0
    }//databind ,用于调整格式

    protected void GridView_areal_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        if (e.CommandName == "Delete3")
        {
            GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow;
            GridView_IMStore.SelectedIndex = row.RowIndex;
            GridView_IMStore.SelectedIndex = -1;

            string id      = e.CommandArgument.ToString();
            Guid   guid_id = new Guid(id);
            PSB.D_IMstore_Areal(guid_id);
            GridView_areal.DataSource = PSB.S_STOREareal(areal_guid);
            GridView_areal.DataBind();
            UpdatePanel_areal.Update();
            UpdatePanel_arealedit.Update();
        }
    }
示例#3
0
    protected void GridView_IMStore_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        if (e.CommandName == "bianji")
        {
            flag_STOre            = 0;
            Session["store11_id"] = e.CommandArgument.ToString();
            GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow;
            GridView_IMStore.SelectedIndex = row.RowIndex;
            GridView_IMStore.SelectedIndex = -1;

            string Store_name = row.Cells[1].Text.Trim().ToString();
            i = 0;
            TextBox_Store.Text            = Store_name;
            TextBox_Store.ReadOnly        = true;
            TextBox_Store.Enabled         = false;
            TextBox_StoreManger.Text      = "";
            TextBox_StoreManger0.Text     = "";
            TextBox_StoreManger.ReadOnly  = true;
            TextBox_StoreManger.Enabled   = false;
            TextBox_StoreManger0.ReadOnly = true;
            TextBox_StoreManger0.Enabled  = false;
            Panel_EditStore.Visible       = true;
            UpdatePanel_EditStore.Update();
        }
        else
        if (e.CommandName == "dele")
        {
            string id      = e.CommandArgument.ToString();
            Guid   guid_id = new Guid(id);
            PSB.D_IMstore(guid_id);

            GridView_IMStore.DataSource = PSB.SList_Istore();
            GridView_IMStore.DataBind();
            UpdatePanel_IMStore.Update();

            ScriptManager.RegisterStartupScript(Page, typeof(Page), "alert", "alert('删除成功!')", true);
            return;
        }
        else
        if (e.CommandName == "SET")
        {
            Panel_areal.Visible     = true;
            Panel_arealedit.Visible = true;

            GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow;
            GridView_IMStore.SelectedIndex = row.RowIndex;
            GridView_IMStore.SelectedIndex = -1;
            Store_Name = row.Cells[1].Text.Trim().ToString();
            string id      = e.CommandArgument.ToString();
            Guid   guid_id = new Guid(id);
            areal_guid = guid_id;
            GridView_areal.DataSource = PSB.S_STOREareal(areal_guid);
            GridView_areal.DataBind();
            UpdatePanel_areal.Update();
            UpdatePanel_arealedit.Update();
        }
        else
        if (e.CommandName == "SEE")
        {
            Panel_areal.Visible = true;

            GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow;
            GridView_IMStore.SelectedIndex = row.RowIndex;
            GridView_IMStore.SelectedIndex = -1;
            Store_Name = row.Cells[1].Text.Trim().ToString();
            string id      = e.CommandArgument.ToString();
            Guid   guid_id = new Guid(id);
            areal_guid = guid_id;
            GridView_areal.DataSource = PSB.S_STOREareal(areal_guid);
            GridView_areal.DataBind();
            GridView_areal.Columns[4].Visible = false;
            GridView_areal.Columns[5].Visible = false;
            UpdatePanel_areal.Update();
            UpdatePanel_arealedit.Update();
        }
    } //linkbutton链接按钮根据自身Commandname来触发不同事件