当前位置: 首页>>代码示例>>C#>>正文


C# Products.UpdateProductReorderOverStockPerGroup方法代码示例

本文整理汇总了C#中AceSoft.RetailPlus.Data.Products.UpdateProductReorderOverStockPerGroup方法的典型用法代码示例。如果您正苦于以下问题:C# Products.UpdateProductReorderOverStockPerGroup方法的具体用法?C# Products.UpdateProductReorderOverStockPerGroup怎么用?C# Products.UpdateProductReorderOverStockPerGroup使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AceSoft.RetailPlus.Data.Products的用法示例。


在下文中一共展示了Products.UpdateProductReorderOverStockPerGroup方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SetDataSource

		private void SetDataSource(ReportDocument Report)
		{
            ReportDataset rptds = new ReportDataset();

            string ProductGroupName = string.Empty;
            if (cboGroup.SelectedItem.Value != Constants.ZERO_STRING) ProductGroupName = cboGroup.SelectedItem.Text;
            string SubGroupName = string.Empty;
            if (cboSubGroup.SelectedItem.Value != Constants.ZERO_STRING) SubGroupName = cboSubGroup.SelectedItem.Text;

            DateTime dteIDCStartDate = DateTime.Now.AddDays(-14);
            DateTime dteIDCEndDate = DateTime.Now;
            
            try { dteIDCStartDate = Convert.ToDateTime(txtStartTransactionDate.Text + " " + txtStartTime.Text);}catch{}
            try { dteIDCEndDate = Convert.ToDateTime(txtEndTransactionDate.Text + " " + txtEndTime.Text);}catch{}

			Products clsProduct = new Products();
            
            if (cboSupplier.SelectedItem.Text == Constants.ALL)
            { 
                if (cboSubGroup.SelectedItem.Text == Constants.ALL)
                { clsProduct.UpdateProductReorderOverStockPerSubGroup(long.Parse(cboSubGroup.SelectedItem.Value), dteIDCStartDate, dteIDCEndDate); }
                else if (cboSubGroup.SelectedItem.Text == Constants.ALL)
                { clsProduct.UpdateProductReorderOverStockPerGroup(long.Parse(cboGroup.SelectedItem.Value), dteIDCStartDate, dteIDCEndDate); }
                else
                { clsProduct.UpdateProductReorderOverStock(dteIDCStartDate, dteIDCEndDate); }
            }
            else
            {
                if (cboSubGroup.SelectedItem.Text == Constants.ALL)
                { clsProduct.UpdateProductReorderOverStockPerSupplierPerSubGroup(long.Parse(cboSupplier.SelectedValue), long.Parse(cboSubGroup.SelectedItem.Value), dteIDCStartDate, dteIDCEndDate); }
                else if (cboSubGroup.SelectedItem.Text == Constants.ALL)
                { clsProduct.UpdateProductReorderOverStockPerSupplierPerGroup(long.Parse(cboSupplier.SelectedValue), long.Parse(cboGroup.SelectedItem.Value), dteIDCStartDate, dteIDCEndDate); }
                else
                { clsProduct.UpdateProductReorderOverStockPerSupplier(long.Parse(cboSupplier.SelectedValue), dteIDCStartDate, dteIDCEndDate); }
            }
            clsProduct.CommitAndDispose();

            clsProduct = new Products();
            System.Data.DataTable dt = (clsProduct.SearchDataTable(ProductListFilterType.ShowActiveOnly, string.Empty, long.Parse(cboSupplier.SelectedValue),
                                            long.Parse(cboGroup.SelectedItem.Value), string.Empty, long.Parse(cboSubGroup.SelectedItem.Value), string.Empty, 0, false, false, string.Empty, SortOption.Ascending));
            clsProduct.CommitAndDispose();

            foreach(System.Data.DataRow dr in dt.Rows)
            {
                DataRow drProducts = rptds.Products.NewRow();

                foreach (DataColumn dc in rptds.Products.Columns)
                    drProducts[dc] = dr[dc.ColumnName];

                rptds.Products.Rows.Add(drProducts);
            }

            //ProductVariationsMatrix clsMatrix = new ProductVariationsMatrix(clsProduct.Connection, clsProduct.Transaction);
            //rptds.Tables.Add(clsMatrix.BaseListAsDataTable(0, "a.ProductID", SortOption.Ascending));
            // ds.Tables.Add(clsMatrix.ForReorder("a.Quantity", SortOption.Ascending));

            Report.SetDataSource(rptds);

			SetParameters(Report);
		}
开发者ID:marioricci,项目名称:erp-luma,代码行数:60,代码来源:_inventoryanalyst.ascx.cs


注:本文中的AceSoft.RetailPlus.Data.Products.UpdateProductReorderOverStockPerGroup方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。