private void Initialize(string nameDatBas) { this.nameDB = nameDatBas; readDB = new ReadDB(nameDB, buf); write = new WriteTo_DB(nameDB, buf); _DataForInsert = new List <StructDataDeal> (); data_ForDB = new List <StructDataDeal> (); TopLineOf_InsertTable(); TopLineOf_MainTable(); SetData_ToMainTab(_AllProduct); tb_TodeyDate_ForInsert.Text = DateTime.Now.ToString("d"); List <string> ParametrsForSearchList = new List <string> (); ParametrsForSearchList.Add("По Номеру"); ParametrsForSearchList.Add("По Названию"); Set_ListOfSearchParams(ParametrsForSearchList); }
public List <StructOfProduct> Finde_ByNumber(string number) { List <StructOfProduct> filtredData = new List <StructOfProduct> (); ReadDB readDB = new ReadDB(pathToDB, bufer); filtredData = readDB.Search(number, ParametrFiltr.Code); return(filtredData); }
public List <StructOfProduct> Finde_ByName(string name) { List <StructOfProduct> filtredData = new List <StructOfProduct> (); ReadDB readDB = new ReadDB(pathToDB, bufer); filtredData = readDB.Search(name, ParametrFiltr.ProductName); return(filtredData); }
private void Initialize(List <StructOfProduct> _ProductsList) { write = new WriteTo_DB(nameDB, buf); read = new ReadDB(nameDB, buf); Clear_CurrentData(); GetDataFromDB(_ProductsList); TopLineOfTable(); TopLineOfDelteTab(); }
private void Initialize(string nameDB) { readDB = new ReadDB(nameDB, buf); treeview_History.Model = model; treeview_History.AppendColumn(" Номер ", new CellRendererText(), "text", 0); treeview_History.AppendColumn(" Название ", new CellRendererText(), "text", 1); treeview_History.AppendColumn(" Количество ", new CellRendererText(), "text", 2); treeview_History.AppendColumn(" Еденица измерения ", new CellRendererText(), "text", 3); treeview_History.AppendColumn(" Сумма ", new CellRendererText(), "text", 4); treeview_History.AppendColumn(" Дата ", new CellRendererText(), "text", 5); treeview_History.AppendColumn(" Тип докуммента ", new CellRendererText(), "text", 6); treeview_History.AppendColumn(" Номер домекумента ", new CellRendererText(), "text", 7); treeview_History.AppendColumn(" Инвентор ", new CellRendererText(), "text", 8); }
private void Initialize() { ReadDB readDB = new ReadDB(nameDB, buf); List <string> AllTypeCount = readDB.Get_TypeOfCount_All(); List <string> AllProducer = readDB.Get_Producer_All(); for (int i = 0; i < AllTypeCount.Count; i++) { cb_TypeCounting.AppendText(AllTypeCount[i]); } for (int i = 0; i < AllProducer.Count; i++) { cb_Producer.AppendText(AllProducer[i]); } }
public List <StructOfProduct> Finde_ByParametr(string parametr, string valueParam) { List <StructOfProduct> filtredData = new List <StructOfProduct> (); ReadDB readDB = new ReadDB(pathToDB, bufer); List <StructOfProduct> data = readDB.Search(parametr, ParametrFiltr.Parametr); foreach (StructOfProduct product in data) { if (product.ValueParametr == valueParam) { filtredData.Add(product); } } return(filtredData); }
public WriteTo_DB(string pathToDb, Bufer buf) { ConnectTo(pathToDb, buf); readDB = new ReadDB(pathToDb, buf); }