Beispiel #1
0
        private void DisplaySalesOrdersInGridView()
        {
            SalesOrder so = new SalesOrder();

            string FromOrderDate = txtOrderDate.Text.Trim();
            string ToOrderDate   = txtOrderDate2.Text.Trim();

            if (FromOrderDate != string.Empty || ToOrderDate != string.Empty)
            {
                if (FromOrderDate == string.Empty && ToOrderDate != string.Empty)
                {
                    FromOrderDate = ToOrderDate;
                }

                if (ToOrderDate == string.Empty && FromOrderDate != string.Empty)
                {
                    ToOrderDate = FromOrderDate;
                }

                so.OrderDate  = DateTime.ParseExact(FromOrderDate, "MM/dd/yyyy", CultureInfo.InvariantCulture);
                so.OrderDate2 = DateTime.ParseExact(ToOrderDate, "MM/dd/yyyy", CultureInfo.InvariantCulture);
            }

            so.OrderNumber   = txtOrderNumber.Text;
            so.OrderBy       = txtOrderBy.Text;
            so.InvoiceTo     = txtInvoiceTo.Text;
            so.YourRef       = txtYourRef.Text;
            so.SelectionCode = txtSelectionCode.Text;
            SearchOption searchOption = rblFilter.SelectedValue.ToSearchOptionEnum();

            gvSalesOrders.DataSource = so.Retrieve(searchOption);
            gvSalesOrders.DataBind();
        }
Beispiel #2
0
        private void DisplaySalesOrdersInBrowserGridView()
        {
            SalesOrder so = new SalesOrder();

            so.YourRef     = txtYourRef2.Text;
            so.Description = txtSODescription.Text;
            Business.SearchOption searchOption = rblSalesOrderFilter.SelectedValue.ToSearchOptionEnum();

            gvBrowseSalesOrders.DataSource = so.Retrieve(searchOption);
            gvBrowseSalesOrders.DataBind();
        }