Пример #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!this.IsPostBack)
     {
         if (!string.IsNullOrEmpty(Request.Params["DeleteId"]))
         {
             Tunnel.BLL.Tunnel_ProJectMent TPBll = new Tunnel.BLL.Tunnel_ProJectMent();
             TPBll.Delete(int.Parse(Request.Params["DeleteId"]));
             //Tunnel.Data.DbHelperSQL.ExecuteSql("Update Tunnel_ProJectMent Set Pro_Status=-1 Where Pro_id=" + int.Parse(Request.Params["DeleteId"]));
             Tunnel.BLL.Tunnel_bum TbBll = new Tunnel.BLL.Tunnel_bum();
             Tunnel.Common.Message.Show("删除成功!");
         }
         if (!string.IsNullOrEmpty(Request.Params["PauseId"]))
         {
             Tunnel.Data.DbHelperSQL.ExecuteSql("Update Tunnel_ProJectMent Set Pro_Status=1 Where Pro_id=" + int.Parse(Request.Params["PauseId"]));
             Tunnel.Common.Message.Show("操作成功!");
         }
         if (!string.IsNullOrEmpty(Request.Params["CloseId"]))
         {
             Tunnel.Data.DbHelperSQL.ExecuteSql("Update Tunnel_ProJectMent Set Pro_Status=2 Where Pro_id=" + int.Parse(Request.Params["CloseId"]));
             Tunnel.Common.Message.Show("操作成功!");
         }
         if (!string.IsNullOrEmpty(Request.Params["OpenId"]))
         {
             Tunnel.Data.DbHelperSQL.ExecuteSql("Update Tunnel_ProJectMent Set Pro_Status=0 Where Pro_id=" + int.Parse(Request.Params["OpenId"]));
             Tunnel.Common.Message.Show("操作成功!");
         }
         this.Bind();
     }
 }
Пример #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         if (!string.IsNullOrEmpty(Request.Params["ProJectId"]))
         {
             Tunnel.Model.Tunnel_ProJectMent TPModel = new Tunnel.Model.Tunnel_ProJectMent();
             Tunnel.BLL.Tunnel_ProJectMent   TPBll   = new Tunnel.BLL.Tunnel_ProJectMent();
             TPModel     = TPBll.GetModel(int.Parse(Request.Params["ProJectId"]));
             Label1.Text = Page.Title = TPModel.Pro_Name;
             IsSubmit(Label2, TPModel.Pro_ManEndDate, HyperLink1, HyperLink7);
             IsSubmit(Label3, TPModel.Pro_ContractEndDate, HyperLink2, HyperLink8);
             IsSubmit(Label4, TPModel.Pro_EquipmentEndDate, HyperLink3, HyperLink9);
             IsSubmit(Label5, TPModel.Pro_MaterialEndDate, HyperLink4, HyperLink10);
             IsSubmit(Label6, TPModel.Pro_PlanEndDate, HyperLink5, HyperLink11);
             IsSubmit(Label7, TPModel.Pro_SecurityEndDate, HyperLink6, HyperLink12);
         }
     }
 }
Пример #3
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        Tunnel_ProJectMent TPModel = new Tunnel_ProJectMent();

        TPModel.Pro_Title     = tb_Title.Text.Trim();
        TPModel.Pro_Name      = tb_Title0.Text.Trim();
        TPModel.Pro_Manager   = 0;
        TPModel.Pro_StartDate = Convert.ToDateTime(tb_Title1.Text.Trim());

        //人员需求计划
        TPModel.Pro_ManDate = Convert.ToDateTime(tb_Title2.Text.Trim());
        //合同签订计划
        TPModel.Pro_ContractDate = Convert.ToDateTime(tb_Title3.Text.Trim());
        //设备需求计划
        TPModel.Pro_EquipmentDate = Convert.ToDateTime(tb_Title4.Text.Trim());
        //材料进场计划
        TPModel.Pro_MaterialDate = Convert.ToDateTime(tb_Title5.Text.Trim());
        //施工方案编制计划
        TPModel.Pro_PlanDate = Convert.ToDateTime(tb_Title6.Text.Trim());
        //安全申报计划
        TPModel.Pro_SecurityDate = Convert.ToDateTime(tb_Title7.Text.Trim());

        Tunnel.BLL.Tunnel_ProJectMent TPBll = new Tunnel.BLL.Tunnel_ProJectMent();
        int ReSult = TPBll.Add(TPModel);

        if (ReSult > 0)
        {
            Tunnel_bum TbModel = new Tunnel_bum();
            TbModel.b_name      = tb_Title0.Text.Trim();
            TbModel.b_depict    = tb_Title.Text.Trim();
            TbModel.b_hid       = 0;
            TbModel.b_projectid = ReSult;
            Tunnel.BLL.Tunnel_bum TbBll = new Tunnel.BLL.Tunnel_bum();
            if (TbBll.Add(TbModel) > 0)
            {
                Tunnel.Common.Message.Show("项目新建成功!");
            }
        }
    }