Example #1
0
 protected void gv_Result_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     if (e.CommandName.Equals("Del"))
     {
         string id     = e.CommandArgument.ToString();
         string result = GroupCommunicationWorkBusiness.DeleteGroupCommunication(Int32.Parse(id));
         if (!result.Equals("ok"))
         {
             ScriptManager.RegisterStartupScript(UpdatePanel1, this.GetType(), "alter", "alert('删除失败,请重新再试!')", true);
             return;
         }
         LogInfoBusiness.AddLogInfo(Convert.ToInt32(log_userid), DateTime.Now, Convert.ToInt32(log_usertype), log_username, 3, "团组交流工作信息", log_ip, log_account);//删除添加日志 操作类型->3
         RefreshView(0);
     }
 }
Example #2
0
 private void RefreshView(int NewIndex)
 {
     try
     {
         int    size = this.gv_Result.PageSize;
         int    communicationTypeId = Convert.ToInt32(ddl_communicationType.SelectedValue);
         string groupArea           = tb_GroupArea.Text;
         var    ps = GroupCommunicationWorkBusiness.GetCommunications(size, communicationTypeId, groupArea);
         this.gv_Result.PageIndex  = NewIndex;
         this.gv_Result.DataSource = new PagedCollection <GroupCommunicationWork>(ps, NewIndex);
         this.gv_Result.DataBind();
         this.Label_Result.Text = ps.GetResultCount().ToString();
     }
     catch
     {
         ScriptManager.RegisterStartupScript(UpdatePanel1, this.GetType(), "alter", "alert('数据加载错误!')", true);
     }
 }
Example #3
0
 protected void Button3_Click(object sender, EventArgs e)
 {
     try
     {
         int    communicationTypeId    = Convert.ToInt32(ddl_CommunicationType.SelectedValue);
         string groupArea              = tb_GroupArea.Text;
         string groupName              = tb_GroupName.Text;
         string groupMonitor           = tb_GroupMonitor.Text;
         string groupMembers           = tb_GroupMembers.Value;
         string communicationGenerate  = tb_CommunicationGenerate.Value;
         string communicationSummarize = tb_CommunicationSummarize.Value;
         string communicationReport    = tb_CommunicationReport.Value;
         string communicationPhotos    = tb_CommunicationPhotos.Value;
         if (communicationTypeId == 0)
         {
             Page.ClientScript.RegisterStartupScript(this.GetType(), "alter", "alert('请选择交流形式!')", true);
             return;
         }
         if (id != 0) //修改
         {
             GroupCommunicationWorkBusiness.UpdateGroupCommunication(id, communicationTypeId, groupArea, groupName, groupMonitor, groupMembers, communicationGenerate, communicationSummarize, communicationReport, communicationPhotos);
             LogInfoBusiness.AddLogInfo(Convert.ToInt32(log_userid), DateTime.Now, Convert.ToInt32(log_usertype), log_username, 4, "团组交流工作信息", log_ip, log_account);//修改添加日志 操作类型->4
         }
         else
         {
             GroupCommunicationWorkBusiness.AddGroupCommunication(communicationTypeId, groupArea, groupName, groupMonitor, groupMembers, communicationGenerate, communicationSummarize, communicationReport, communicationPhotos);
             LogInfoBusiness.AddLogInfo(Convert.ToInt32(log_userid), DateTime.Now, Convert.ToInt32(log_usertype), log_username, 2, "团组交流工作信息", log_ip, log_account);//新增添加日志 操作类型->2
         }
         Response.Redirect("./CheckAffairList_tzjlgz.aspx");
     }
     catch (Exception ex)
     {
         //Page.RegisterStartupScript("alert", "<script>alert('数据加载失败!')</script>");
         Page.ClientScript.RegisterStartupScript(this.GetType(), "alter", "alert('数据加载错误!')", true);
         text(ex.ToString());
     }
 }