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


C# Products.Details方法代码示例

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


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

示例1: Page_Load

		protected void Page_Load(object sender, System.EventArgs e)
		{
			const string defaultHeading = "Master Files";
			string stHeading = defaultHeading;
            
			const string defaultTitle = "Product Variation Combinations";
			SiteTitle.Title = defaultTitle;

			const SearchCategoryID defaultSearchIndex = SearchCategoryID.ProductVariationsMatrix;
			SearchCategoryID SearchIndex = defaultSearchIndex;			

			HorizontalNavBar.PageNavigatorid = HorizontalNavID.MasterFiles;
			
			if (Request.QueryString["task"]!=null)
			{
                Products clsProduct = new Products();
                ProductDetails clsDetails = new ProductDetails();

                long prodid = Convert.ToInt64(Common.Decrypt(Request.QueryString["prodid"].ToString(), Session.SessionID));
                clsDetails = clsProduct.Details(prodid);

                clsProduct.CommitAndDispose();

                string productCode = " for : " + clsDetails.ProductCode;

				string task = Common.Decrypt(Request.QueryString["task"].ToString(),Session.SessionID);
				switch(task)
				{
					case "add":
						stHeading = "Create New Product Variation Combination";	
						SearchIndex = SearchCategoryID.ProductVariationsMatrix;
						ctrlInsert.Visible = true;
						break;
					case "edit":
						stHeading = "Modify Product Variation Combination";
						SearchIndex = SearchCategoryID.ProductVariationsMatrix;
						ctrlUpdate.Visible = true;
						break;  
					case "det":
						stHeading = "Product Variation Details";	
						SearchIndex = SearchCategoryID.ProductVariationsMatrix;
						ctrlDetails.Visible = true;
						break;
					case "list":
						stHeading = "Product Variation Combinations List ";		
						SearchIndex = SearchCategoryID.ProductVariationsMatrix;
						ctrlList.Visible = true;
						break;		
					default:	
						break;
				}

				LargeHeading.Text = stHeading + productCode;
				RightBodySectionSearch.SearchIDSelectedItem = SearchIndex;
			}
		}
开发者ID:marioricci,项目名称:erp-luma,代码行数:56,代码来源:Default.aspx.cs

示例2: cboProductCode_SelectedIndexChanged

        protected void cboProductCode_SelectedIndexChanged(object sender, System.EventArgs e)
        {
            Products clsProduct = new Products();
            int intProductBaseUnitID = 0;
            decimal decCommision = 0;
            try {
                ProductDetails clsDetails = clsProduct.Details(Convert.ToInt64(cboProductCode.SelectedValue));
                intProductBaseUnitID = clsDetails.BaseUnitID; decCommision = clsDetails.PercentageCommision;
            }
            catch { }
            txtProductCode.ToolTip = intProductBaseUnitID.ToString();
            lblProductID.ToolTip = decCommision.ToString();

            clsProduct.CommitAndDispose();

        }
开发者ID:marioricci,项目名称:erp-luma,代码行数:16,代码来源:_AddProductVariation.ascx.cs

