Beispiel #1
0
 //GridEduExperience行命令
 protected void GridEduExperience_RowCommand(object sender, FineUI.GridCommandEventArgs e)
 {
     try
     {
         string Person = GridEduExperience.Rows[e.RowIndex].Values[2].ToString();
         string strs   = bllUser.FindByLoginName(Session["LoginName"].ToString()).UserName;
         if (Person != strs && Convert.ToInt32(Session["SecrecyLevel"]) != 5)
         {
             string str = "您无对此行操作的权限!此行信息为" + Person + "录入,请与管理员联系!";
             CBoxSelect.SetCheckedState(e.RowIndex, false);
             Alert.ShowInTop(str);
         }
         if (publicmethod.GridCount(GridEduExperience, CBoxSelect).Count == 0)
         {
             //Alert.ShowInTop("请选中需删除的数据!");
             btnDelete.Enabled = false;
             return;
         }
         if (publicmethod.GridCount(GridEduExperience, CBoxSelect).Count != 0)
         {
             btnDelete.Enabled = true;
             return;
         }
     }
     catch (Exception ex)
     {
         publicmethod.SaveError(ex, this.Request);
     }
 }
Beispiel #2
0
        //删除
        protected void btnDelete_Click(object sender, EventArgs e)
        {
            List <int> selections = pm.GridCount(Grid_FurtherStudy, CBoxSelect);

            if (Convert.ToInt32(Session["SecrecyLevel"]) == 5)
            {
                for (int i = 0; i < selections.Count(); i++)
                {
                    futherstudy.Delete(Convert.ToInt32(Grid_FurtherStudy.DataKeys[selections[i]][0].ToString()));
                }
                InitData();
                Alert.ShowInTop("删除数据成功!");
                btnSelect_All.Text = "全选";
            }
            else
            {
                for (int i = 0; i < selections.Count(); i++)
                {
                    futherstudy.UpdateIsPass(Convert.ToInt32(Grid_FurtherStudy.DataKeys[selections[i]][0].ToString()), false);
                    operate.LoginName        = Session["LoginName"].ToString();
                    operate.OperationTime    = DateTime.Now;
                    operate.LoginIP          = " ";
                    operate.OperationContent = "FutherStudy";
                    operate.OperationType    = "删除";
                    operate.OperationDataID  = Convert.ToInt32(Grid_FurtherStudy.DataKeys[selections[i]][0].ToString());
                    op.Insert(operate);
                }
                InitData();
                Alert.ShowInTop("操作已经提交,请等待管理员确认!");
                btnSelect_All.Text = "全选";
            }
            btnDelete.Enabled = false;
        }
Beispiel #3
0
 //编辑选中行
 protected void ButtonUpdate_Click(object sender, EventArgs e)
 {
     try
     {
         if (publicMethod.GridCount(Grid_Pact, BoxSelect_Pact).Count() != 0)
         {
             if (publicMethod.GridCount(Grid_Pact, BoxSelect_Pact).Count() == 1)
             {
                 int rowID = Convert.ToInt32(Grid_Pact.DataKeys[publicMethod.GridCount(Grid_Pact, BoxSelect_Pact)[0]][0]);
                 Session["PactID"] = rowID;
                 Alert.Show("你确定要修改该行数据吗!", "确认消息", MessageBoxIcon.Information, Window_AddPact.GetShowReference("Update_PactRecord.aspx", "编辑合同信息"), Target.Top);
             }
             else
             {
                 Alert.Show("一次仅可以对一行进行编辑!");
             }
         }
         else
         {
             Alert.Show("请选择一行!");
         }
     }
     catch (Exception ex)
     {
         publicMethod.SaveError(ex, this.Request);
     }
 }
Beispiel #4
0
 //更新学术会议
 protected void btnUpdateMeeting_Click(object sender, EventArgs e)
 {
     try
     {
         if (publicMethod.GridCount(Grid_MeetingName, CBoxSelect_MeetingName).Count() != 0)
         {
             if (publicMethod.GridCount(Grid_MeetingName, CBoxSelect_MeetingName).Count() == 1)
             {
                 int rowID = Convert.ToInt32(Grid_MeetingName.DataKeys[publicMethod.GridCount(Grid_MeetingName, CBoxSelect_MeetingName)[0]][0]);
                 Session["AcademicMeetingID"] = rowID;
                 Alert.Show("你确定要修改该行数据吗!", "确认消息", FineUI.MessageBoxIcon.Information, Window_UppdateAcademic.GetShowReference("UpdateAcademic.aspx", "更新学术会议信息"), Target.Top);
             }
             else
             {
                 Alert.Show("一次仅可以对一行进行编辑!");
             }
         }
         else
         {
             Alert.Show("请选择一行!");
         }
     }
     catch (Exception ex)
     {
         publicMethod.SaveError(ex, this.Request);
     }
 }
