Ejemplo n.º 1
0
 //关闭提交申请单
 protected void CanelProject(object sender, EventArgs e)
 {
     TextBox2.Text = "";
     TextBox4.Text = "";
     Panel_NewProjectInfo.Visible = false;
     UpdatePanel_NewProjectInfo.Update();
 }
Ejemplo n.º 2
0
    //提交申请单
    protected void ConfirmProject(object sender, EventArgs e)
    {
        string SNeed = "";
        string Note  = "";

        if (TextBox4.Text != "")
        {
            SNeed = TextBox4.Text.ToString();
        }
        if (TextBox2.Text != "")
        {
            Note = TextBox2.Text.ToString();
        }
        if (label_Change.Text == "新增特殊产品申请单")
        {
            int p = psd.InsertProType_Special(SNeed, Note, Session["UserName"].ToString(), label_AccNum.Text, label_AccName.Text, Label_FilePath.Text);
            if (p > 0)
            {
                ScriptManager.RegisterClientScriptBlock(Page, GetType(), "aa", "alert('提交成功,请选择会签部门!')", true);
            }
            else
            {
                ScriptManager.RegisterClientScriptBlock(Page, GetType(), "aa", "alert('提交失败!')", true);
                return;
            }
        }
        else
        {
            psd.UpdateProType_Special(new Guid(label_PT_ID.Text.ToString()), SNeed, Note, label_AccNum.Text, label_AccName.Text, Label_FilePath.Text);
        }
        string condition = Getcondition();

        BindGriview2(condition);
        UpdatePanel_Preserve.Update();
        TextBox2.Text = "";
        TextBox4.Text = "";

        Panel_NewProjectInfo.Visible = false;
        UpdatePanel_NewProjectInfo.Update();
    }
Ejemplo n.º 3
0
    protected void Gridview2_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        if (e.CommandName == "Edit1")//编辑
        {
            GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow;
            Gridview2.SelectedIndex = row.RowIndex;
            label_PT_ID.Text        = e.CommandArgument.ToString();
            string    condition = "and PT_ID='" + new Guid(label_PT_ID.Text) + "'";
            DataSet   ds        = psd.SelectProType_Special(condition);
            DataTable dt        = ds.Tables[0];
            if (dt.Rows.Count > 0)
            {
                label_Change.Text = dt.Rows[0][28].ToString() + "申请单修改";
                TextBox4.Text     = dt.Rows[0][12].ToString();
                TextBox2.Text     = dt.Rows[0][19].ToString();
            }
            Panel_NewProjectInfo.Visible = true;
            UpdatePanel_NewProjectInfo.Update();
        }

        if (e.CommandName == "Cancel1")//删除
        {
            try
            {
                GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow;
                Gridview2.SelectedIndex = row.RowIndex;
                label_PT_ID.Text        = e.CommandArgument.ToString();
                psd.DeleteProType_Special(new Guid(label_PT_ID.Text));
                BindGriview2("");
                UpdatePanel_Preserve.Update();
            }
            catch (Exception)
            {
                ScriptManager.RegisterStartupScript(Page, typeof(Page), "alert", "alert('已经选择了会签部门或制定了下一步信息,无法删除只能修改!')", true);
                return;
            }
        }
        if (e.CommandName == "SelectDept")//选择会签部门
        {
            GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow;
            Gridview2.SelectedIndex = row.RowIndex;
            label_PT_ID.Text        = e.CommandArgument.ToString();
            BindGridview3("");
            Panel_Org.Visible = true;
            UpdatePanel_Org.Update();
        }
        if (e.CommandName == "Design")//会签
        {
            GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow;
            Gridview2.SelectedIndex = row.RowIndex;
            label_PT_ID.Text        = e.CommandArgument.ToString();
            string condition = "and PT_ID='" + new Guid(label_PT_ID.Text) + "'";
            BindGridview4(condition);
            Gridview4.Columns[8].Visible = false;
            Gridview4.Columns[7].Visible = true;
            Panel_Sign.Visible           = true;
            UpdatePanel_Sign.Update();
        }
        if (e.CommandName == "Look")//查看会签
        {
            GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow;
            Gridview2.SelectedIndex = row.RowIndex;
            label_PT_ID.Text        = e.CommandArgument.ToString();
            string condition = "and PT_ID='" + new Guid(label_PT_ID.Text) + "'";
            BindGridview4(condition);
            //this.Gridview4.Columns[7].Visible = false;
            //this.Gridview4.Columns[8].Visible = true;
            Panel_Sign.Visible = true;
            UpdatePanel_Sign.Update();
        }
        if (e.CommandName == "Make")//制作
        {
            GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow;
            Gridview2.SelectedIndex = row.RowIndex;
            label_PT_ID.Text        = e.CommandArgument.ToString();
            string[] al = e.CommandArgument.ToString().Split(new char[] { ',' });
            Response.Redirect("../ProductionBasicInfo/PBProType.aspx?state=specialmake&PT_ID=" + new Guid(label_PT_ID.Text));
        }
        if (e.CommandName == "Lookinfo")//查看基础数据
        {
            GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow;
            Gridview2.SelectedIndex = row.RowIndex;
            label_PT_ID.Text        = e.CommandArgument.ToString();
            string[] al = e.CommandArgument.ToString().Split(new char[] { ',' });
            Response.Redirect("../ProductionBasicInfo/PBProType.aspx?state=speciallook&PT_ID=" + new Guid(label_PT_ID.Text));
        }
        if (e.CommandName == "MAcc")//制定时上传附件
        {
            GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow;
            Gridview2.SelectedIndex = row.RowIndex;
            label_Acc.Text          = "制定";
            label_PT_ID.Text        = e.CommandArgument.ToString();
            ShowPanel();
            UpdatePanel4.Update();
        }
        if (e.CommandName == "printpreview")//打印报表
        {
            GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow;
            Gridview2.SelectedIndex = row.RowIndex;
            try
            {
                Response.Redirect("../REPORT_cc/ProSpecialPrint.aspx?" + "&PT_ID=" + Gridview2.DataKeys[row.RowIndex].Values["PT_ID"].ToString());
            }
            catch (Exception)
            {
                throw;
            }
        }
    }
Ejemplo n.º 4
0
 //新增特殊产品申请单
 protected void Button_New(object sender, EventArgs e)
 {
     label_Change.Text            = "新增特殊产品申请单";
     Panel_NewProjectInfo.Visible = true;
     UpdatePanel_NewProjectInfo.Update();
 }