Exemplo n.º 1
0
    //检索部门
    protected void Button1_Kil(object sender, EventArgs e)
    {
        string condition = GetDepartment();

        BindGridView_Organizationinfo(condition);
        UpdatePanel_Organization.Update();
    }
Exemplo n.º 2
0
 //取消安排部门
 protected void Button1_Cancel(object sender, EventArgs e)
 {
     try
     {
         Panel_Organization.Visible = false;
         UpdatePanel_Organization.Update();
     }
     catch (Exception)
     {
         throw;
     }
 }
Exemplo n.º 3
0
 //检索
 protected void Button1_Sh(object sender, EventArgs e)
 {
     try
     {
         string Condition = GetCondition();
         BindGridView_Projectinfo(Condition);
         UpdatePanel2_Project.Visible = true;
         UpdatePanel2_Project.Update();
         Panel_Organization.Visible = false;
         UpdatePanel_Organization.Update();
         Panel_ProjectSchedule.Visible = false;
         UpdatePanel_ProjectSchedule.Update();
         Panel_PSchedule.Visible = false;
         UpdatePanel_PSchedule.Update();
     }
     catch (Exception)
     {
         throw;
     }
 }
Exemplo n.º 4
0
 //重置
 protected void Button_CoMl(object sender, EventArgs e)
 {
     TextBox22.Text = "";
     BindGridView_Organizationinfo("");
     UpdatePanel_Organization.Update();
 }
Exemplo n.º 5
0
    //安排部门、设置进度、查看进度的链接
    protected void Gridview_Project_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        if (e.CommandName == "Check1")
        {
            GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow;
            Gridview2.SelectedIndex = row.RowIndex;
            label_supplytypeid.Text = Convert.ToString(e.CommandArgument);
            Guid      pps = new Guid(label_supplytypeid.Text);
            DataSet   ds  = prmp.SelectPRMProject_One(pps);
            DataTable dt  = ds.Tables[0];
            if (dt.Rows.Count > 0)
            {
                label_PNum.Text  = dt.Rows[0][1].ToString();
                label_PName.Text = dt.Rows[0][2].ToString();
            }
            label_arrange.Text = label_PNum.Text + "  " + label_PName.Text + "  " + "安排部门";
            BindGridView_Organizationinfo("");
            Panel_Organization.Visible = true;
            UpdatePanel_Organization.Update();
        }
        if (e.CommandName == "Check2")
        {
            // int index = Convert.ToInt32(e.CommandArgument);

            //GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow;
            GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow;
            Gridview2.SelectedIndex = row.RowIndex;
            label1_PanelSupply.Text = e.CommandArgument.ToString();
            string sg = "";
            label_supplytypeid.Text = Convert.ToString(e.CommandArgument);
            Guid      pps = new Guid(label_supplytypeid.Text);
            DataSet   ds  = prmp.SelectPRMProject_One(pps);
            DataTable dt  = ds.Tables[0];
            if (dt.Rows.Count > 0)
            {
                label_PNum.Text  = dt.Rows[0][1].ToString();
                label_PName.Text = dt.Rows[0][2].ToString();
                sg = dt.Rows[0][9].ToString();
            }
            if (Session["Department"].ToString() == sg)
            {
                TextBox1.Text                 = "";
                TextBox3.Text                 = "";
                TextBox2.Text                 = "";
                TextBox4.Text                 = "";
                labelcodition.Text            = "设置";
                Button6.Visible               = true;
                Button7.Visible               = true;
                Button9.Visible               = false;
                Gridview1.Columns[5].Visible  = true;
                Gridview1.Columns[6].Visible  = true;
                Panel_ProjectSchedule.Visible = true;
                Panel_PSchedule.Visible       = true;
                TextBox4.Enabled              = true;
                UpdatePanel_ProjectSchedule.Update();
                UpdatePanel_PSchedule.Update();
                label_Setting.Text = label_PNum.Text + "  " + label_PName.Text + "  " + "进度设置";
                label_JDB.Text     = label_PNum.Text + "  " + label_PName.Text + "  " + "进度表";
                BindGridView_ProjectSchedule(pps);
            }
            else
            {
                ScriptManager.RegisterClientScriptBlock(Page, GetType(), "aa", "alert('抱歉,你没有此权限!')", true);
                return;
            }
        }
        if (e.CommandName == "Look1")
        {
            GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow;
            Gridview2.SelectedIndex = row.RowIndex;
            label_supplytypeid.Text = Convert.ToString(e.CommandArgument);
            Guid      pps = new Guid(label_supplytypeid.Text);
            DataSet   ds  = prmp.SelectPRMProject_One(pps);
            DataTable dt  = ds.Tables[0];
            if (dt.Rows.Count > 0)
            {
                label_PNum.Text  = dt.Rows[0][1].ToString();
                label_PName.Text = dt.Rows[0][2].ToString();
            }
            label_JDB.Text = label_PNum.Text + "  " + label_PName.Text + "  " + "进度表";
            BindGridView_ProjectSchedule(pps);
            Panel_PSchedule.Visible = true;

            Gridview1.Columns[5].Visible = false;
            Gridview1.Columns[6].Visible = false;
            Button6.Visible = false;
            Button7.Visible = false;
            Button9.Visible = true;
            UpdatePanel_PSchedule.Update();
        }
    }