Exemplo n.º 1
0
 protected void Btn_EditCancel_Click(object sender, EventArgs e)
 {
     Panel_EditStore.Visible = false;
     Panel_findMan.Visible   = false;
     UpdatePanel_EditStore.Update();
     UpdatePanel_findMan.Update();
 }
Exemplo n.º 2
0
 protected void Btn_renewl0_Click(object sender, EventArgs e)//重新添加管理人员与部门
 {
     i = 0;
     TextBox_StoreManger.Text  = "";
     TextBox_StoreManger0.Text = "";
     UpdatePanel_EditStore.Update();
     UpdatePanel_findMan.Update();
 }
Exemplo n.º 3
0
    }  //读取go前textbox,导航到指定页面

    #endregion

    protected void Btn_NewStore_Click(object sender, EventArgs e)//新增库房
    {
        flag_STOre                = 1;
        i                         = 0;
        TextBox_Store.ReadOnly    = false;
        TextBox_Store.Enabled     = true;
        TextBox_Store.Text        = "";
        TextBox_StoreManger.Text  = "";
        TextBox_StoreManger0.Text = "";
        Panel_EditStore.Visible   = true;
        UpdatePanel_EditStore.Update();
    }
Exemplo n.º 4
0
    }  //读取go前textbox,导航到指定页面

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

            // this.Lab_State.Text = "Delete1";
            string   id  = e.CommandArgument.ToString();
            CheckBox box = (CheckBox)row.FindControl("CheckBox2");
            box.Checked = true;
            string depart = row.Cells[2].Text.Trim().ToString();
            string Name   = row.Cells[3].Text.Trim().ToString();
            int    j      = 0;
            int    flag   = 0;
            for (j = 0; j < i; j++)
            {
                if (depart.ToString() == a[j].ToString())
                {
                    flag = 1;
                }
            }
            if (flag == 0)
            {
                TextBox_StoreManger0.Text = TextBox_StoreManger0.Text.Trim().ToString() + depart + ",";
                a[i] = depart;
                i++;
            }
            else
            {
                flag = 0;
                TextBox_StoreManger0.Text = TextBox_StoreManger0.Text.Trim().ToString();
            }

            TextBox_StoreManger.Text = TextBox_StoreManger.Text.Trim().ToString() + Name + ",";
            UpdatePanel_findMan.Update();
            UpdatePanel_EditStore.Update();
        }
    }
Exemplo n.º 5
0
    protected void Btn_EditStore_Click(object sender, EventArgs e)
    {
        if (flag_STOre == 1)
        {
            imssdinfo.Flag          = 1;
            imssdinfo.IMS_StoreName = TextBox_Store.Text.Trim().ToString();

            if (TextBox_Store.Text.Trim().ToString() != "" && TextBox_StoreManger.Text.Trim().ToString() != "" && TextBox_StoreManger0.Text.Trim().ToString() != "")
            {
                DataSet   ds = PSB.SList_Imstore_Name(TextBox_Store.Text.Trim().ToString());
                DataTable dt = ds.Tables[0];
                DataView  dv = ds.Tables[0].DefaultView;
                if (dt.Rows.Count != 0)
                {
                    ScriptManager.RegisterStartupScript(Page, typeof(Page), "alert", "alert('系统中已有该库房名称,不能重名!')", true);
                    return;
                }
                else
                {
                    imssdinfo.IMS_ResponDepart = TextBox_StoreManger0.Text.Trim().ToString().Substring(0, TextBox_StoreManger0.Text.Trim().ToString().Length - 1);
                    imssdinfo.IMS_ResponMan    = TextBox_StoreManger.Text.Trim().ToString().Substring(0, TextBox_StoreManger.Text.Trim().ToString().Length - 1);
                    PSB.I_IMstore_new(imssdinfo);
                    GridView_IMStore.DataSource = PSB.SList_Istore();
                    GridView_IMStore.DataBind();
                    Panel_EditStore.Visible = false;
                    Panel_findMan.Visible   = false;
                    UpdatePanel_EditStore.Update();
                    UpdatePanel_findMan.Update();
                    UpdatePanel_IMStore.Update();

                    ScriptManager.RegisterStartupScript(Page, typeof(Page), "alert", "alert('库房新增成功!')", true);
                    return;
                }
            }
            else
            {
                if (TextBox_Store.Text.Trim().ToString() == "")
                {
                    ScriptManager.RegisterStartupScript(Page, typeof(Page), "alert", "alert('库房名称不能为空!')", true);
                    return;
                }
                else
                {
                    ScriptManager.RegisterStartupScript(Page, typeof(Page), "alert", "alert('请选择管理人员及部门!')", true);
                    return;
                }
            }
        }
        else
        if (flag_STOre == 0)
        {
            imssdinfo.Flag = 0;
            Guid STORE_ID = new Guid(Session["store11_id"].ToString());
            imssdinfo.IMS_StoreID = STORE_ID;

            imssdinfo.IMS_StoreName    = TextBox_Store.Text.Trim().ToString();
            imssdinfo.IMS_ResponDepart = TextBox_StoreManger0.Text.Trim().ToString().Substring(0, TextBox_StoreManger0.Text.Trim().ToString().Length - 1);
            imssdinfo.IMS_ResponMan    = TextBox_StoreManger.Text.Trim().ToString().Substring(0, TextBox_StoreManger.Text.Trim().ToString().Length - 1);
            PSB.I_IMstore_new(imssdinfo);
            GridView_IMStore.DataSource = PSB.SList_Istore();
            GridView_IMStore.DataBind();
            Panel_EditStore.Visible = false;
            Panel_findMan.Visible   = false;
            UpdatePanel_EditStore.Update();
            UpdatePanel_findMan.Update();
            UpdatePanel_IMStore.Update();

            ScriptManager.RegisterStartupScript(Page, typeof(Page), "alert", "alert('库房修改成功!')", true);
            return;
        }
    }
Exemplo n.º 6
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来触发不同事件