public DataTable Select(LocalFilter filterlocal) { _sqlSting.SqlAnswer.datatable.Clear(); _table.Clear(); _sqlSting.SetParametrValue("@p_rowcountpage", filterlocal.RowsCountPage); _sqlSting.SetParametrValue("@p_pagecountrow", filterlocal.PageCountRows); _sqlSting.ComplexRequest(_getSelectPurchaseTable, CommandType.StoredProcedure, null); _table = _sqlSting.SqlAnswer.datatable; return(_table); }
public DataTable SelectCategory(Int32 _typetab) { _sqlSting.SqlAnswer.datatable.Clear(); _table.Clear(); _sqlSting.SetParametrValue("@p_typeTable", _typetab); _sqlSting.ComplexRequest(_getSelectCategoryTable, CommandType.StoredProcedure, null); _table = _sqlSting.SqlAnswer.datatable; return(_table); }
public Int64 SetRow(LocalRow _localRow) { _sqlSave.SetParametrValue("@p_IDCommand", _localRow.IDCommand); _sqlSave.SetParametrValue("@p_IDProduct", _localRow.ID); _sqlSave.SetParametrValue("@p_TrackingNumber", _localRow.TrackingNumber); _sqlSave.SetParametrValue("@p_WhenOrdered", _localRow.WhenOrdered); _sqlSave.SetParametrValue("@p_WhenItComes", _localRow.WhenItComes); _sqlSave.SetParametrValue("@p_Quantity", _localRow.Quantity); _sqlSave.SetParametrValue("@p_TrackingNumber", _localRow.TrackingNumber); _sqlSave.SetParametrValue("@p_SummaSum", _localRow.SummaSum); _sqlSave.SetParametrValue("@p_PaymentType", _localRow.PaymentType); _sqlSave.SetParametrValue("@p_PaymentReceipt", _localRow.PaymentReceipt); _sqlSave.SetParametrValue("@p_TypeBelivery", _localRow.TypeBelivery); _sqlSave.SetParametrValue("@p_Adress", _localRow.Adress); _sqlSave.SetParametrValue("@p_NumvberPhon", _localRow.NumvberPhon); _sqlSave.SetParametrValue("@p_NamaMeneger", _localRow.NamaMeneger); _sqlSave.SetParametrValue("@p_NameBelivery", _localRow.NameBelivery); _sqlSave.SetParametrValue("@p_NumberBeliveryTracking", _localRow.NumberBeliveryTracking); _sqlSave.SetParametrValue("@p_DopNameCompanyBelivery", _localRow.DopNameCompanyBelivery); _sqlSave.SetParametrValue("@p_NameManegerBelivery", _localRow.NameManegerBelivery); _sqlSave.SetParametrValue("@p_DopNameSkladCompany", _localRow.DopNameSkladCompany); _sqlSave.SetParametrValue("@p_DopTagPriceOrder", _localRow.DopTagPriceOrder); _sqlSave.SetParametrValue("@p_DopWhenDateOrder", _localRow.DopWhenDateOrder); _sqlSave.SetParametrValue("@p_DopWhereDateOrder", _localRow.DopWhereDateOrder); _sqlSave.SetParametrValue("@p_DopTypePayment", _localRow.DopTypePayment); _sqlSave.SetParametrValue("@p_DopPaymentReceipt", _localRow.DopPaymentReceipt); _sqlSave.SetParametrValue("@p_DopNameManegerCompany", _localRow.DopNameManegerCompany); _sqlSave.SetParametrValue("@p_DopNumberPhoneManeger", _localRow.DopNumberPhoneManeger); _sqlSave.SetParametrValue("@p_DateCreate", _localRow.DateCreate); _sqlSave.SetParametrValue("@p_CreateUseras", _localRow.CreateUseras); _sqlSave.SetParametrValue("@p_DataLastModifide", _localRow.DataLastModifide); _sqlSave.SetParametrValue("@p_LastModifideUsers", _localRow.LastModifideUsers); return((long)_sqlSave.SqlAnswer.result); }
public ZacupcaGridLogic() { //объявили подключение _sqlSting = new SQLCommanSelect(); _sqlSave = new SQLCommanSelect(); //объявили localRow localrow = new LocalRow(); //объявили таблицу куда будем записывать все _table = new DataTable(); //за правильную конвертацию данных convertData = new ConvertData(); //объявляем переменные для хранимой процедуры _sqlSting.AddParametr("@p_rowcountpage", SqlDbType.Int); _sqlSting.SetParametrValue("@p_rowcountpage", 0); _sqlSting.AddParametr("@p_pagecountrow", SqlDbType.Int); _sqlSting.SetParametrValue("@p_pagecountrow", 0); //объявляем переменные для хранимой процедуры save _sqlSave.AddParametr("@p_IDCommand", SqlDbType.Int); _sqlSave.SetParametrValue("@p_IDCommand", 0); _sqlSave.AddParametr("@p_IDProduct", SqlDbType.Int); _sqlSave.SetParametrValue("@p_IDProduct", 0); _sqlSave.AddParametr("@p_TrackingNumber", SqlDbType.BigInt); _sqlSave.SetParametrValue("@p_TrackingNumber", 0); _sqlSave.AddParametr("@p_WhenOrdered", SqlDbType.DateTime); _sqlSave.SetParametrValue("@p_WhenOrdered", DateTime.Now); _sqlSave.AddParametr("@p_WhenItComes", SqlDbType.DateTime); _sqlSave.SetParametrValue("@p_WhenItComes", DateTime.Now); _sqlSave.AddParametr("@p_Quantity", SqlDbType.Int); _sqlSave.SetParametrValue("@p_Quantity", 0); _sqlSave.AddParametr("@p_TrackingNumber", SqlDbType.BigInt); _sqlSave.SetParametrValue("@p_TrackingNumber", 0); _sqlSave.AddParametr("@p_SummaSum", SqlDbType.Money); _sqlSave.SetParametrValue("@p_SummaSum", 0); _sqlSave.AddParametr("@p_PaymentType", SqlDbType.Int); _sqlSave.SetParametrValue("@p_PaymentType", 0); _sqlSave.AddParametr("@p_PaymentReceipt", SqlDbType.Image); _sqlSave.SetParametrValue("@p_PaymentReceipt", 0); _sqlSave.AddParametr("@p_TypeBelivery", SqlDbType.BigInt); _sqlSave.SetParametrValue("@p_TypeBelivery", 0); _sqlSave.AddParametr("@p_Adress", SqlDbType.NVarChar); _sqlSave.SetParametrValue("@p_Adress", ""); _sqlSave.AddParametr("@p_NumvberPhon", SqlDbType.BigInt); _sqlSave.SetParametrValue("@p_NumvberPhon", 0); _sqlSave.AddParametr("@p_NamaMeneger", SqlDbType.NVarChar); _sqlSave.SetParametrValue("@p_NamaMeneger", ""); _sqlSave.AddParametr("@p_NameBelivery", SqlDbType.NVarChar); _sqlSave.SetParametrValue("@p_NameBelivery", ""); _sqlSave.AddParametr("@p_NumberBeliveryTracking", SqlDbType.NVarChar); _sqlSave.SetParametrValue("@p_NumberBeliveryTracking", ""); _sqlSave.AddParametr("@p_DopNameCompanyBelivery", SqlDbType.NVarChar); _sqlSave.SetParametrValue("@p_DopNameCompanyBelivery", ""); _sqlSave.AddParametr("@p_NameManegerBelivery", SqlDbType.NVarChar); _sqlSave.SetParametrValue("@p_NameManegerBelivery", ""); _sqlSave.AddParametr("@p_DopNameSkladCompany", SqlDbType.NVarChar); _sqlSave.SetParametrValue("@p_DopNameSkladCompany", ""); _sqlSave.AddParametr("@p_DopTagPriceOrder", SqlDbType.Money); _sqlSave.SetParametrValue("@p_DopTagPriceOrder", 0); _sqlSave.AddParametr("@p_DopWhenDateOrder", SqlDbType.DateTime); _sqlSave.SetParametrValue("@p_DopWhenDateOrder", DateTime.Now); _sqlSave.AddParametr("@p_DopWhereDateOrder", SqlDbType.DateTime); _sqlSave.SetParametrValue("@p_DopWhereDateOrder", DateTime.Now); _sqlSave.AddParametr("@p_DopTypePayment", SqlDbType.Int); _sqlSave.SetParametrValue("@p_DopTypePayment", 0); _sqlSave.AddParametr("@p_DopPaymentReceipt", SqlDbType.Image); _sqlSave.SetParametrValue("@p_DopPaymentReceipt", 0); _sqlSave.AddParametr("@p_DopNameManegerCompany", SqlDbType.NVarChar); _sqlSave.SetParametrValue("@p_DopNameManegerCompany", ""); _sqlSave.AddParametr("@p_DopNumberPhoneManeger", SqlDbType.NVarChar); _sqlSave.SetParametrValue("@p_DopNumberPhoneManeger", ""); _sqlSave.AddParametr("@p_DateCreate", SqlDbType.DateTime); _sqlSave.SetParametrValue("@p_DateCreate", DateTime.Now); _sqlSave.AddParametr("@p_CreateUseras", SqlDbType.Int); _sqlSave.SetParametrValue("@p_CreateUseras", 0); _sqlSave.AddParametr("@p_DataLastModifide", SqlDbType.DateTime); _sqlSave.SetParametrValue("@p_DataLastModifide", DateTime.Now); _sqlSave.AddParametr("@p_LastModifideUsers", SqlDbType.Int); _sqlSave.SetParametrValue("@p_LastModifideUsers", 0); }
public DataTable SetCategorySave(LocalRow localRow) { _sqlSave.SqlAnswer.datatable.Clear(); _table.Clear(); //p_TempTable _sqlSave.SetParametrValue("@p_FlagTable", localRow.TempTable); _sqlSave.SetParametrValue("@p_MassCategoryProduct", localRow.MassCategoryProduct); _sqlSave.SetParametrValue("@p_MassCategoryIDProduct", localRow.MassCategoryIDProduct); _sqlSave.SetParametrValue("@p_MassDescriptionProduct", localRow.MassCategoryDescriptionProduct); _sqlSave.SetParametrValue("@p_MassCategoryProductDetails", localRow.MassCategoryProductDetails); _sqlSave.SetParametrValue("@p_MassCategoryProductID", localRow.MassCategoryProductID); _sqlSave.SetParametrValue("@p_MassCategoryIDProductDetails", localRow.MassCategoryIDProductDetails); _sqlSave.SetParametrValue("@p_MassDescriptionProductDetails", localRow.MassDescriptionProductDetails); _sqlSave.SetParametrValue("@p_MassCategoryRelay", localRow.MassCategoryRelay); _sqlSave.SetParametrValue("@p_MassDescriptionRelay", localRow.MassCategoryIDRelay); _sqlSave.SetParametrValue("@p_MassCategoryIDRelay", localRow.MassCategoryDescriptionRelay); _sqlSave.SetParametrValue("@p_MassCategoryRelayDetails", localRow.MassCategoryRelayDetails); _sqlSave.SetParametrValue("@p_MassCategoryRelayID", localRow.MassCategoryRelayID); _sqlSave.SetParametrValue("@p_MassCategoryIDRelayDetails", localRow.MassCategoryIDRelayDetails); _sqlSave.SetParametrValue("@p_MassDescriptionRelayDetails", localRow.MassDescriptionRelayDetails); _sqlSave.ComplexRequest(_getSaveCategory, CommandType.StoredProcedure, null); _table = _sqlSave.SqlAnswer.datatable; return(_table); }
public KategoriiLogic() { //объявили подключение _sqlSting = new SQLCommanSelect(); _sqlTreeViewProductSting = new SQLCommanSelect(); _sqlTreeViewRelaySting = new SQLCommanSelect(); _sqlSave = new SQLCommanSelect(); //объявили localRow localrow = new LocalRow(); //объявили таблицу куда будем записывать все _table = new DataTable(); //за правильную конвертацию данных convertData = new ConvertData(); //объявляем переменные для хранимой процедуры _sqlSting.AddParametr("@p_typeTable", SqlDbType.Int); _sqlSting.SetParametrValue("@p_typeTable", 0); //объявляем переменные для хранимой процедуры Save _sqlSave.AddParametr("@p_FlagTable", SqlDbType.NVarChar, 40); _sqlSave.SetParametrValue("@p_FlagTable", ""); _sqlSave.AddParametr("@p_MassCategoryProduct", SqlDbType.NVarChar, 255); _sqlSave.SetParametrValue("@p_MassCategoryProduct", ""); _sqlSave.AddParametr("@p_MassCategoryIDProduct", SqlDbType.NVarChar, 255); _sqlSave.SetParametrValue("@p_MassCategoryIDProduct", ""); _sqlSave.AddParametr("@p_MassDescriptionProduct", SqlDbType.NVarChar, 255); _sqlSave.SetParametrValue("@p_MassDescriptionProduct", ""); _sqlSave.AddParametr("@p_MassCategoryProductDetails", SqlDbType.NVarChar, 255); _sqlSave.SetParametrValue("@p_MassCategoryProductDetails", ""); _sqlSave.AddParametr("@p_MassCategoryProductID", SqlDbType.NVarChar, 255); _sqlSave.SetParametrValue("@p_MassCategoryProductID", ""); _sqlSave.AddParametr("@p_MassCategoryIDProductDetails", SqlDbType.NVarChar, 255); _sqlSave.SetParametrValue("@p_MassCategoryIDProductDetails", ""); _sqlSave.AddParametr("@p_MassDescriptionProductDetails", SqlDbType.NVarChar, 255); _sqlSave.SetParametrValue("@p_MassDescriptionProductDetails", ""); _sqlSave.AddParametr("@p_MassCategoryRelay", SqlDbType.NVarChar, 255); _sqlSave.SetParametrValue("@p_MassCategoryRelay", ""); _sqlSave.AddParametr("@p_MassDescriptionRelay", SqlDbType.NVarChar, 255); _sqlSave.SetParametrValue("@p_MassDescriptionRelay", ""); _sqlSave.AddParametr("@p_MassCategoryIDRelay", SqlDbType.NVarChar, 255); _sqlSave.SetParametrValue("@p_MassCategoryIDRelay", ""); _sqlSave.AddParametr("@p_MassCategoryRelayDetails", SqlDbType.NVarChar, 255); _sqlSave.SetParametrValue("@p_MassCategoryRelayDetails", ""); _sqlSave.AddParametr("@p_MassCategoryRelayID", SqlDbType.NVarChar, 255); _sqlSave.SetParametrValue("@p_MassCategoryRelayID", ""); _sqlSave.AddParametr("@p_MassCategoryIDRelayDetails", SqlDbType.NVarChar, 255); _sqlSave.SetParametrValue("@p_MassCategoryIDRelayDetails", ""); _sqlSave.AddParametr("@p_MassDescriptionRelayDetails", SqlDbType.NVarChar, 255); _sqlSave.SetParametrValue("@p_MassDescriptionRelayDetails", ""); }
public DataTable FillSummary(LocalFilter _localFilter) { _sqlRequestSelectSummary.SqlAnswer.datatable.Clear(); _data.Clear(); _sqlRequestSelectSummary.SetParametrValue("@p_TypeScreen", ScreenType.ScreenTypeGrid); _sqlRequestSelectSummary.SetParametrValue("@p_Search", _localFilter.Search); _sqlRequestSelectSummary.SetParametrValue("@p_CreatedUserID ", _localFilter.CreatedByUserID); _sqlRequestSelectSummary.SetParametrValue("@p_LastModifiedUserID ", _localFilter.LastModifiedByUserID); _sqlRequestSelectSummary.SetParametrValue("@p_Status", _localFilter.Status); _sqlRequestSelectSummary.SetParametrValue("@p_Quantity_Min", _localFilter.QuantityMin); _sqlRequestSelectSummary.SetParametrValue("@p_Quantity_Max ", _localFilter.QuantityMax); _sqlRequestSelectSummary.SetParametrValue("@p_TagPriceVATRUS_Min", _localFilter.AmountMin); _sqlRequestSelectSummary.SetParametrValue("@p_TagPriceVATRUS_Max ", _localFilter.AmountMax); _sqlRequestSelectSummary.SetParametrValue("@p_FromCreatedDate ", _localFilter.FromCreatedDate); _sqlRequestSelectSummary.SetParametrValue("@p_ToCreatedDate ", _localFilter.ToCreatedDate); _sqlRequestSelectSummary.SetParametrValue("@p_FromLastModifiedDate ", _localFilter.FromLastModifiedDate); _sqlRequestSelectSummary.SetParametrValue("@p_ToLastModifiedDate ", _localFilter.ToLastModifiedDate); _sqlRequestSelectSummary.ComplexRequest(get_summary_procedure, CommandType.StoredProcedure, null); _data = _sqlRequestSelectSummary.SqlAnswer.datatable; return(_data); }
public DataTable FillGrid() { _sqlRequestSelect.SqlAnswer.datatable.Clear(); _data.Clear(); _sqlRequestSelect.SetParametrValue("@p_TypeScreen", ScreenType.ScreenTypeGrid); _sqlRequestSelect.ComplexRequest(get_store_procedure, CommandType.StoredProcedure, null); _data = _sqlRequestSelect.SqlAnswer.datatable; return(_data); }
public SupplyDocumentLogic() { convertData = new ConvertData(); _data = new DataTable(); _datarow = new DataTable(); filters = new Dictionary <string, DataTable>(); filtersFromTo = new Dictionary <string, Range>(); innerList1 = new DataTable(); innerList2 = new DataTable(); innerList3 = new DataTable(); innerList4 = new DataTable(); innerList5 = new DataTable(); innerList1.Columns.Add("ID"); innerList1.Columns.Add("IsChecked"); innerList1.Columns.Add("Description"); innerList2.Columns.Add("ID"); innerList2.Columns.Add("IsChecked"); innerList2.Columns.Add("Description"); innerList3.Columns.Add("ID"); innerList3.Columns.Add("IsChecked"); innerList3.Columns.Add("Description"); innerList4.Columns.Add("ID"); innerList4.Columns.Add("IsChecked"); innerList4.Columns.Add("Description"); innerList5.Columns.Add("ID"); innerList5.Columns.Add("IsChecked"); innerList5.Columns.Add("Description"); filters.Add("CreatedByUserID", innerList1); filters.Add("LastModifiedByUserID", innerList1); filters.Add("Delivery", innerList1); filters.Add("ManagerName", innerList1); filters.Add("Status", innerList1); Range QuantityRange = new Range(); Range AmountRange = new Range(); filtersFromTo.Add("Quantity", QuantityRange); filtersFromTo.Add("Amount", AmountRange); _sqlRequestSelect = new SQLCommanSelect(); _sqlRequestSelectFilters = new SQLCommanSelect(); _sqlRequestSelectSummary = new SQLCommanSelect(); //---------------------------------------------------------------------------- _sqlRequestSelect.AddParametr("@p_TypeScreen", SqlDbType.VarChar, 40); _sqlRequestSelect.SetParametrValue("@p_TypeScreen", ScreenType.ScreenTypeGrid); _sqlRequestSelect.AddParametr("@p_Search", SqlDbType.NVarChar, 40); _sqlRequestSelect.SetParametrValue("@p_Search", ""); _sqlRequestSelect.AddParametr("@p_ID", SqlDbType.Int); _sqlRequestSelect.SetParametrValue("@p_ID", 0); _sqlRequestSelect.AddParametr("@p_CreatedUserID", SqlDbType.NVarChar); _sqlRequestSelect.SetParametrValue("@p_CreatedUserID", ""); _sqlRequestSelect.AddParametr("@p_LastModifiedUserID", SqlDbType.NVarChar); _sqlRequestSelect.SetParametrValue("@p_LastModifiedUserID", ""); _sqlRequestSelect.AddParametr("@p_Status", SqlDbType.NVarChar); _sqlRequestSelect.SetParametrValue("@p_Status", ""); _sqlRequestSelect.AddParametr("@p_Quantity_Min", SqlDbType.Money); _sqlRequestSelect.SetParametrValue("@p_Quantity_Min", 0); _sqlRequestSelect.AddParametr("@p_Quantity_Max", SqlDbType.Money); _sqlRequestSelect.SetParametrValue("@p_Quantity_Max", SqlMoney.MaxValue); _sqlRequestSelect.AddParametr("@p_TagPriceVATRUS_Min", SqlDbType.Money); _sqlRequestSelect.SetParametrValue("@p_TagPriceVATRUS_Min", System.Data.SqlTypes.SqlMoney.MaxValue); _sqlRequestSelect.AddParametr("@p_TagPriceVATRUS_Max", SqlDbType.Money); _sqlRequestSelect.SetParametrValue("@p_TagPriceVATRUS_Max", System.Data.SqlTypes.SqlMoney.MaxValue); _sqlRequestSelect.AddParametr("@p_FromCreatedDate", SqlDbType.NVarChar, 40); _sqlRequestSelect.SetParametrValue("@p_FromCreatedDate", SqlDateTime.MinValue.ToString()); _sqlRequestSelect.AddParametr("@p_ToCreatedDate", SqlDbType.NVarChar, 40); _sqlRequestSelect.SetParametrValue("@p_ToCreatedDate", DateTime.Now.ToString()); _sqlRequestSelect.AddParametr("@p_FromLastModifiedDate", SqlDbType.NVarChar, 40); _sqlRequestSelect.SetParametrValue("@p_FromLastModifiedDate", SqlDateTime.MinValue.ToString()); _sqlRequestSelect.AddParametr("@p_ToLastModifiedDate", SqlDbType.NVarChar, 40); _sqlRequestSelect.SetParametrValue("@p_ToLastModifiedDate", DateTime.Now.ToString()); _sqlRequestSelect.AddParametr("@p_PageNumber", SqlDbType.Int); _sqlRequestSelect.SetParametrValue("@p_PageNumber", 0); _sqlRequestSelect.AddParametr("@p_PagerowCount", SqlDbType.Int); _sqlRequestSelect.SetParametrValue("@p_PagerowCount", 0); _sqlRequestSelect.AddParametr("@p_SortColumn", SqlDbType.NVarChar, 255); _sqlRequestSelect.SetParametrValue("@p_SortColumn", 0); _sqlRequestSelect.AddParametr("@p_Sort", SqlDbType.Bit); _sqlRequestSelect.SetParametrValue("@p_Sort", 0); //---------------------------------------------------------------------------- _sqlRequestSelectSummary.AddParametr("@p_Search", SqlDbType.Int); _sqlRequestSelectSummary.SetParametrValue("@p_Search", ""); _sqlRequestSelectSummary.AddParametr("@p_CreatedUserID", SqlDbType.Int); _sqlRequestSelectSummary.SetParametrValue("@p_CreatedUserID", 0); _sqlRequestSelectSummary.AddParametr("@p_LastModifiedUserID", SqlDbType.Int); _sqlRequestSelectSummary.SetParametrValue("@p_LastModifiedUserID", 0); _sqlRequestSelectSummary.AddParametr("@p_Status", SqlDbType.NVarChar); _sqlRequestSelectSummary.SetParametrValue("@p_Status", ""); _sqlRequestSelectSummary.AddParametr("@p_FromCreatedDate", SqlDbType.DateTime); _sqlRequestSelectSummary.SetParametrValue("@p_FromCreatedDate", SqlDateTime.MinValue); _sqlRequestSelectSummary.AddParametr("@p_ToCreatedDate", SqlDbType.DateTime); _sqlRequestSelectSummary.SetParametrValue("@p_ToCreatedDate", DateTime.Now); _sqlRequestSelectSummary.AddParametr("@p_FromLastModifiedDate", SqlDbType.DateTime); _sqlRequestSelectSummary.SetParametrValue("@p_FromLastModifiedDate", SqlDateTime.MinValue); _sqlRequestSelectSummary.AddParametr("@p_ToLastModifiedDate", SqlDbType.DateTime); _sqlRequestSelectSummary.SetParametrValue("@p_ToLastModifiedDate", DateTime.Now); _sqlRequestSelectSummary.AddParametr("@p_Quantity_Min", SqlDbType.Money); _sqlRequestSelectSummary.SetParametrValue("@p_Quantity_Min", 0); _sqlRequestSelectSummary.AddParametr("@p_Quantity_Max", SqlDbType.Money); _sqlRequestSelectSummary.SetParametrValue("@p_Quantity_Max", SqlMoney.MaxValue); _sqlRequestSelectSummary.AddParametr("@p_TagPriceVATRUS_Min", SqlDbType.Money); _sqlRequestSelectSummary.SetParametrValue("@p_TagPriceVATRUS_Min", System.Data.SqlTypes.SqlMoney.MaxValue); _sqlRequestSelectSummary.AddParametr("@p_TagPriceVATRUS_Max", SqlDbType.Money); _sqlRequestSelectSummary.SetParametrValue("@p_TagPriceVATRUS_Max", System.Data.SqlTypes.SqlMoney.MaxValue); //---------------------------------------------------------------------------- }