Beispiel #1
0
 public override string ToString()
 {
     return(string.Concat(new string[] {
         "SupplierID: ", SupplierID.ToString(),
         "ProductID: ", ProductID.ToString(),
         "Date First Supplied: ", DateFirstSupplied.ToString()
     }));
 }
 public override string ToString()
 {
     return(String.Concat(new string[]
     {
         " supplier ID ", SupplierID.ToString(), " Supplier Name ", SupplierName,
         " Addr1 ", SupplierAddressLine1, " addr2 ", Addressline2
     }));
 }
Beispiel #3
0
 public override string ToString()
 {
     return(string.Concat(new string[] {
         "SupplierID: ", SupplierID.ToString(),
         "Supplier Name: ", SupplierName,
         "Address Line 1: ", AddressLine1,
         "Address Line 2: ", AddressLine2
     }));
 }
Beispiel #4
0
        /// <summary>
        /// Override of the ToString method.
        /// </summary>
        /// <returns>Supplier ID, Type and Company Name</returns>
        public override string ToString()
        {
            StringBuilder sb = new StringBuilder();

            sb.Append("Product Name: ");
            sb.Append(ProductName);
            sb.Append("\tCategory ID: ");
            sb.Append(CategoryID.ToString());
            sb.Append("\tSupplier ID ");
            sb.Append(SupplierID.ToString());
            return(sb.ToString());
        }
Beispiel #5
0
 protected override string[] GetContent()
 {
     return(new[]
     {
         ID.ToString(),
         SpotTime.ToShortDateString(),
         Price.ToString(),
         ValueContextID.ToString(),
         ProductID.ToString(),
         SupplierID.ToString(),
         DescriptionID.ToString()
     });
 }
Beispiel #6
0
        /// <summary>
        /// Returns values in the collections.
        /// </summary>
        /// <returns>IEnumerator object</returns>
        public IEnumerator PropertyAndValuesCollection()
        {
            yield return("Product ID: " + ID.ToString());

            yield return("Product Name: " + ProductName);

            yield return("Supplier ID: " + SupplierID.ToString());

            yield return("Category ID: " + CategoryID.ToString());

            yield return("Quantity Per Unit: " + QuantityPerUnit);

            yield return("Unit Price: " + UnitPrice.ToString("c"));

            yield return("Units in Stock: " + UnitsInStock.ToString());

            yield return("Units On Order: " + UnitsOnOrder.ToString());

            yield return("ReOrder Level: " + ReOrderLevel.ToString());
        }
        protected void odsPRMSupplierItemMap_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)
        {
            String fe = String.Empty;

            if (ddlSupplierID.SelectedValue != "0")
            {
                fe = SqlExpressionBuilder.PrepareFilterExpression("PRMSupplierItemMap." + PRMSupplierItemMapEntity.FLD_NAME_SupplierID, SupplierID.ToString(), SQLMatchType.Equal);
            }

            e.InputParameters["filterExpression"] = fe;
        }
 public void Dispose()
 {
     _AllList.Remove(this);
     _AllByPrimaryKey.Remove(SupplierID.ToString());
 }
