Example #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            page = ViewState["page"] == null ? 0 : (int)ViewState["page"];
            btnSelect_All.Text = "全选";
            if (!IsPostBack)
            {
                btn_AddPact.OnClientClick         = Window_AddPact.GetShowReference("Add_Pact.aspx", "新增合同信息");
                btnLibraryRecord.OnClientClick    = Window_LibraryRecord_Pact.GetShowReference("LibraryRecord_Pact.aspx", "查看合同借阅记录");
                btnAddLibraryRecord.OnClientClick = Window_Add_LibraryRecord.GetShowReference("Add_PactRecord.aspx", "新增合同借阅信息");

                reprotLibraryRecord.OnClientClick = Window_LibraryRecord_Pact.GetShowReference("~/Report/R_Pact_LibraryRecord.aspx", "借阅统计");
                report.OnClientClick = Window_LibraryRecord_Pact.GetShowReference("~/Report/R_Pact_addsub.aspx", "增减统计");
                //删除数据
                //btnDelete.OnClientClick = Grid_Pact.GetNoSelectionAlertReference("请至少选择一项!");
                //btn_UpdatePact.OnClientClick = Window_UpdatePact.GetShowReference("Update_Pact.aspx", "修改合同信息");
                BindData();
                //管理员登陆借阅按钮可见
                if (Convert.ToInt32(Session["SecrecyLevel"]) == 5)
                {
                    ContractRecordLibrary.Hidden = false;
                }
            }
        }
Example #2
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);
     }
 }