Exemple #1
0
    //驳回
    protected void ButtonUnpass(object sender, EventArgs e)
    {
        Guid   PTC_ID;
        string PTC_Man        = "";
        string PTC_State      = "";
        string PTC_Suggestion = "";

        if (TextBox15.Text != "")
        {
            PTC_Suggestion = TextBox15.Text.ToString();
        }
        PTC_ID    = new Guid(label_PTC_ID.Text.ToString());
        PTC_Man   = Session["UserName"].ToString();
        PTC_State = "驳回";
        psd.UpdatePTCountersign(PTC_ID, PTC_Man, PTC_State, PTC_Suggestion);

        psd.UpdatePTCSate(new Guid(label_PT_ID.Text.ToString()), "会签驳回");

        string condition = Getcondition();

        BindGriview2(condition);
        string conditionn = "and PT_ID='" + new Guid(label_PT_ID.Text) + "'";

        BindGridview4(conditionn);
        UpdatePanel_Sign.Update();
        UpdatePanel_Preserve.Update();
        TextBox15.Text = "";
        Panel4.Visible = false;
        Panel2.Visible = false;
        UpdatePanel2.Update();
    }
Exemple #2
0
    //检索
    protected void Button_Sh1(object sender, EventArgs e)
    {
        string condition = Getcondition();

        BindGriview2(condition);
        Panel_Preserve.Visible = true;
        UpdatePanel_Preserve.Update();
    }
Exemple #3
0
 //重置
 protected void Button_Reset(object sender, EventArgs e)
 {
     Mory.Text            = "";
     TextBox1.Text        = "";
     TextBox_SPTime2.Text = "";
     BindGriview2("");
     Panel_Preserve.Visible = true;
     UpdatePanel_Preserve.Update();
 }
Exemple #4
0
    //通过
    protected void ButtonPass(object sender, EventArgs e)
    {
        Guid   PTC_ID;
        string PTC_Man        = "";
        string PTC_State      = "";
        string PTC_Suggestion = "";

        if (TextBox15.Text != "")
        {
            PTC_Suggestion = TextBox15.Text.ToString();
        }
        PTC_ID    = new Guid(label_PTC_ID.Text.ToString());
        PTC_Man   = Session["UserName"].ToString();
        PTC_State = "通过";

        psd.UpdatePTCountersign(PTC_ID, PTC_Man, PTC_State, PTC_Suggestion);
        string conditionnn = "and PT_ID='" + new Guid(label_PT_ID.Text) + "'";

        BindGridview4(conditionnn);
        int i = 0;

        foreach (GridViewRow item in Gridview4.Rows)
        {
            if (item.Cells[2].Text == "通过")
            {
                i = i + 1;
            }
            if (item.Cells[2].Text == "驳回")
            {
                i = -1;
            }
        }
        if (i == Gridview4.Rows.Count)
        {
            psd.UpdatePTCSate(new Guid(label_PT_ID.Text.ToString()), "会签通过");
        }
        if (i < Gridview4.Rows.Count && i != -1)
        {
            psd.UpdatePTCSate(new Guid(label_PT_ID.Text.ToString()), "会签中");
        }
        string condition = Getcondition();

        BindGriview2(condition);
        string conditionn = "and PT_ID='" + new Guid(label_PT_ID.Text) + "'";

        BindGridview4(conditionn);
        UpdatePanel_Sign.Update();
        UpdatePanel_Preserve.Update();
        TextBox15.Text = "";
        Panel4.Visible = false;
        Panel2.Visible = false;
        UpdatePanel2.Update();
    }
Exemple #5
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();
    }
Exemple #6
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;
            }
        }
    }
Exemple #7
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            ClosePanel();
            if (Request.QueryString["state"] == null)
            {
                label_pagestate.Text = "look";
            }
            else
            {
                label_pagestate.Text = Request.QueryString["state"];
            }
            string state = label_pagestate.Text;
            if (state == "look")
            {
                Title           = "特殊产品查看";
                Button3.Visible = false;//新增特殊产品按钮
                Gridview2.Columns[8].Visible  = false;
                Gridview2.Columns[9].Visible  = false;
                Gridview2.Columns[10].Visible = false;
                Gridview2.Columns[11].Visible = false;
                Gridview2.Columns[12].Visible = false;
                Gridview2.Columns[15].Visible = false;
                Gridview4.Columns[7].Visible  = false;
                Gridview4.Columns[8].Visible  = false;
            }
            if (state == "make")
            {
                Title           = "特殊产品制定";
                Button3.Visible = false;//新增特殊产品按钮
                Gridview2.Columns[8].Visible  = false;
                Gridview2.Columns[9].Visible  = false;
                Gridview2.Columns[10].Visible = false;
                Gridview2.Columns[11].Visible = true;
                Gridview2.Columns[12].Visible = false;

                Gridview4.Columns[7].Visible = false;
                Gridview4.Columns[8].Visible = false;
            }
            if (state == "apply")
            {
                Title           = "特殊产品申请";
                Button3.Visible = true;//新增特殊产品按钮
                Gridview2.Columns[8].Visible  = true;
                Gridview2.Columns[9].Visible  = true;
                Gridview2.Columns[10].Visible = true;
                Gridview2.Columns[11].Visible = false;
                Gridview2.Columns[12].Visible = false;
                Gridview2.Columns[15].Visible = false;
                Gridview4.Columns[7].Visible  = false;
                Gridview4.Columns[8].Visible  = true;
            }
            if (state == "cs")
            {
                Title = "特殊产品会签";

                Button3.Visible = false;//新增特殊产品按钮
                Gridview2.Columns[8].Visible  = false;
                Gridview2.Columns[9].Visible  = false;
                Gridview2.Columns[10].Visible = false;
                Gridview2.Columns[11].Visible = false;
                Gridview2.Columns[12].Visible = true;
                Gridview2.Columns[13].Visible = false;
                Gridview4.Columns[7].Visible  = true;
                Gridview4.Columns[8].Visible  = false;
                Gridview2.Columns[15].Visible = false;
            }
            BindGriview2("");
            Panel_Preserve.Visible = true;
            UpdatePanel_Preserve.Update();
        }
    }