72 lines
1.9 KiB
C#
72 lines
1.9 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Drawing;
|
|
using System.Data;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Windows.Forms;
|
|
|
|
namespace FEQ0000
|
|
{
|
|
public partial class fPurchase : FCOMMON.fBase
|
|
{
|
|
public fPurchase()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
private void __Load(object sender, EventArgs e)
|
|
{
|
|
this.dtSD.Text = DateTime.Now.AddMonths(-1).ToShortDateString();
|
|
this.dtED.Text = DateTime.Now.AddDays(10).ToShortDateString();
|
|
refreshData();
|
|
}
|
|
|
|
private void purchaseBindingNavigatorSaveItem_Click(object sender, EventArgs e)
|
|
{
|
|
this.Validate();
|
|
this.purchaseBindingSource.EndEdit();
|
|
this.tableAdapterManager.UpdateAll(this.dsPurchase);
|
|
|
|
}
|
|
|
|
private void refreshData()
|
|
{
|
|
try
|
|
{
|
|
string request = "%";
|
|
if (tbRequest.Text.Trim() != "") request = "%" + this.tbRequest.Text.Trim() + "%";
|
|
this.purchaseTableAdapter.Fill(this.dsPurchase.Purchase, dtSD.Text,dtED.Text,request);
|
|
}
|
|
catch (System.Exception ex)
|
|
{
|
|
System.Windows.Forms.MessageBox.Show(ex.Message);
|
|
}
|
|
|
|
}
|
|
|
|
private void btSearch_Click(object sender, EventArgs e)
|
|
{
|
|
refreshData();
|
|
}
|
|
|
|
private void autoResizeColumnsToolStripMenuItem_Click(object sender, EventArgs e)
|
|
{
|
|
dv1.AutoResizeColumns();
|
|
}
|
|
|
|
private void toolStripButton1_Click(object sender, EventArgs e)
|
|
{
|
|
|
|
}
|
|
|
|
private void toolStripButton1_Click_1(object sender, EventArgs e)
|
|
{
|
|
Purchase.rPurchase f = new Purchase.rPurchase();
|
|
f.MdiParent = this.MdiParent;
|
|
f.Show();
|
|
}
|
|
}
|
|
}
|