Ejemplo n.º 1
0
        private int NextPaymentMethodID()
        {
            //
            if (qds_PaymentMethod_Sp == null)
            {
                qds_PaymentMethod_Sp = new Qds_PaymentMethod_Sp(Properties.Settings.Default.WsirDbConnectionString);
            }

            List <Qds_PaymentMethod> qds_PaymentMethodList = qds_PaymentMethod_Sp.SelectAll();

            if (qds_PaymentMethodList.Count < 1)
            {
                return(-1);
            }

            if (qds_PaymentMethodAvailableByDepot_Sp == null)
            {
                qds_PaymentMethodAvailableByDepot_Sp = new Qds_PaymentMethodAvailableByDepot_Sp(Properties.Settings.Default.WsirDbConnectionString);
            }

            foreach (Qds_PaymentMethod pm in qds_PaymentMethodList)
            {
                if (pm.PaymentMethodID == 0)
                {
                    continue;
                }

                qds_PaymentMethodAvailableByDepot = qds_PaymentMethodAvailableByDepot_Sp.Select(depotID, pm.PaymentMethodID);

                if (qds_PaymentMethodAvailableByDepot == null)
                {
                    return(pm.PaymentMethodID);
                }
            }


            return(-1);
        }
Ejemplo n.º 2
0
        private void QdBags_Load(object sender, EventArgs e)
        {
            panelDrops.Dock    = DockStyle.Fill;
            panelDrops.Visible = true;

            //disable form resizing
            this.FormBorderStyle = FormBorderStyle.FixedSingle;
            if (Properties.Settings.Default.TouchOriented)
            {
                this.Height                      = this.Height + (OK.Height) + 150;
                OK.Height                        = OK.Height * 2;
                buttonBags.Height                = buttonBags.Height * 2;
                buttonRefresh.Height             = buttonRefresh.Height * 2;
                Cancel.Height                    = Cancel.Height * 2;
                toolStripButtonVirtualKb.Visible = true;
                this.radioButtonShowAll.Font     = new System.Drawing.Font("Microsoft Sans Serif", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
                this.radioButtonMineOnly.Font    = new System.Drawing.Font("Microsoft Sans Serif", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
                this.CenterToParent();

                //bags
                buttonBagsSelect.Height          = buttonBagsSelect.Height * 2;
                buttonBagsRefresh.Height         = buttonBagsRefresh.Height * 2;
                buttonBagsClose.Height           = buttonBagsClose.Height * 2;
                this.radioButtonBagsShowAll.Font = new System.Drawing.Font("Microsoft Sans Serif", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
                this.radioButtonBagsUnused.Font  = new System.Drawing.Font("Microsoft Sans Serif", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            }

            //drops
            //listview with headers
            listViewDrops.View = View.Details;
            listViewDrops.Columns.Add("Drop #", 120, HorizontalAlignment.Right);
            listViewDrops.Columns.Add("Customer", 230, HorizontalAlignment.Left);
            listViewDrops.Columns.Add("Bags", 110, HorizontalAlignment.Right);
            listViewDrops.Columns.Add("Payment Method", 230, HorizontalAlignment.Left);
//            listViewDrop.Columns.Add("DepotID", 120, HorizontalAlignment.Left);
            listViewDrops.Columns.Add("Order #", 120, HorizontalAlignment.Right);
            listViewDrops.Columns.Add("Type", 75, HorizontalAlignment.Center);

            listViewDrops.FullRowSelect = true;
            listViewDrops.CheckBoxes    = true;
            listViewDrops.GridLines     = true;
            //listViewDrops.Activation = ItemActivation.OneClick;
            listViewDrops.MultiSelect = true;


            //bags
            //listview with headers
            listViewBags.View = View.Details;
            listViewBags.Columns.Add("Bag #", 120, HorizontalAlignment.Right);
            listViewBags.Columns.Add("Date Entered", 230, HorizontalAlignment.Center);
            listViewBags.Columns.Add("Date Counted", 230, HorizontalAlignment.Center);
            listViewBags.Columns.Add("Date Printed", 230, HorizontalAlignment.Center);
            //            listViewDrop.Columns.Add("DepotID", 120, HorizontalAlignment.Left);
            listViewBags.Columns.Add("Order #", 120, HorizontalAlignment.Right);

            listViewBags.FullRowSelect = true;
            listViewBags.CheckBoxes    = true;
            listViewBags.GridLines     = true;
            //listViewBags.Activation = ItemActivation.OneClick;


            if (qds_Drop_Sp == null)
            {
                qds_Drop_Sp = new Qds_Drop_Sp(Properties.Settings.Default.WsirDbConnectionString);
            }

            if (qds_Bag_Sp == null)
            {
                qds_Bag_Sp = new Qds_Bag_Sp(Properties.Settings.Default.WsirDbConnectionString);
            }

            if (qds_PaymentMethod_Sp == null)
            {
                qds_PaymentMethod_Sp = new Qds_PaymentMethod_Sp(Properties.Settings.Default.WsirDbConnectionString);
            }

            if (sol_Customer_Sp == null)
            {
                sol_Customer_Sp = new Sol_Customer_Sp(Properties.Settings.Default.WsirDbConnectionString);
            }


            radioButtonMineOnly.Checked = true;

            ReadDrops(radioButtonMineOnly.Checked);
        }