Beispiel #5
0
 //重置密码
 protected void btnResetPWD_Click(object sender, EventArgs e)
 {
     try
     {
         List <int> selections = publicmethod.GridCount(People_Info, CBoxSelect);
         for (int i = 0; i < selections.Count(); i++)
         {
             bllUser.ChangePWD(Convert.ToInt32(People_Info.DataKeys[selections[i]][0]), encrypt.MD5("000000"));
         }
         List <string> PersonName = new List <string>();
         for (int i = 0; i < selections.Count(); i++)
         {
             string name = bllUser.Find(Convert.ToInt32(People_Info.DataKeys[selections[i]][0]), true).UserName;
             PersonName.Add(name);
         }
         BindData();
         string str = null;
         for (int i = 0; i < PersonName.Count(); i++)
         {
             str += PersonName[i] + ";";
         }
         Alert.ShowInTop("人员姓名为" + str + "的密码重置成功!");
     }
     catch (Exception ex)
     {
         publicmethod.SaveError(ex, this.Request);
     }
 }
Beispiel #6
0
 //更新
 protected void btnReviseAward_Click(object sender, EventArgs e)
 {
     try
     {
         if (pm.GridCount(Grid_Award, CBoxSelect).Count() != 0)
         {
             if (pm.GridCount(Grid_Award, CBoxSelect).Count() == 1)
             {
                 int rowID = Convert.ToInt32(Grid_Award.DataKeys[pm.GridCount(Grid_Award, CBoxSelect)[0]][0]);
                 Session["AwardID"] = rowID;
                 Alert.Show("你确定要修改该行数据吗!", "确认消息", MessageBoxIcon.Information, Window_ReviseAward.GetShowReference("Update_Award.aspx", "修改成果获奖信息"), Target.Top);
             }
             else
             {
                 Alert.Show("一次仅可以对一行进行编辑!");
             }
         }
         else
         {
             Alert.Show("请选择一行!");
         }
     }
     catch (Exception ex)
     {
         pm.SaveError(ex, this.Request);
     }
 }
Beispiel #7
0
 //删除
 protected void btnDelete_Click(object sender, EventArgs e)
 {
     try
     {
         List <int> selections = publicmethod.GridCount(GridBasicCode, CBoxSelect);
         if (Convert.ToInt32(Session["SecrecyLevel"]) == 5)
         {
             for (int i = 0; i < selections.Count(); i++)
             {
                 bllBasicCode.Delete(Convert.ToInt32(GridBasicCode.DataKeys[selections[i]][0]));
             }
             BindData();
             btnSelect_All.Text = "全选";
             Alert.ShowInTop("删除数据成功!");
         }
         else
         {
             btnSelect_All.Text = "全选";
             Alert.ShowInTop("您没有操作权限!");
             BindData();
         }
     }
     catch (Exception ex)
     {
         publicmethod.SaveError(ex, this.Request);
     }
 }
Beispiel #8
0
        protected void gd_UnitAPeople_RowClick(object sender, GridRowClickEventArgs e)
        {
            string person = gd_UnitAPeople.Rows[e.RowIndex].Values[0].ToString();

            BLHelper.BLLUser user     = new BLLUser();
            string           username = user.FindByLoginName(Session["LoginName"].ToString()).UserName;

            if (Convert.ToInt32(Session["SecrecyLevel"]) != 5 && person != username)
            {
                string str = "您没有对此行操作的权限!此行为" + person + "录入,请与管理员联系!";
                Alert.ShowInTop(str);
                CBoxSelect.SetCheckedState(e.RowIndex, false);
            }

            if (pm.GridCount(gd_UnitAPeople, CBoxSelect).Count == 0)
            {
                btn_Delete.Enabled = false;
                return;
            }
            else
            {
                btn_Delete.Enabled = true;
                return;
            }
        }
