コード例 #1
0
 public ConfidentialMembers_Borrowinfo()
 {
     InitializeComponent();
     InitTable();
     TableToBorrow.DataTableSelect(SQL, "更新");
     TableToBorrow.dataGrid.SelectionChanged += TableToBorrow_SelectionChanged;
     BorrowTotal.Content = TableToBorrow.dt.Rows.Count;
 }
コード例 #2
0
 public void InitTable()
 {
     TableToBorrow.InitTableHeightWidth(480, 880);
     TableToBorrow.SetCanUserAddRows(false);
     TableToBorrow.AddColumns("Id", "借阅号", 80);
     TableToBorrow.AddColumns("DataNo", "资料编号", 80);
     TableToBorrow.AddColumns("LendDate", "借阅日期", 240);
     TableToBorrow.AddColumns("RyId", "借阅人编号", 120);
     TableToBorrow.AddColumns("LendCount", "借阅数量", 120);
     TableToBorrow.AddColumns("Ryname", "审批人", 120);
     TableToBorrow.AddColumns("Flag", "借阅状态", 120);
     Inittthlbm();
 }
コード例 #3
0
        private void CommitChanges_Click(object sender, RoutedEventArgs e)
        {
            string Str  = FlagString();
            string SQL1 = "update DataLend set Flag = '" + Str + "' where Id ='" + SelectId + "'";

            try
            {
                SqlCommand CMD_1 = new SqlCommand(SQL1, Temp.GetConn());
                CMD_1.ExecuteNonQuery();
            }
            catch (Exception ex)
            {
                MessageBox.Show("错误:\n\n" + ex);
                return;
            }
            TableToBorrow.DataTableSelect(SQL, "更新");
            MessageBox.Show("修改成功!");
        }
コード例 #4
0
        public void Inittthlbm()
        {
            string Str = "无操作";

            TableToBorrow.dgMenu.Items.Add(TableToBorrow.AddMenuItem(Str));
        }
コード例 #5
0
 private void ExportTwo_Click(object sender, RoutedEventArgs e)
 {
     string[] Str = { "借阅号", "借阅资料编号", "借阅日期", "借阅人编号", "借阅数量", "借阅人名字", "借阅标记" };
     TableToBorrow.ExportExcel(SQL, Str, "借阅表.xlsx");
 }