Exemplo n.º 1
0
 protected void Button2_Click(object sender, EventArgs e)
 {
     ExtendBLL.OpentProject extendopproject = new ExtendBLL.OpentProject();
     string strID = lbCID.Text;
     string strAlert = "删除成功!";
     try
     {
         extendopproject.Delete(int.Parse(strID));
     }
     catch (Exception ex)
     {
         lbErr.Text = ex.Message;
         lbErr.Visible = true;
         return;
     }
     if (tbWhere.Value == "1")
     {
         Common.JShelper.JSAlertAndRedirect(Page, "success", strAlert, "currentopenprojectlist.aspx");
     }
     else if (tbWhere.Value == "0")
     {
         Common.JShelper.JSAlertAndRedirect(Page, "success", strAlert, "openprojectlist.aspx");
     }
 }
Exemplo n.º 2
0
 protected void btnApp_Click(object sender, EventArgs e)
 {
     Button btn = (Button)sender;
     string strAudit = "";
     string strAlert = "";
     if (btn.ID == "btnCancelApp")
     {
         strAudit = "0";
         strAlert = "撤销申请成功!";
     }
     if (btn.ID == "btnApp")
     {
         strAudit = "1";
         strAlert = "申请成功,请等待审核!";
     }
     if (btn.ID == "tbnCheck")
     {
         strAudit = "3";
         strAlert = "审核成功!";
     }
     if (btn.ID == "tbnUnChek")
     {
         strAudit = "2";
         strAlert = "审核成功!";
     }
     ExtendBLL.OpentProject extendopproject = new ExtendBLL.OpentProject();
     string strID = lbCID.Text;
     try
     {
         if (btn.ID == "btnApp" || btn.ID == "btnCancelApp")
         {
             extendopproject.UpdateStatus(strAudit, strID);
         }
         else
         {
             string strChecker = "";//用户名
             string strCheckContent = tbCheckContent.Text.Trim();
             extendopproject.SetCheck(strAudit, strID, DateTime.Today.ToShortDateString(), strChecker, strCheckContent);
         }
     }
     catch (Exception ex)
     {
         lbErr.Text = ex.Message;
         lbErr.Visible = true;
         return;
     }
     if (tbWhere.Value == "1")
     {
         Common.JShelper.JSAlertAndRedirect(Page, "success", strAlert, "openprojectperview.aspx?ID=" + strID);
     }
     else if (tbWhere.Value == "0")
     {
         Common.JShelper.JSAlertAndRedirect(Page, "success", strAlert, "openprojectperview.aspx?ID=" + strID + "&where=0");
     }
 }