public DataTable SelectAllInfo() { DataTable data = null; try { con = Connectionsql.Connection(); data = SelectMysql.datatable("select Gonghao as '工号',Password as '密码',Name as '职工姓名',Shenfenzhenghao as '身份证号',Sex as '性别',Address as '地址',Gongzuodanwei as '工作单位'," + "Phone as '联系方式',Birth as '出生日期',Ruyongriqi as '录用日期' from tb_zhigong"); } catch (MySqlException e) { MessageBox.Show(e.Message, "提示", MessageBoxButtons.OK); } finally { con.Close(); } return(data); }
public DataTable SelectAllInfo() { DataTable data = null; try { con = Connectionsql.Connection(); data = SelectMysql.datatable("select purchaseId as '进货ID',commodityName as '产品名称',purchaseNumber as '进货数量',costPrice as '成本价'" + ",total as '总额',purchaseDate as '进货日期',handler as '经手人'," + "purchaseStatus as '进货状态' from tb_purchase"); } catch (MySqlException e) { MessageBox.Show(e.Message, "提示", MessageBoxButtons.OK); } finally { con.Close(); } return(data); }
public DataTable SelectLittleInfo(string name) { DataTable data = null; try { con = Connectionsql.Connection(); data = SelectMysql.datatable("select saleId as '销售ID',commodityName as '产品名称',saleDate as '销售日期',saleNumber as '销售数量'" + ",payMethod as '支付方式',workerName as '销售员姓名',Gonghao as '工号'" + " from tb_sale where commodityName like '%" + name + "%'"); } catch (MySqlException e) { MessageBox.Show(e.Message, "提示", MessageBoxButtons.OK); } finally { con.Close(); } return(data); }
public DataTable SelectLittleInfo(string name) { DataTable data = null; try { con = Connectionsql.Connection(); data = SelectMysql.datatable("select commodityId as '商品ID',commodityName as '产品名称',businessName as '商家名称',costPrice as '成本价'" + ",unitPrice as '单价',commodityNumber as '库存量',remarks as '备注'" + " from tb_commodityInfo where commodityName like '%" + name + "%'"); } catch (MySqlException e) { MessageBox.Show(e.Message, "提示", MessageBoxButtons.OK); } finally { con.Close(); } return(data); }
public DataTable SelectAllInfo() { DataTable data = null; try { con = Connectionsql.Connection(); data = SelectMysql.datatable("select supplierId as '供货商ID'," + "businessName as '商家名称',contacts as '联系人'," + "phone as '电话号码',address as '公司地址'" + ",settlementMethod as '结算方式'" + " from tb_supplier"); } catch (MySqlException e) { MessageBox.Show(e.Message, "提示", MessageBoxButtons.OK); } finally { con.Close(); } return(data); }