Пример #1
0
    //显示编辑
    protected void Grid_Third_RowEditing(object sender, GridViewEditEventArgs e)
    {
        Panel_NewThird.Visible = false;
        UpdatePanel_NewThird.Update();
        Grid_Third.EditIndex = e.NewEditIndex;
        string condition = GetCondition3();

        BindGrid_Third(condition);
    }
Пример #2
0
 protected void Btn_NewThird_Click(object sender, EventArgs e)
 {
     Grid_Third.EditIndex     = -1;
     Grid_Third.SelectedIndex = -1;
     BindGrid_Third("");
     UpdatePanel_Third.Update();
     Clear();
     Panel_NewThird.Visible = true;
     UpdatePanel_NewThird.Update();
 }
Пример #3
0
 protected void Btn_ClearThird_Click(object sender, EventArgs e)
 {
     Grid_Third.EditIndex = -1;
     TextType.Text        = "";
     TextDocCode.Text     = "";
     BindGrid_Third("");
     UpdatePanel_Third.Update();
     Panel_NewThird.Visible = false;
     UpdatePanel_NewThird.Update();
 }
Пример #4
0
    protected void Btn_SearchThird_Click(object sender, EventArgs e)
    {
        Grid_Third.EditIndex = -1;
        string condition = GetCondition3();

        BindGrid_Third(condition);
        Panel_Third.Visible = true;
        UpdatePanel_Third.Update();
        Panel_NewThird.Visible = false;
        UpdatePanel_NewThird.Update();
    }
Пример #5
0
    //Gridview删除
    protected void Grid_Third_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        Panel_NewThird.Visible = false;
        UpdatePanel_NewThird.Update();

        if (e.CommandName == "Delete_Third")
        {
            GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow;
            Grid_BDOS.SelectedIndex = row.RowIndex;

            Guid CDTLC_ID = new Guid(Convert.ToString(e.CommandArgument));
            basicCodeL.Delete_CDThirdLevelCode(CDTLC_ID);
            BindGrid_Third("");
            UpdatePanel_BDOS.Update();
        }
    }
Пример #6
0
    //新增确认
    protected void BtnOK_NewThird_Click(object sender, EventArgs e)
    {
        if (newType.Text.ToString() == "" || newDocCode.Text.ToString() == "")
        {
            ScriptManager.RegisterStartupScript(Page, typeof(Page), "alert", "alert('标记*的为必填项,请填写完整!')", true);
            return;
        }
        string    cDTLC_DocType = newType.Text.ToString();
        string    cDTLC_Code    = newDocCode.Text.ToString();
        DataSet   ds            = basicCodeL.Search_CDThirdLevelCode("and (CDTLC_DocType = '" + cDTLC_DocType + "' or CDTLC_Code = '" + cDTLC_Code + "')");
        DataTable dt            = ds.Tables[0];

        if (dt.Rows.Count != 0)
        {
            ScriptManager.RegisterStartupScript(Page, typeof(Page), "alert", "alert('已有此文件类别代码,不能重复!')", true);
            return;
        }
        basicCodeL.Insert_CDThirdLevelCode(cDTLC_DocType, cDTLC_Code);
        BindGrid_Third("");
        UpdatePanel_Third.Update();
        Panel_NewThird.Visible = false;
        UpdatePanel_NewThird.Update();
    }
Пример #7
0
 //新增取消
 protected void BtnCancel_NewThird_Click(object sender, EventArgs e)
 {
     Panel_NewThird.Visible = false;
     UpdatePanel_NewThird.Update();
 }