Beispiel #9
0
        //编辑平台信息
        protected void ButtonUpdate_Click(object sender, EventArgs e)
        {
            try
            {
                List <int> selections = publicMethod.GridCount(Grid_Contract, BoxSelect_Contract);
                if (selections.Count() != 0)
                {
                    if (selections.Count() == 1)
                    {
                        int rowID = Convert.ToInt32(Grid_Contract.DataKeys[selections[0]][0]);
                        Session["ContractID"] = rowID;
                        Alert.Show("你确定要修改该行数据吗!", "确认消息", MessageBoxIcon.Information, Window_Update.GetShowReference("Updata_Contract.aspx", "编辑平台信息"), Target.Top);
                    }

                    else
                    {
                        Alert.Show("一次仅可以对一行进行编辑!");
                    }
                }
                else
                {
                    Alert.Show("请选择一行!");
                }
            }
            catch (Exception ex)
            {
                BLCommon.PublicMethod pm = new BLCommon.PublicMethod();
                pm.SaveError(ex, this.Request);
            }
        }
Beispiel #10
0
 //删除
 protected void btnDelete_Click(object sender, EventArgs e)
 {
     try
     {
         List <int> selections = publicmethod.GridCount(GridProjectAndPeople, CBoxSelect);
         if (Convert.ToInt32(Session["SecrecyLevel"]) == 5)
         {
             for (int i = 0; i < selections.Count(); i++)
             {
                 bllStaffDevote.Delete(Convert.ToInt32(GridProjectAndPeople.DataKeys[selections[i]][0]));
             }
             BindData();
             Alert.ShowInTop("删除数据成功!");
             btnSelect_All.Text = "全选";
         }
         else
         {
             for (int i = 0; i < selections.Count(); i++)
             {
                 bllStaffDevote.ChangePass(Convert.ToInt32(GridProjectAndPeople.DataKeys[selections[i]][0]), false);
                 //向操作日志表中插入
                 OperationLog operate = new OperationLog();
                 operate.LoginName        = bllUser.FindByLoginName(Session["LoginName"].ToString()).UserName;
                 operate.LoginIP          = "";
                 operate.OperationType    = "删除";
                 operate.OperationContent = "StaffDevote";
                 operate.OperationDataID  = Convert.ToInt32(GridProjectAndPeople.DataKeys[selections[i]][0]);
                 operate.OperationTime    = System.DateTime.Now;
                 operate.Remark           = "";
                 bllOperate.Insert(operate);
             }
             Alert.ShowInTop("删除项目重大节点信息已提交待审核!");
             BindData();
             btnSelect_All.Text = "全选";
         }
     }
     catch (Exception ex)
     {
         publicmethod.SaveError(ex, this.Request);
     }
 }
 //删除
 protected void btnDelete_Click(object sender, EventArgs e)
 {
     try
     {
         List <int> selections = pm.GridCount(Grid_AchievementCA, CBoxSelect);
         if (Convert.ToInt32(Session["SecrecyLevel"]) == 5)
         {
             for (int i = 0; i < selections.Count(); i++)
             {
                 ca.Delete(Convert.ToInt32(Grid_AchievementCA.DataKeys[selections[i]][0]));
             }
             InitData();
             btnSelect_All.Text = "全选";
             Alert.ShowInTop("删除数据成功!");
         }
         else
         {
             for (int i = 0; i < selections.Count(); i++)
             {
                 ca.UpdateIsPass(Convert.ToInt32(Grid_AchievementCA.DataKeys[selections[i]][0]), false);
                 //向操作日志表中插入
                 OperationLog operate = new OperationLog();
                 operate.LoginName        = user.FindByLoginName(Session["LoginName"].ToString()).UserName;
                 operate.LoginIP          = "";
                 operate.OperationType    = "删除";
                 operate.OperationContent = "ProjectImportantNode";
                 operate.OperationDataID  = Convert.ToInt32(Grid_AchievementCA.DataKeys[selections[i]][0]);
                 operate.OperationTime    = System.DateTime.Now;
                 operate.Remark           = "";
                 bllOperate.Insert(operate);
             }
             btnSelect_All.Text = "全选";
             Alert.ShowInTop("您的操作已提交,请等待审核!");
             InitData();
         }
     }
     catch (Exception ex)
     {
         pm.SaveError(ex, this.Request);
     }
 }