示例3: Upload1

        private void Upload1()
        {
            //string fn = System.IO.Path.GetFileName(TextBox1.Text);
            //string SaveLocation = "/RetailPlus/temp/uploaded_" + fn;

            //System.IO.File.Copy(TextBox1.Text, SaveLocation);
            //txtPath.PostedFile.SaveAs(SaveLocation);
            XmlTextReader xmlReader = new XmlTextReader(TextBox1.Text);
            xmlReader.WhitespaceHandling = WhitespaceHandling.None;

            Branch clsBranch = new Branch();
            BranchDetails clsBranchDetails = clsBranch.Details(Convert.ToInt16(cboBranchUpload.SelectedItem.Value.ToString()));
            clsBranch.CommitAndDispose();

            RemoteBranchInventory clsBranchInventory = new RemoteBranchInventory();
            clsBranchInventory.GetConnectionToBranch(clsBranchDetails.DBIP);

            Contacts clsBranchContact = new Contacts(clsBranchInventory.Connection, clsBranchInventory.Transaction);
            ContactDetails clsBranchContactDetails;

            ContactGroups clsBranchContactGroup = new ContactGroups(clsBranchInventory.Connection, clsBranchInventory.Transaction);
            ContactGroupDetails clsContactGroupDetails;

            Data.Unit clsBranchUnit = new Data.Unit(clsBranchInventory.Connection, clsBranchInventory.Transaction);
            UnitDetails clsUnitDetails;

            ProductGroup clsBranchProductGroup = new Data.ProductGroup(clsBranchInventory.Connection, clsBranchInventory.Transaction);
            ProductGroupDetails clsBranchProductGroupDetails;

            ProductSubGroup clsBranchProductSubGroup = new Data.ProductSubGroup(clsBranchInventory.Connection, clsBranchInventory.Transaction);
            ProductSubGroupDetails clsBranchProductSubGroupDetails;

            //Data.Variation clsBranchVariation = new Variation(clsBranchInventory.Connection, clsBranchInventory.Transaction);
            Products clsBranchProduct = new Products(clsBranchInventory.Connection, clsBranchInventory.Transaction);
            ProductDetails clsBranchProductDetails;

            ProductVariations clsBranchProductVariation = new ProductVariations(clsBranchInventory.Connection, clsBranchInventory.Transaction);
            ProductVariationDetails clsBranchProductVariationDetails;

            long lngBranchProductID = 0; long lngProductCtr = 0; long lngProductInserted = 0;

            while (xmlReader.Read())
            {
                switch (xmlReader.NodeType)
                {
                    case XmlNodeType.Element:

                        if (xmlReader.Name == "Item")
                        {
                            lngProductCtr++;

                            clsBranchProductDetails = new ProductDetails();
                            clsBranchProductDetails.BarCode = xmlReader.GetAttribute("BarCode");
                            clsBranchProductDetails.ProductCode = xmlReader.GetAttribute("ProductCode");
                            lblError.Text += "Checking <b>" + clsBranchProductDetails.ProductCode + "</b> if exist... ";

                            //check product by barcode
                            clsBranchProductDetails.ProductID = clsBranchProduct.Details(Constants.BRANCH_ID_MAIN, clsBranchProductDetails.BarCode).ProductID;
                            lngBranchProductID = clsBranchProductDetails.ProductID;
                            if (clsBranchProductDetails.ProductID != 0)
                            {
                                lblError.Text += " [Y] barcode exist... next item...<br />";
                                break;
                            }

                            //check product by product code
                            clsBranchProductDetails.ProductID = clsBranchProduct.Details(Constants.BRANCH_ID_MAIN, clsBranchProductDetails.ProductCode).ProductID;
                            lngBranchProductID = clsBranchProductDetails.ProductID;
                            if (clsBranchProductDetails.ProductID != 0)
                            {
                                clsBranchProduct.UpdateBarcode(clsBranchProductDetails.ProductID, clsBranchProductDetails.BarCode);
                                lblError.Text += " [Y] barcode not exist, product code exist. barcode updated. next item...<br />";
                                break;
                            }

                            lblError.Text += " [N] inserting product... ";

                            clsBranchProductDetails.BarCode = xmlReader.GetAttribute("BarCode");
                            clsBranchProductDetails.ProductDesc = xmlReader.GetAttribute("ProductDesc");
                            clsBranchProductDetails.ProductGroupCode = xmlReader.GetAttribute("ProductGroupCode");
                            clsBranchProductDetails.ProductGroupName = xmlReader.GetAttribute("ProductGroupName");
                            clsBranchProductDetails.ProductSubGroupCode = xmlReader.GetAttribute("ProductSubGroupCode");
                            clsBranchProductDetails.ProductSubGroupName = xmlReader.GetAttribute("ProductSubGroupName");
                            clsBranchProductDetails.BaseUnitCode = xmlReader.GetAttribute("BaseUnitCode");
                            clsBranchProductDetails.BaseUnitName = xmlReader.GetAttribute("BaseUnitName");
                            clsBranchProductDetails.DateCreated = DateTime.Now;
                            clsBranchProductDetails.Price = Convert.ToDecimal(xmlReader.GetAttribute("Price"));
                            clsBranchProductDetails.PurchasePrice = Convert.ToDecimal(xmlReader.GetAttribute("PurchasePrice"));
                            clsBranchProductDetails.IncludeInSubtotalDiscount = Convert.ToBoolean(xmlReader.GetAttribute("IncludeInSubtotalDiscount"));
                            clsBranchProductDetails.VAT = Convert.ToDecimal(xmlReader.GetAttribute("VAT"));
                            clsBranchProductDetails.EVAT = Convert.ToDecimal(xmlReader.GetAttribute("EVAT"));
                            clsBranchProductDetails.LocalTax = Convert.ToDecimal(xmlReader.GetAttribute("LocalTax"));
                            clsBranchProductDetails.Quantity = 0;
                            clsBranchProductDetails.MinThreshold = Convert.ToDecimal(xmlReader.GetAttribute("MinThreshold"));
                            clsBranchProductDetails.MaxThreshold = Convert.ToDecimal(xmlReader.GetAttribute("MaxThreshold"));
                            clsBranchProductDetails.ChartOfAccountIDPurchase = int.Parse(xmlReader.GetAttribute("ChartOfAccountIDPurchase"));
                            clsBranchProductDetails.ChartOfAccountIDSold = int.Parse(xmlReader.GetAttribute("ChartOfAccountIDSold"));
                            clsBranchProductDetails.ChartOfAccountIDInventory = int.Parse(xmlReader.GetAttribute("ChartOfAccountIDInventory"));
                            clsBranchProductDetails.ChartOfAccountIDTaxPurchase = int.Parse(xmlReader.GetAttribute("ChartOfAccountIDTaxPurchase"));
                            clsBranchProductDetails.ChartOfAccountIDTaxSold = int.Parse(xmlReader.GetAttribute("ChartOfAccountIDTaxSold"));
//.........这里部分代码省略.........
开发者ID:marioricci,项目名称:erp-luma,代码行数:101,代码来源:_Synchronize.ascx.cs

示例4: cboProductUnit_SelectedIndexChanged

        protected void cboProductUnit_SelectedIndexChanged(object sender, EventArgs e)
        {
            ProductPackage clsProductPackage = new ProductPackage();
            ProductPackageDetails clsDetails = clsProductPackage.DetailsByProductIDAndUnitID(long.Parse(cboProductCode.SelectedValue), long.Parse(cboProductUnit.SelectedValue));
            if (clsDetails.PackageID == 0)
            {
                ProductUnit clsProductUnit = new ProductUnit(clsProductPackage.Connection, clsProductPackage.Transaction);
                Products clsProduct = new Products(clsProductPackage.Connection, clsProductPackage.Transaction);
                ProductDetails clsProductDetails = clsProduct.Details(long.Parse(cboProductCode.SelectedItem.Value));
                decimal decBaseUnitValue = clsProductUnit.GetBaseUnitValue(long.Parse(cboProductCode.SelectedItem.Value), int.Parse(cboProductUnit.SelectedItem.Value), 1);

                clsDetails.Price = decBaseUnitValue * clsProductDetails.Price;
                clsDetails.PurchasePrice = decBaseUnitValue * clsProductDetails.PurchasePrice;
            }
            clsProductPackage.CommitAndDispose();


            txtPrice.Text = clsDetails.PurchasePrice.ToString("#####0.##0");
        }
开发者ID:marioricci,项目名称:erp-luma,代码行数:19,代码来源:_Post.ascx.cs

示例5: cboProductCode_SelectedIndexChanged

        protected void cboProductCode_SelectedIndexChanged(object sender, System.EventArgs e)
		{
            if (cboProductCode.Items.Count == 0)
                return;

            if (cboProductCode.Items.Count == 1 && cboProductCode.SelectedValue == Constants.ZERO_STRING)
                return;

            DataClass clsDataClass = new DataClass();
            long ProductID = Convert.ToInt64(cboProductCode.SelectedItem.Value);

            ProductVariationsMatrix clsProductVariationsMatrix = new ProductVariationsMatrix();
            cboVariation.DataTextField = "MatrixDescription";
            cboVariation.DataValueField = "MatrixID";
            cboVariation.DataSource = clsProductVariationsMatrix.BaseListSimpleAsDataTable(ProductID, SortField: "VariationDesc").DefaultView;
            cboVariation.DataBind();

            if (cboVariation.Items.Count == 0)
            { cboVariation.Items.Add(new ListItem("No Variation", "0")); }
            cboVariation.SelectedIndex = cboVariation.Items.Count - 1;

            ProductUnitsMatrix clsUnitMatrix = new ProductUnitsMatrix(clsProductVariationsMatrix.Connection, clsProductVariationsMatrix.Transaction);

			cboProductUnit.DataTextField = "BottomUnitCode";
			cboProductUnit.DataValueField = "BottomUnitID";
			cboProductUnit.DataSource = clsUnitMatrix.ListAsDataTable(ProductID,"a.MatrixID",SortOption.Ascending).DefaultView;
			cboProductUnit.DataBind();

            Products clsProduct = new Products(clsProductVariationsMatrix.Connection, clsProductVariationsMatrix.Transaction);
            ProductDetails clsDetails = clsProduct.Details(ProductID, MatrixID: Int64.Parse(cboVariation.SelectedItem.Value));
            clsProductVariationsMatrix.CommitAndDispose();

            cboProductUnit.Items.Insert(0, new ListItem(clsDetails.BaseUnitCode, clsDetails.BaseUnitID.ToString()));

            cboProductUnit.SelectedIndex = cboProductUnit.Items.IndexOf(new ListItem(clsDetails.BaseUnitCode, clsDetails.BaseUnitID.ToString()));

            txtPrevPrice.Text = clsDetails.PurchasePrice.ToString("#####0.#0");
			txtPrice.Text = clsDetails.PurchasePrice.ToString("#####0.#0");
			if (clsDetails.VAT >0)
				chkIsTaxable.Checked = true;
			else
				chkIsTaxable.Checked = false;
			
			ComputeItemAmount();
			cboVariation_SelectedIndexChanged(null, null);
		}
开发者ID:marioricci,项目名称:erp-luma,代码行数:46,代码来源:_Post.ascx.cs

示例6: LoadRecord

		private void LoadRecord()
		{
			Int64 iID = Convert.ToInt64(Common.Decrypt(Request.QueryString["id"],Session.SessionID));
			Products clsProduct = new Products();
            ProductDetails clsDetails = clsProduct.Details(iID);

			Contacts clsContact = new Contacts(clsProduct.Connection, clsProduct.Transaction);
			ContactDetails clsContactDetails = clsContact.Details(clsDetails.SupplierID);

			clsProduct.CommitAndDispose();

			lblProductID.Text = clsDetails.ProductID.ToString();
			lblQuantity.Text = clsDetails.Quantity.ToString("#,##0.#0");
			lblUnitCode.Text = clsDetails.BaseUnitCode;
			lblProductCode.Text = clsDetails.ProductCode;
			lblBarcode.Text = clsDetails.BarCode;
			lblProductDesc.Text = clsDetails.ProductDesc;
			lblProductGroup.Text = clsDetails.ProductGroupCode + "/" + clsDetails.ProductGroupName;
			lblProductSubGroup.Text = clsDetails.ProductSubGroupCode + "/" + clsDetails.ProductSubGroupName;

			lblSupplierCode.Text = clsContactDetails.ContactCode.ToString();
			string stParam = "?task=" + Common.Encrypt("details",Session.SessionID) + "&id=" + Common.Encrypt(clsDetails.SupplierID.ToString(),Session.SessionID);	
			lblSupplierCode.NavigateUrl = Constants.ROOT_DIRECTORY + "/MasterFiles/_Contact/Default.aspx" + stParam;

			lblSupplierContact.Text = clsContactDetails.BusinessName;
			lblSupplierTelephoneNo.Text = clsContactDetails.TelephoneNo;

            cboChartOfAccountPurchase.SelectedIndex = cboChartOfAccountPurchase.Items.IndexOf(cboChartOfAccountPurchase.Items.FindByValue(clsDetails.ChartOfAccountIDPurchase.ToString()));
            cboChartOfAccountSold.SelectedIndex = cboChartOfAccountSold.Items.IndexOf(cboChartOfAccountSold.Items.FindByValue(clsDetails.ChartOfAccountIDSold.ToString()));
            cboChartOfAccountInventory.SelectedIndex = cboChartOfAccountInventory.Items.IndexOf(cboChartOfAccountInventory.Items.FindByValue(clsDetails.ChartOfAccountIDInventory.ToString()));
            cboChartOfAccountIDTaxPurchase.SelectedIndex = cboChartOfAccountIDTaxPurchase.Items.IndexOf(cboChartOfAccountIDTaxPurchase.Items.FindByValue(clsDetails.ChartOfAccountIDTaxPurchase.ToString()));
            cboChartOfAccountIDTaxSold.SelectedIndex = cboChartOfAccountIDTaxSold.Items.IndexOf(cboChartOfAccountIDTaxSold.Items.FindByValue(clsDetails.ChartOfAccountIDTaxSold.ToString()));
			
		}
开发者ID:marioricci,项目名称:erp-luma,代码行数:34,代码来源:_Finance.ascx.cs

示例7: cboProductCode_SelectedIndexChanged

        protected void cboProductCode_SelectedIndexChanged(object sender, System.EventArgs e)
        {
            if (cboProductCode.Items.Count == 0)
                return;

            DataClass clsDataClass = new DataClass();
            long ProductID = Convert.ToInt64(cboProductCode.SelectedItem.Value);

            ProductVariationsMatrix clsProductVariationsMatrix = new ProductVariationsMatrix();
            cboVariation.DataTextField = "MatrixDescription";
            cboVariation.DataValueField = "MatrixID";
            cboVariation.DataSource = clsProductVariationsMatrix.BaseListSimpleAsDataTable(ProductID, SortField: "VariationDesc").DefaultView;
            cboVariation.DataBind();

            if (cboVariation.Items.Count == 0)
            { cboVariation.Items.Add(new ListItem("No Variation", "0"));}
            cboVariation.SelectedIndex = cboVariation.Items.Count - 1;

            ProductUnitsMatrix clsUnitMatrix = new ProductUnitsMatrix(clsProductVariationsMatrix.Connection, clsProductVariationsMatrix.Transaction);

            cboProductUnit.DataTextField = "BottomUnitCode";
            cboProductUnit.DataValueField = "BottomUnitID";
            cboProductUnit.DataSource = clsUnitMatrix.ListAsDataTable(ProductID, "a.MatrixID", SortOption.Ascending).DefaultView;
            cboProductUnit.DataBind();

            Products clsProduct = new Products(clsProductVariationsMatrix.Connection, clsProductVariationsMatrix.Transaction);
            ProductDetails clsDetails = clsProduct.Details(ProductID);
            clsProductVariationsMatrix.CommitAndDispose();
            cboProductUnit.Items.Insert(0, new ListItem(clsDetails.BaseUnitCode, clsDetails.BaseUnitID.ToString()));
            cboProductUnit.SelectedIndex = cboProductUnit.Items.IndexOf(new ListItem(clsDetails.BaseUnitCode, clsDetails.BaseUnitID.ToString()));

            txtPrice.Text = clsDetails.WSPrice.ToString("#####0.#0");
            txtSellingPrice.Text = clsDetails.Price.ToString("#####0.#0");
            decimal decMargin = clsDetails.Price - clsDetails.WSPrice;
            try { decMargin = decMargin / clsDetails.WSPrice; }
            catch { decMargin = 1; }
            decMargin = decMargin * 100;
            txtMargin.Text = decMargin.ToString("#,##0.##0");
            txtVAT.Text = clsDetails.VAT.ToString("#,##0.#0");
            txtEVAT.Text = clsDetails.EVAT.ToString("#,##0.#0");
            txtLocalTax.Text = clsDetails.LocalTax.ToString("#,##0.#0");

            if (clsDetails.VAT > 0)
                chkIsTaxable.Checked = true;
            else
                chkIsTaxable.Checked = false;

            ComputeItemAmount();
            cboVariation_SelectedIndexChanged(null, null);

            //if (ProductID != 0)
            //{
            //    lnkVariationAdd.Visible = true;
            //    string stParam = "?task=" + Common.Encrypt("add", Session.SessionID) +
            //                "&prodid=" + Common.Encrypt(ProductID.ToString(), Session.SessionID);
            //    lnkVariationAdd.NavigateUrl = Constants.ROOT_DIRECTORY + "/MasterFiles/_Product/_VariationsMatrix/Default.aspx" + stParam;
            //}
            //else { lnkVariationAdd.Visible = false; }
        }
开发者ID:marioricci,项目名称:erp-luma,代码行数:59,代码来源:_Post.ascx.cs

示例8: cboProductCode_SelectedIndexChanged

 protected void cboProductCode_SelectedIndexChanged(object sender, System.EventArgs e)
 {
     try
     {
         if (cboProductCode.SelectedItem.Value != Constants.ZERO_STRING)
         {
             Products clsProduct = new Products();
             ProductDetails clsProductDetails = clsProduct.Details(long.Parse(cboProductCode.SelectedItem.Value));
             clsProduct.CommitAndDispose();
             txtVAT.Text = clsProductDetails.VAT.ToString("#,##0.#0");
             txtEVAT.Text = clsProductDetails.EVAT.ToString("#,##0.#0");
             txtLocalTax.Text = clsProductDetails.LocalTax.ToString("#,##0.#0");
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
开发者ID:marioricci,项目名称:erp-luma,代码行数:19,代码来源:_changetax.ascx.cs

示例9: SaveRecord

		private Int32 SaveRecord()
		{
			ProductUnitsMatrix clsUnitMatrix = new ProductUnitsMatrix();
			ProductUnitsMatrixDetails clsDetails = new ProductUnitsMatrixDetails();

			clsDetails.ProductID = Convert.ToInt64(lblProductID.Text);
			clsDetails.BaseUnitID = Convert.ToInt32(lblBaseUnitID.Text);
			clsDetails.BaseUnitValue = Convert.ToDecimal(txtBaseUnitValue.Text);
			clsDetails.BottomUnitID = Convert.ToInt32(cboBottomUnit.SelectedItem.Value);
			clsDetails.BottomUnitValue = Convert.ToDecimal(txtBottomUnitValue.Text);
			int id = clsUnitMatrix.Insert(clsDetails);

            ProductPackageDetails clsProductPackageDetails = new ProductPackageDetails();
            ProductPackage clsProductPackage = new ProductPackage(clsUnitMatrix.Connection, clsUnitMatrix.Transaction);
            clsProductPackageDetails = clsProductPackage.DetailsByProductIDAndUnitID(Convert.ToInt64(lblProductID.Text), Convert.ToInt32(cboBottomUnit.SelectedItem.Value));
            if (clsProductPackageDetails.PackageID == 0)
            {
                Products clsProduct = new Products(clsUnitMatrix.Connection, clsUnitMatrix.Transaction);
                ProductDetails clsProductDetails = clsProduct.Details(Convert.ToInt64(lblProductID.Text));

                Terminal clsTerminal = new Terminal(clsUnitMatrix.Connection, clsUnitMatrix.Transaction);
                TerminalDetails clsTerminalDetails = clsTerminal.Details(Int32.Parse(Session["BranchID"].ToString()), Session["TerminalNo"].ToString());

                clsProductPackageDetails.ProductID = Convert.ToInt64(lblProductID.Text);
                clsProductPackageDetails.UnitID = Convert.ToInt32(cboBottomUnit.SelectedItem.Value);
                clsProductPackageDetails.Price = clsProductDetails.Price * Convert.ToDecimal(txtBaseUnitValue.Text);
                clsProductPackageDetails.WSPrice = clsProductDetails.WSPrice * Convert.ToDecimal(txtBaseUnitValue.Text);
                clsProductPackageDetails.PurchasePrice = clsProductDetails.PurchasePrice * Convert.ToDecimal(txtBaseUnitValue.Text);
                clsProductPackageDetails.Quantity = 1;
                clsProductPackageDetails.VAT = clsTerminalDetails.VAT;
                clsProductPackageDetails.EVAT = clsTerminalDetails.EVAT;
                clsProductPackageDetails.LocalTax = clsTerminalDetails.LocalTax;
                if (!string.IsNullOrEmpty(clsProductDetails.BarCode1)) clsProductPackageDetails.BarCode1 = clsProductDetails.BarCode1 + clsProductPackageDetails.UnitID.ToString() + clsProductPackageDetails.Quantity.ToString();
                if (!string.IsNullOrEmpty(clsProductDetails.BarCode2)) clsProductPackageDetails.BarCode2 = clsProductDetails.BarCode2 + clsProductPackageDetails.UnitID.ToString() + clsProductPackageDetails.Quantity.ToString();
                if (!string.IsNullOrEmpty(clsProductDetails.BarCode3)) clsProductPackageDetails.BarCode3 = clsProductDetails.BarCode3 + clsProductPackageDetails.UnitID.ToString() + clsProductPackageDetails.Quantity.ToString();
                clsProductPackage.Insert(clsProductPackageDetails);
            }
			clsUnitMatrix.CommitAndDispose();

			return id;
		}
开发者ID:marioricci,项目名称:erp-luma,代码行数:41,代码来源:_Insert.ascx.cs

示例10: LoadRecord

		private void LoadRecord()
		{
			ProductPackage clsProductPackage = new ProductPackage();
			ProductPackageDetails clsDetails = clsProductPackage.Details(Convert.ToInt64(lblPackageID.Text));

            Products clsProduct = new Products(clsProductPackage.Connection, clsProductPackage.Transaction);
            ProductDetails clsProductDetails = clsProduct.Details(Convert.ToInt64(lblProductID.Text));

            ProductBaseVariationsMatrixDetails clsProductBaseVariationsMatrixDetails = new ProductBaseVariationsMatrix(clsProductPackage.Connection, clsProductPackage.Transaction).BaseDetails(clsDetails.MatrixID, clsDetails.ProductID);
            clsProductPackage.CommitAndDispose();

            lblProductSubGroupID.Text = clsProductDetails.ProductSubGroupID.ToString();

            lblMatrixID.Text = clsDetails.MatrixID.ToString();
            lblMatrixDescription.Text = clsDetails.MatrixID == 0 ? "" : "Base Matrix: " + clsProductBaseVariationsMatrixDetails.Description;

			cboUnit.SelectedIndex = cboUnit.Items.IndexOf(cboUnit.Items.FindByValue(clsDetails.UnitID.ToString()));
			txtProductPrice.Text = clsDetails.Price.ToString("#,##0.#0");
            txtPrice1.Text = clsDetails.Price1.ToString("#,##0.#0");
            txtPrice2.Text = clsDetails.Price2.ToString("#,##0.#0");
            txtPrice3.Text = clsDetails.Price3.ToString("#,##0.#0");
            txtPrice4.Text = clsDetails.Price4.ToString("#,##0.#0");
            txtPrice5.Text = clsDetails.Price5.ToString("#,##0.#0");
            txtWSPrice.Text = clsDetails.WSPrice.ToString("#,##0.#0");
			txtPurchasePrice.Text = clsDetails.PurchasePrice.ToString("#,##0.#0");

            decimal decMargin = clsDetails.Price - clsDetails.PurchasePrice;
            try { decMargin = decMargin / clsDetails.PurchasePrice; }
            catch { decMargin = 1; }
            decMargin = decMargin * 100;
            txtMargin.Text = decMargin.ToString("#,##0.##0");

            decMargin = clsDetails.WSPrice - clsDetails.PurchasePrice;
            try { decMargin = decMargin / clsDetails.PurchasePrice; }
            catch { decMargin = 1; }
            decMargin = decMargin * 100;
            txtWSPriceMarkUp.Text = decMargin.ToString("#,##0.##0");

			txtVAT.Text = clsDetails.VAT.ToString("#,##0.#0");
			txtEVAT.Text = clsDetails.EVAT.ToString("#,##0.#0");
			txtLocalTax.Text = clsDetails.LocalTax.ToString("#,##0.#0");
			txtQuantity.Text = clsDetails.Quantity.ToString("#,##0.#0");
            txtBarCode1.Text = clsDetails.BarCode1;
            txtBarCode2.Text = clsDetails.BarCode2;
            txtBarCode3.Text = clsDetails.BarCode3;
            if (clsDetails.Quantity == 1 && clsProductDetails.BaseUnitID == clsDetails.UnitID)
            {
                txtQuantity.Enabled = false; cboUnit.Enabled = false;
            }
		}
开发者ID:marioricci,项目名称:erp-luma,代码行数:50,代码来源:_Update.ascx.cs

示例11: LoadOptions

		private void LoadOptions()
		{
			DataClass clsDataClass = new DataClass();

			lblProductID.Text = Common.Decrypt((string)Request.QueryString["prodid"],Session.SessionID);
			lblPackageID.Text = Common.Decrypt(Request.QueryString["id"],Session.SessionID);

			ProductUnitsMatrix clsUnit = new ProductUnitsMatrix();
			cboUnit.DataTextField = "BottomUnitName";
			cboUnit.DataValueField = "BottomUnitID";
			cboUnit.DataSource = clsUnit.ListAsDataTable(Convert.ToInt64(lblProductID.Text),"MatrixID",SortOption.Ascending).DefaultView;
			cboUnit.DataBind();

            Products clsProduct = new Products(clsUnit.Connection, clsUnit.Transaction);
            ProductDetails clsDetails = clsProduct.Details(Convert.ToInt64(lblProductID.Text));
            clsUnit.CommitAndDispose();

            cboUnit.Items.Insert(0, new ListItem(clsDetails.BaseUnitName, clsDetails.BaseUnitID.ToString()));
            cboUnit.SelectedIndex = 0;
		}
开发者ID:marioricci,项目名称:erp-luma,代码行数:20,代码来源:_Update.ascx.cs

示例12: cboVariation_SelectedIndexChanged

		protected void cboVariation_SelectedIndexChanged(object sender, System.EventArgs e)
		{
			long MatrixID = Convert.ToInt64(cboVariation.SelectedItem.Value);
			if (MatrixID != 0)
			{
				long ProductID = Convert.ToInt64(cboProductCode.SelectedItem.Value);

                Products clsProducts = new Products();
                ProductDetails clsDetails = clsProducts.Details(ProductID: ProductID, MatrixID: MatrixID);
                clsProducts.CommitAndDispose();
				
			}
		}
开发者ID:marioricci,项目名称:erp-luma,代码行数:13,代码来源:_Compose.ascx.cs

示例13: cboProductCode_SelectedIndexChanged

		protected void cboProductCode_SelectedIndexChanged(object sender, System.EventArgs e)
		{
			if (cboProductCode.Items.Count == 0)
				return;

			DataClass clsDataClass = new DataClass();
			long ProductID = Convert.ToInt64(cboProductCode.SelectedItem.Value);

            if (ProductID == 0) {
                cboVariation.Items.Clear();
                cboVariation.Items.Add(new ListItem("No Variation", "0"));
                return; 
            }

			ProductVariationsMatrix clsProductVariationsMatrix = new ProductVariationsMatrix();
			cboVariation.DataTextField = "VariationDesc";
			cboVariation.DataValueField = "MatrixID";
			cboVariation.DataSource = clsProductVariationsMatrix.BaseListSimpleAsDataTable(ProductID, SortField: "VariationDesc").DefaultView;
			cboVariation.DataBind();

			if (cboVariation.Items.Count == 0)
			{
				cboVariation.Items.Add(new ListItem("No Variation", "0"));
			}
			cboVariation.SelectedIndex = cboVariation.Items.Count - 1;
			clsProductVariationsMatrix.CommitAndDispose();

			ProductUnitsMatrix clsUnitMatrix = new ProductUnitsMatrix();

			cboProductUnit.DataTextField = "BottomUnitCode";
			cboProductUnit.DataValueField = "BottomUnitID";
			cboProductUnit.DataSource = clsUnitMatrix.ListAsDataTable(ProductID,"a.MatrixID",SortOption.Ascending).DefaultView;
			cboProductUnit.DataBind();
			clsUnitMatrix.CommitAndDispose();

			Products clsProduct = new Products();
			ProductDetails clsDetails = new ProductDetails();
			clsDetails = clsProduct.Details(ProductID);
			clsProduct.CommitAndDispose();
			cboProductUnit.Items.Add( new ListItem(clsDetails.BaseUnitCode, clsDetails.BaseUnitID.ToString()));

			cboProductUnit.SelectedIndex = cboProductUnit.Items.Count - 1;

			cboVariation_SelectedIndexChanged(null, null);
		}
开发者ID:marioricci,项目名称:erp-luma,代码行数:45,代码来源:_Compose.ascx.cs

示例14: cboProductCode_SelectedIndexChanged

        protected void cboProductCode_SelectedIndexChanged(object sender, System.EventArgs e)
        {
            int intProductBaseUnitID = 0;
            decimal decCommision = 0;
            lblProductSubGroupID.Text = "0";

            if (cboProductCode.SelectedItem.Value != Constants.ZERO_STRING)
            {
                Products clsProduct = new Products();
                try
                {
                    ProductDetails clsDetails = clsProduct.Details(Convert.ToInt64(cboProductCode.SelectedValue));
                    intProductBaseUnitID = clsDetails.BaseUnitID; decCommision = clsDetails.PercentageCommision;

                    lblProductSubGroupID.Text = clsDetails.ProductSubGroupID.ToString();
                }
                catch { }
                
                txtProductCode.ToolTip = intProductBaseUnitID.ToString();
                lblProductID.ToolTip = decCommision.ToString();
                long ProductID = Convert.ToInt64(cboProductCode.SelectedValue);

                ProductPackage clsProductPackage = new ProductPackage(clsProduct.Connection, clsProduct.Transaction);
                lstProductPackages.DataSource = clsProductPackage.ListAsDataTable(Convert.ToInt64(cboProductCode.SelectedValue)).DefaultView;
                lstProductPackages.DataBind();

                ProductPurchasePriceHistory clsProductPurchasePriceHistory = new ProductPurchasePriceHistory(clsProduct.Connection, clsProduct.Transaction);
                System.Data.DataTable dtProductPurchasePriceHistory = clsProductPurchasePriceHistory.ListAsDataTable(Convert.ToInt64(cboProductCode.SelectedValue), DateTime.Now.AddMonths(-6), "PurchasePrice", SortOption.Ascending);
                clsProduct.CommitAndDispose();

                string strPurchasePriceHistory = string.Empty;
                foreach (System.Data.DataRow dr in dtProductPurchasePriceHistory.Rows)
                {
                    DateTime dtePurchaseDate = DateTime.Parse(dr["PurchaseDate"].ToString());
                    decimal decPurchasePrice = decimal.Parse(dr["PurchasePrice"].ToString());
                    string strSupplierName = "" + dr["PurchaserName"].ToString();
                    string strPurchaserName = "" + dr["SupplierName"].ToString();

                    strPurchasePriceHistory += dtePurchaseDate.ToString("ddMMMyyyy HH:mm") + ": " + strPurchaserName.PadRight(50) + " - " + decPurchasePrice.ToString("#,##0.#0").PadLeft(10) + " " + strSupplierName + "\r\n<br />" + Environment.NewLine;
                }
                lblPurchasePriceHistory.Text = "<br /><b>PURCHASE PRICE HISTORY: </b><br /><br />" + strPurchasePriceHistory;

                lblProductPackage.Visible = true;
                lnkProductPackageAdd.Visible = true;
                lstProductPackages.Visible = true;
                imgProductHistory.Visible = true;
                imgProductPriceHistory.Visible = true;
                imgInventoryAdjustment.Visible = true;
                imgEditNow.Visible = true;
                lnkPackage.Visible = true;
                imgVariationsMatrix.Visible = true;
                imgUnitsMatrix.Visible = true;

                string stParam = "?task=" + Common.Encrypt("list", Session.SessionID) + "&prodid=" + Common.Encrypt(cboProductCode.SelectedValue, Session.SessionID);
                lnkPackage.NavigateUrl = Constants.ROOT_DIRECTORY + "/MasterFiles/_Product/_Package/Default.aspx" + stParam;

                lnkProductPackageAdd.ToolTip = "Add new package for " + cboProductCode.SelectedItem.Text;
                lnkProductPackageAdd.NavigateUrl = "_Package/Default.aspx?task=" + Common.Encrypt("add", Session.SessionID) + "&prodid=" + Common.Encrypt(cboProductCode.SelectedValue, Session.SessionID) + "&productcode=" + Common.Encrypt(cboProductCode.SelectedItem.Text, Session.SessionID);
                txtProductCode.Text = cboProductCode.SelectedItem.Text;
                lblPurchasePriceHistory.Visible = true;
            }
            else if (cboProductCode.SelectedItem.Text == Constants.ZERO_STRING)
            {
                lblProductPackage.Visible = false;
                lnkProductPackageAdd.Visible = false;
                lstProductPackages.Visible = false;
                imgProductHistory.Visible = false;
                imgProductPriceHistory.Visible = false;
                imgInventoryAdjustment.Visible = false;
                imgEditNow.Visible = false;
                lnkPackage.Visible = false;
                imgVariationsMatrix.Visible = false;
                imgUnitsMatrix.Visible = false;
                lblPurchasePriceHistory.Visible = false;
                txtProductCode.ToolTip = intProductBaseUnitID.ToString();
                lblProductID.ToolTip = decCommision.ToString(); 
            }
           
        }
开发者ID:marioricci,项目名称:erp-luma,代码行数:79,代码来源:_changeprice.ascx.cs

示例15: LoadRecord

		private void LoadRecord()
		{
            Int64 prdID = Convert.ToInt64(Common.Decrypt(Request.QueryString["id"], Session.SessionID));
			Products clsProduct = new Products();
            ProductDetails clsDetails = clsProduct.Details(prdID);

            ProductUnitsMatrix clsProductUnitsMatrix = new ProductUnitsMatrix(clsProduct.Connection, clsProduct.Transaction);
            System.Data.DataTable dtUnits = clsProductUnitsMatrix.ListAsDataTable(clsDetails.ProductID);

			clsProduct.CommitAndDispose();

			lblProductID.Text = clsDetails.ProductID.ToString();
			txtProductCode.Text = clsDetails.ProductCode;
			txtBarcode.Text = clsDetails.BarCode;
            txtBarcode2.Text = clsDetails.BarCode2;
            txtBarcode3.Text = clsDetails.BarCode3;
			txtProductDesc.Text = clsDetails.ProductDesc;
			cboProductGroup.SelectedIndex = cboProductGroup.Items.IndexOf(cboProductGroup.Items.FindByValue(clsDetails.ProductGroupID.ToString()));
			cboProductSubGroup.SelectedIndex = cboProductSubGroup.Items.IndexOf(cboProductSubGroup.Items.FindByValue(clsDetails.ProductSubGroupID.ToString()));
			txtProductDesc.Text = clsDetails.ProductDesc;
			cboProductUnit.SelectedIndex = cboProductUnit.Items.IndexOf(cboProductUnit.Items.FindByValue(clsDetails.BaseUnitID.ToString()));
			txtProductPrice.Text = clsDetails.Price.ToString("#,##0.#0");
            txtPrice1.Text = clsDetails.Price1.ToString("#,##0.#0");
            txtPrice2.Text = clsDetails.Price2.ToString("#,##0.#0");
            txtPrice3.Text = clsDetails.Price3.ToString("#,##0.#0");
            txtPrice4.Text = clsDetails.Price4.ToString("#,##0.#0");
            txtPrice5.Text = clsDetails.Price5.ToString("#,##0.#0");
            txtWSPrice.Text = clsDetails.WSPrice.ToString("#,##0.#0");
            txtPurchasePrice.Text = clsDetails.PurchasePrice.ToString("#,##0.#0");
            txtPercentageCommision.Text = clsDetails.PercentageCommision.ToString("#,##0.#0");
            decimal decMargin = clsDetails.Price - clsDetails.PurchasePrice;
            try { decMargin = decMargin / clsDetails.PurchasePrice; }
            catch { decMargin = 1; }
            decMargin = decMargin * 100;
            txtMargin.Text = decMargin.ToString("#,##0.##0");

            decMargin = clsDetails.WSPrice - clsDetails.PurchasePrice;
            try { decMargin = decMargin / clsDetails.PurchasePrice; }
            catch { decMargin = 1; }
            decMargin = decMargin * 100;
            txtWSPriceMarkUp.Text = decMargin.ToString("#,##0.##0");

            chkIncludeInSubtotalDiscount.Checked = clsDetails.IncludeInSubtotalDiscount;
			txtVAT.Text = clsDetails.VAT.ToString("#,##0.#0");
			txtEVAT.Text = clsDetails.EVAT.ToString("#,##0.#0");
			txtLocalTax.Text = clsDetails.LocalTax.ToString("#,##0.#0");
			txtQuantity.Text = clsDetails.Quantity.ToString("#,##0.#0");
			txtMinThreshold.Text = clsDetails.MinThreshold.ToString("#,##0.#0");
			txtMaxThreshold.Text = clsDetails.MaxThreshold.ToString("#,##0.#0");
			cboSupplier.SelectedIndex = cboSupplier.Items.IndexOf(cboSupplier.Items.FindByValue(clsDetails.SupplierID.ToString()));
            chkIsItemSold.Checked = clsDetails.IsItemSold;
            chkWillPrintProductComposition.Checked = clsDetails.WillPrintProductComposition;

            txtRID.Text = clsDetails.RID.ToString("###0");
            txtSequenceNo.Text = clsDetails.SequenceNo.ToString("###0");

            cboProductUnit.Enabled = dtUnits.Rows.Count >= 1 ? false : true;

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


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