Ejemplo n.º 1
0
 //删除
 protected void Delete_Click(object sender, EventArgs e)
 {
     try
     {
         int    id       = Convert.ToInt32(Request.QueryString["id"].ToString());
         int    attachId = applys.FindAttachmentID(id);
         string srcPath  = at.FindPath(attachId);
         if (attachId == 0 || srcPath == "")
         {
             Alert.Show("该成果应用不存在相关文档");
         }
         else
         {
             pm.DeleteFile(attachId, srcPath);
             Common.Entities.AchivementApply apply = applys.FindAll(id);
             apply.AttachmentID = null;
             applys.Update(apply);
             PageContext.RegisterStartupScript(ActiveWindow.GetConfirmHideReference() + Alert.GetShowInTopReference("删除成功!"));
         }
     }
     catch (Exception ex)
     {
         pm.SaveError(ex, this.Request);
     }
 }
Ejemplo n.º 2
0
        //初始化界面
        public void InitData()
        {
            try
            {
                Common.Entities.AchivementApply app = applys.FindAll(Convert.ToInt32(Session["AchievementApplyID"]));

                tApplyUnit.Text = app.ApplyUnit;
                if (app.EconomicBenefit != null)
                {
                    tEconomicBenefit.Text = app.EconomicBenefit;
                }
                else
                {
                    tEconomicBenefit.Text = "";
                }
                dEndTime.SelectedDate       = app.EndTime;
                dStartTime.SelectedDate     = app.StartTime;
                dSecrecyLevel.SelectedIndex = Convert.ToInt32(app.SecrecyLevel - 1);
                app.Use             = tUse.Text = app.Use;
                tAchievement.Text   = ach.FindAchieveName(Convert.ToInt32(app.AchievementID));
                TextAreaMember.Text = applys.FindName(Convert.ToInt32(app.AchivementApplyID));
                //app.AttachmentID = pm.UpLoad(filePhoto);
            }
            catch (Exception ex)
            {
                pm.SaveError(ex, this.Request);
            }
        }
Ejemplo n.º 3
0
 //初始化
 public void InitData()
 {
     try
     {
         int id = Convert.ToInt32(Request.QueryString["id"].ToString());
         Common.Entities.AchivementApply app = applys.FindAll(id);
         name.Text = ach.FindAchieveName(Convert.ToInt32(app.AchievementID));
         unit.Text = app.ApplyUnit;
         use.Text  = app.Use;
     }
     catch (Exception ex)
     {
         pm.SaveError(ex, this.Request);
     }
 }