Esempio n. 1
0
        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", "");
        }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
        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);
            //----------------------------------------------------------------------------
        }