예제 #1
0
        public DataTable FindInInfo(FindCondClass conds)
        {
            DataTable         dt      = new DataTable();
            InWeighingDBLayer dbLayer = new InWeighingDBLayer();

            dt = dbLayer.SelectInInfo(conds);
            return(dt);
        }
예제 #2
0
        private void FindInfo()
        {
            FindCondClass Conds = new FindCondClass();
            DataTable     dt    = new DataTable();

            Conds.TruckNo      = CBTruckNo.Text;
            Conds.ContractName = CBContract.Text;
            Conds.GoodsName    = CBGoodsName.Text;
            Conds.GoodsModel   = CBModel.Text;
            Conds.InSite       = CBInSite.Text;
            Conds.ToSite       = CBToSite.Text;
            if (checkBox1.Checked)
            {
                Conds.InDate = date1.Value.ToString();
            }
            if (checkBox2.Checked)
            {
                Conds.ToDate = date2.Value.ToString();
            }
            switch (CBStyle.Text)
            {
            case "待审核":
                Conds.Style = "0";
                break;

            case "待审批":
                Conds.Style = "1";
                break;

            case "审核审批通过":
                Conds.Style = "2";
                break;

            default:
                Conds.Style = "";
                break;
            }
            dt = Findlogic.FindInInfo(Conds);
            dataGridView1.DataSource            = dt;
            dataGridView1.Columns["id"].Visible = false;
        }