Beispiel #9
0
 public override string ToString()
 {
     return(string.Concat(ProductId.ToString(), " ", Description, " ", Quantity.ToString(), SupplierID.ToString()));
 }
        private Boolean ValidateInput()
        {
            Boolean validationResult = true;

            String fe  = String.Empty;
            String fe1 = SqlExpressionBuilder.PrepareFilterExpression(PRMSupplierItemMapEntity.FLD_NAME_ItemID, treeBrandItemMap.SelectedValue.ToString(), SQLMatchType.Equal);
            String fe2 = SqlExpressionBuilder.PrepareFilterExpression(PRMSupplierItemMapEntity.FLD_NAME_BrandID, treeBrandItemMap.SelectedNode.Parent.Value.ToString(), SQLMatchType.Equal);

            fe = SqlExpressionBuilder.PrepareFilterExpression(fe1, SQLJoinType.AND, fe2);

            String feSupplier = SqlExpressionBuilder.PrepareFilterExpression(PRMSupplierItemMapEntity.FLD_NAME_SupplierID, SupplierID.ToString(), SQLMatchType.Equal);

            fe = SqlExpressionBuilder.PrepareFilterExpression(fe, SQLJoinType.AND, feSupplier);
            if (ddlOriginRegionID.SelectedValue != "0")
            {
                String fe3 = SqlExpressionBuilder.PrepareFilterExpression(PRMSupplierItemMapEntity.FLD_NAME_OriginRegionID, ddlOriginRegionID.SelectedValue.ToString(), SQLMatchType.Equal);
                fe = SqlExpressionBuilder.PrepareFilterExpression(fe, SQLJoinType.AND, fe3);
            }

            if (ddlOriginCountryID.SelectedValue != "0")
            {
                String fe4 = SqlExpressionBuilder.PrepareFilterExpression(PRMSupplierItemMapEntity.FLD_NAME_OriginCountryID, ddlOriginCountryID.SelectedValue.ToString(), SQLMatchType.Equal);
                fe = SqlExpressionBuilder.PrepareFilterExpression(fe, SQLJoinType.AND, fe4);
            }

            IList <PRMSupplierItemMapEntity> supplierItemMapList = FCCPRMSupplierItemMap.GetFacadeCreate().GetIL(null, null, String.Empty, fe, DatabaseOperationType.LoadWithFilterExpression);

            if (supplierItemMapList != null && supplierItemMapList.Count > 0)
            {
                MiscUtil.ShowMessage(lblMessage, "Already entered the Item Price.", true);
                validationResult = false;
            }

            return(validationResult);
        }
Beispiel #11
0
        protected void lvPRMSupplier_ItemCommand(object sender, ListViewCommandEventArgs e)
        {
            Int64 SupplierID;

            Int64.TryParse(e.CommandArgument.ToString(), out SupplierID);

            if (SupplierID > 0)
            {
                if (string.Equals(e.CommandName, "EditItem"))
                {
                    _SupplierID = SupplierID;

                    PrepareEditView();

                    cpeEditor.Collapsed   = false;
                    cpeEditor.ClientState = "false";
                }
                else if (string.Equals(e.CommandName, "DeleteItem"))
                {
                    try
                    {
                        Int64 result = -1;

                        String fe = SqlExpressionBuilder.PrepareFilterExpression(PRMSupplierEntity.FLD_NAME_SupplierID, SupplierID.ToString(), SQLMatchType.Equal);

                        PRMSupplierEntity pRMSupplierEntity = new PRMSupplierEntity();


                        result = FCCPRMSupplier.GetFacadeCreate().Delete(pRMSupplierEntity, fe, DatabaseOperationType.Delete, TransactionRequired.No);

                        if (result == 0)
                        {
                            _SupplierID        = 0;
                            _PRMSupplierEntity = new PRMSupplierEntity();
                            PrepareInitialView();
                            BindPRMSupplierList();

                            MiscUtil.ShowMessage(lblMessage, "Vendor has been successfully deleted.", true);
                        }
                        else
                        {
                            MiscUtil.ShowMessage(lblMessage, "Failed to delete Vendor.", true);
                        }
                    }
                    catch (Exception ex)
                    {
                        MiscUtil.ShowMessage(lblMessage, ex.Message, true);
                    }
                }
            }
        }
Beispiel #12
0
        protected void lvPRMSupplier_ItemCommand(object sender, ListViewCommandEventArgs e)
        {
            Int64 SupplierID;

            Int64.TryParse(e.CommandArgument.ToString(), out SupplierID);

            if (SupplierID > 0)
            {
                if (string.Equals(e.CommandName, "EditItem"))
                {
                }
                else if (string.Equals(e.CommandName, "DeleteItem"))
                {
                    try
                    {
                        Int64 result = -1;

                        String fe = SqlExpressionBuilder.PrepareFilterExpression(PRMSupplierEntity.FLD_NAME_SupplierID, SupplierID.ToString(), SQLMatchType.Equal);

                        PRMSupplierEntity pRMSupplierEntity = new PRMSupplierEntity();


                        result = FCCPRMSupplier.GetFacadeCreate().Delete(pRMSupplierEntity, fe, DatabaseOperationType.Delete, TransactionRequired.No);

                        if (result == 0)
                        {
                        }
                        else
                        {
                        }
                    }
                    catch (Exception ex)
                    {
                    }
                }
            }
        }