コード例 #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["User"] == null)
     {
         MessageBoxResponse("You are not logged in, login timeout");
         return;
     }
     if (!IsPostBack)
     {
         if (Request.QueryString["ProjectNames"] != null)
         {
             string    sqlwhere = " PciID = " + Request.QueryString["ProjectNames"];
             DataTable td       = getTable.GetAllDataFromtblProjectCreate(sqlwhere);
             reptemNewProduct.DataSource = td;
             reptemNewProduct.DataBind();
         }
         BingData();
     }
 }
コード例 #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["User"] == null)
     {
         MessageBoxResponse("你尚未登录!或者注册!");
         return;
     }
     if (!IsPostBack)
     {
         if (Request.QueryString["ProjectNames"] != null)
         {
             string    sqlwhere = "PciName_c like '%" + Request.QueryString["ProjectNames"] + "%'";
             DataTable td       = getTable.GetAllDataFromtblProjectCreate(sqlwhere);
             reptemNewProduct.DataSource = td;
             reptemNewProduct.DataBind();
         }
         BingData();
     }
 }
コード例 #3
0
        private void BindDataOfProduct(string PID)
        {
            DataTable td = getTable.GetAllDataFromtblProjectCreate("PciID =" + PID);

            txtProjectName.Text         = td.Rows[0]["PciName_c"].ToString();
            txtZlH.Text                 = td.Rows[0]["PatentNumber"].ToString();
            txtAmount.Text              = td.Rows[0]["PciInvestMeony"].ToString();
            txtBilieShuoming.Text       = td.Rows[0]["stockRateIntroduction"].ToString();
            txtProjectIntroDuction.Text = td.Rows[0]["PciDescription_c"].ToString();
            txtApplyName.Text           = td.Rows[0]["FzrName"].ToString();
            txtAdress.Text              = td.Rows[0]["NewAdress"].ToString();
            txtPhone.Text               = td.Rows[0]["NewPhone"].ToString();
            hylicture.NavigateUrl       = td.Rows[0]["ImgPicturPath"].ToString();
            hylZs.NavigateUrl           = td.Rows[0]["PciRemark"].ToString();
            if (hylicture.NavigateUrl == "")
            {
                Label1.Text = "用户未上传图片";
            }
            DataTable tdInsert = getView.GetAllDataFrom_vwProjectInvestInfor("InsertProjectName ='" + txtProjectName.Text + "'");

            Repert.DataSource = tdInsert;
            Repert.DataBind();
        }
コード例 #4
0
 protected void rpItem_ItemCommand(object source, RepeaterCommandEventArgs e)
 {
     if (e.CommandName == "Delete")
     {
         string sql    = " DELETE FROM [XcXm].[dbo].[tblProjectCreate] WHERE PciID='" + e.CommandArgument + "'";
         int    Result = DB.CarryOutSqlSentence(sql);
         if (Result == 1)
         {
             MessaegBox("删除成功!");
         }
         else if (Result == 0)
         {
             MessaegBox("信息已经被其他管理员删除!");
         }
         else
         {
             MessaegBox("系统故障!");
         }
     }
     if (e.CommandName == "OK")
     {
         string    sql         = " UPDATE [XcXm].[dbo].[tblProjectCreate] SET PciState=30 WHERE  PciID='" + e.CommandArgument + "'";
         int       Result      = DB.CarryOutSqlSentence(sql);
         DataTable td          = getTable.GetAllDataFromtblProjectCreate("PciID =" + e.CommandArgument);
         string    ProjectName = td.Rows[0]["PciName_c"].ToString();
         string    UserId      = td.Rows[0]["UserId"].ToString();
         SendMessage(UserId, ProjectName, "已经");
         if (Result == 1)
         {
             MessaegBox("审核成功!");
         }
         else if (Result == 0)
         {
             MessaegBox("其他管理员已审核!");
         }
         else
         {
             MessaegBox("系统故障!");
         }
     }
     if (e.CommandName == "NotOK")
     {
         string    sql         = " UPDATE [XcXm].[dbo].[tblProjectCreate] SET PciState=-30 WHERE  PciID='" + e.CommandArgument + "'";
         int       Result      = DB.CarryOutSqlSentence(sql);
         DataTable td          = getTable.GetAllDataFromtblProjectCreate("PciID =" + e.CommandArgument);
         string    ProjectName = td.Rows[0]["PciName_c"].ToString();
         string    UserId      = td.Rows[0]["UserId"].ToString();
         SendMessage(UserId, ProjectName, "未能");
         if (Result == 1)
         {
             MessaegBox("审核成功!");
         }
         else if (Result == 0)
         {
             MessaegBox("其他管理员已审核!");
         }
         else
         {
             MessaegBox("系统故障!");
         }
     }
     if (e.CommandName == "Edit")
     {
         HttpCookie cokiecName = new HttpCookie("ProjectName");
         cokiecName.Value   = e.CommandArgument.ToString();
         cokiecName.Expires = DateTime.Now.AddSeconds(15);
         Response.Cookies.Add(cokiecName);
         Response.Redirect("~/BackendManage/ProjectInformation.aspx");
     }
     wucPager.Bind();
 }