Beispiel #12
0
        //删除选择行的点击事件
        protected void btnDelete_Click(object sender, EventArgs e)
        {
            BLHelper.BLLOperationLog op      = new BLHelper.BLLOperationLog();
            OperationLog             operate = new OperationLog();

            BLHelper.BLLUser user = new BLHelper.BLLUser();
            try
            {
                string username = user.FindByLoginName(Session["LoginName"].ToString()).UserName;
                if (Convert.ToInt32(Session["SecrecyLevel"]) == 5)
                {
                    for (int i = 0; i < pm.GridCount(Grid_Equipment, CBoxSelect).Count(); i++)
                    {
                        bllequipment.Delete(Convert.ToInt32(Grid_Equipment.DataKeys[pm.GridCount(Grid_Equipment, CBoxSelect)[i]][0].ToString()));
                    }
                    InitData();
                    btnSelect_All.Text = "全选";
                    Alert.ShowInTop("删除数据成功!");
                }
                else
                {
                    for (int i = 0; i < pm.GridCount(Grid_Equipment, CBoxSelect).Count(); i++)
                    {
                        bllequipment.UpdateIsPass(Convert.ToInt32(Grid_Equipment.DataKeys[pm.GridCount(Grid_Equipment, CBoxSelect)[i]][0]), false);
                        operate.LoginName        = username;
                        operate.OperationTime    = DateTime.Now;
                        operate.LoginIP          = " ";
                        operate.OperationContent = "Equipments";
                        operate.OperationType    = "删除";
                        operate.OperationDataID  = Convert.ToInt32(Grid_Equipment.DataKeys[pm.GridCount(Grid_Equipment, CBoxSelect)[i]][0]);
                        op.Insert(operate);
                    }
                    InitData();
                    btnSelect_All.Text = "全选";
                    Alert.ShowInTop("您的数据已提交,请等待确认!");
                }
            }
            catch (Exception ex)
            {
                pm.SaveError(ex, this.Request);
            }
        }
Beispiel #13
0
        protected void btn_Delete_Click(object sender, EventArgs e)
        {
            OperationLog op      = new OperationLog();
            List <int>   checkid = pm.GridCount(gd_UnitAPeople, CBoxSelect);

            for (int i = 0; i < checkid.Count; i++)
            {
                int id = checkid[i];
                if (Convert.ToInt32(Session["SecrecyLevel"]) == 5)
                {
                    blfund.Delete(Convert.ToInt32(gd_UnitAPeople.DataKeys[id][0].ToString()));
                }
                else
                {
                    op.LoginIP          = " ";
                    op.LoginName        = Session["LoginName"].ToString();
                    op.OperationContent = "FundInformation";
                    op.OperationDataID  = Convert.ToInt32(gd_UnitAPeople.DataKeys[id][0].ToString());
                    op.OperationTime    = DateTime.Now;
                    op.OperationType    = "删除";
                    blop.Insert(op);
                    blfund.UpdateIsPass(Convert.ToInt32(gd_UnitAPeople.DataKeys[id][0].ToString()), false);
                }
            }
            DataGrid();

            if (Convert.ToInt32(Session["SecrecyLevel"]) == 5)
            {
                Alert.ShowInTop("删除成功!");
            }
            else
            {
                Alert.ShowInTop("您的操作已经提交,请等待管理员确认!");
            }
            btn_Delete.Enabled = false;
        }
 //删除
 protected void btnDelete_Click(object sender, EventArgs e)
 {
     try
     {
         string username = user.FindByLoginName(Session["LoginName"].ToString()).UserName;
         if (Convert.ToInt32(Session["SecrecyLevel"]) == 5)
         {
             for (int i = 0; i < pm.GridCount(Grid_FurtherStudy, CBoxSelect).Count(); i++)
             {
                 df.Delete(Convert.ToInt32(Grid_FurtherStudy.DataKeys[pm.GridCount(Grid_FurtherStudy, CBoxSelect)[i]][0].ToString()));
             }
             InitData();
             Alert.ShowInTop("删除数据成功!");
             btnSelect_All.Text = "全选";
         }
         else
         {
             for (int i = 0; i < pm.GridCount(Grid_FurtherStudy, CBoxSelect).Count(); i++)
             {
                 df.ChangePass(Convert.ToInt32(Grid_FurtherStudy.DataKeys[pm.GridCount(Grid_FurtherStudy, CBoxSelect)[i]][0]), false);
                 operate.LoginName        = username;
                 operate.OperationTime    = DateTime.Now;
                 operate.LoginIP          = " ";
                 operate.OperationContent = "DFurtherStudy";
                 operate.OperationType    = "删除";
                 operate.OperationDataID  = Convert.ToInt32(Grid_FurtherStudy.DataKeys[pm.GridCount(Grid_FurtherStudy, CBoxSelect)[i]][0]);
                 op.Insert(operate);
             }
             InitData();
             Alert.ShowInTop("您的数据已提交,请等待确认!");
             btnSelect_All.Text = "全选";
         }
     }
     catch (Exception ex)
     {
         pm.SaveError(ex, this.Request);
     }
 }