Exemplo n.º 1
0
        private void btnReports_Click(object sender, EventArgs e)
        {
            Button oBtn = sender as Button;

            if (oBtn != null && formloaded)
            {
                var KO = (TLKNI_Order)cmbKnitOrder.SelectedItem;
                if (KO != null)
                {
                    YarnReportOptions repOpts = new YarnReportOptions();

                    repOpts.ReportKey = KO.KnitO_Pk;

                    DialogResult res = MessageBox.Show("Print Report with Current Results", "Print Options", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
                    if (res == DialogResult.Yes)
                    {
                        repOpts.PrintWithCurrent = true;
                    }
                    else
                    {
                        repOpts.PrintWithCurrent = false;
                    }

                    frmKnitViewRep vRep = new frmKnitViewRep(9, repOpts);
                    int            h    = Screen.PrimaryScreen.WorkingArea.Height;
                    int            w    = Screen.PrimaryScreen.WorkingArea.Width;
                    vRep.ClientSize = new Size(w, h);
                    vRep.ShowDialog(this);
                }
            }
        }
Exemplo n.º 2
0
        private void btnSubmit_Click(object sender, EventArgs e)
        {
            Button oBtn = (Button)sender;

            if (oBtn != null && FormLoaded)
            {
                YarnReportOptions opts = new YarnReportOptions();

                opts.fromDate = Convert.ToDateTime(dtpFromDate.Value.ToShortDateString());
                opts.toDate   = Convert.ToDateTime(dtpToDate.Value.ToShortDateString());
                opts.toDate   = opts.toDate.AddHours(23);

                if (rbQuality.Checked)
                {
                    opts.GKM_Quality = true;
                }
                else if (rbMachine.Checked)
                {
                    opts.GKM_Machines = true;
                }
                else
                {
                    opts.GKM_Operators = true;
                }



                frmKnitViewRep vRep = new frmKnitViewRep(33, Parms, opts);
                int            h    = Screen.PrimaryScreen.WorkingArea.Height;
                int            w    = Screen.PrimaryScreen.WorkingArea.Width;
                vRep.ClientSize = new Size(w, h);
                vRep.ShowDialog(this);
            }
        }
Exemplo n.º 3
0
        private void button1_Click(object sender, EventArgs e)
        {
            Button oBtn = sender as Button;

            if (oBtn != null && formloaded)
            {
                YarnReportOptions opts = new YarnReportOptions();
                opts.reportChoice = 1;

                frmKnitViewRep vRep = new frmKnitViewRep(16, opts);
                vRep.ShowDialog(this);
            }
        }
Exemplo n.º 4
0
        private void button1_Click(object sender, EventArgs e)
        {
            Button oBtn = sender as Button;

            if (oBtn != null && formloaded)
            {
                YarnReportOptions opts = new YarnReportOptions();
                opts.reportChoice = 1;
                frmKnitViewRep vRep = new frmKnitViewRep(16, opts);
                int            h    = Screen.PrimaryScreen.WorkingArea.Height;
                int            w    = Screen.PrimaryScreen.WorkingArea.Width;
                vRep.ClientSize = new Size(w, h);
                vRep.ShowDialog(this);
            }
        }
Exemplo n.º 5
0
        private void btnProcess_Click(object sender, EventArgs e)
        {
            Button oBtn = sender as Button;

            if (oBtn != null)
            {
                YarnReportOptions repOts = new YarnReportOptions();
                repOts.fromDate = Convert.ToDateTime(dtpFromDate.Value.ToShortDateString());
                repOts.toDate   = Convert.ToDateTime(dtpToDate.Value.ToShortDateString());
                repOts.toDate   = repOts.toDate.AddHours(23.59);
                if (rbKnitOrder.Checked)
                {
                    repOts.KnitOrder = true;
                }
                else if (rbKnitMachime.Checked)
                {
                    repOts.KnitMachines = true;
                }
                else if (rbGreigeProduct.Checked)
                {
                    repOts.GreigeProduct = true;
                }
                else if (rbProcesdLoss.Checked)
                {
                    repOts.ProcessLoss = true;
                }
                else if (rbYarnTex.Checked)
                {
                    repOts.YarnTex = true;
                }
                else if (rbYarnType.Checked)
                {
                    repOts.YarnType = true;
                }


                frmKnitViewRep vRep = new frmKnitViewRep(18, repOts);
                int            h    = Screen.PrimaryScreen.WorkingArea.Height;
                int            w    = Screen.PrimaryScreen.WorkingArea.Width;
                vRep.ClientSize = new Size(w, h);
                vRep.ShowDialog(this);
            }
        }
Exemplo n.º 6
0
        private void btnReport_Click(object sender, EventArgs e)
        {
            YarnReportOptions YarnOpts = new YarnReportOptions();

            YarnOpts.fromDate = Convert.ToDateTime(dtpFromDate.Value.ToShortDateString());
            YarnOpts.toDate   = Convert.ToDateTime(dtpToDate.Value.ToShortDateString());
            YarnOpts.toDate   = YarnOpts.toDate.AddHours(23);
            if (rbShifts.Checked)
            {
                YarnOpts.SplitByShift = true;
            }

            frmKnitViewRep vRep = new frmKnitViewRep(25, YarnOpts);
            int            h    = Screen.PrimaryScreen.WorkingArea.Height;
            int            w    = Screen.PrimaryScreen.WorkingArea.Width;

            vRep.ClientSize = new Size(w, h);
            vRep.ShowDialog(this);
        }
Exemplo n.º 7
0
        private void btnProcess_Click(object sender, EventArgs e)
        {
            Button oBtn = sender as Button;

            if (oBtn != null)
            {
                YarnReportOptions repOts = new YarnReportOptions();
                repOts.fromDate = Convert.ToDateTime(dtpFromDate.Value.ToShortDateString());
                repOts.toDate   = Convert.ToDateTime(dtpToDate.Value.ToShortDateString());

                if (rbKnitOrder.Checked)
                {
                    repOts.KnitOrder = true;
                }
                else if (rbKnitMachime.Checked)
                {
                    repOts.KnitMachines = true;
                }
                else if (rbGreigeProduct.Checked)
                {
                    repOts.GreigeProduct = true;
                }
                else if (rbProcesdLoss.Checked)
                {
                    repOts.ProcessLoss = true;
                }
                else if (rbYarnTex.Checked)
                {
                    repOts.YarnTex = true;
                }
                else if (rbYarnType.Checked)
                {
                    repOts.YarnType = true;
                }


                frmKnitViewRep vRep = new frmKnitViewRep(18, repOts);
                vRep.ShowDialog(this);
            }
        }
Exemplo n.º 8
0
        private void btnReport_Click(object sender, EventArgs e)
        {
            Button oBtn = sender as Button;

            if (oBtn != null)
            {
                Util core = new Util();

                YarnReportOptions repOps = new YarnReportOptions();

                repOps.fromDate = Convert.ToDateTime(dtpFromDate.Value.ToShortDateString());
                repOps.toDate   = Convert.ToDateTime(dtpToDate.Value.ToShortDateString());
                repOps.toDate   = repOps.toDate.AddHours(23);
                if (rbKnitMachine.Checked)
                {
                    repOps.K12KnitMachine = true;
                }
                else if (rbOperator.Checked)
                {
                    repOps.K12Operator = true;
                }
                else if (rbSpinning.Checked)
                {
                    repOps.K12Spinning = true;
                }
                else
                {
                    repOps.K12YarnOrder = true;
                }

                frmKnitViewRep vRep = new frmKnitViewRep(21, repOps);
                int            h    = Screen.PrimaryScreen.WorkingArea.Height;
                int            w    = Screen.PrimaryScreen.WorkingArea.Width;
                vRep.ClientSize = new Size(w, h);
                vRep.ShowDialog(this);
            }
        }
Exemplo n.º 9
0
        private void button1_Click(object sender, EventArgs e)
        {
            Button oBtn = sender as Button;

            if (oBtn != null && formloaded)
            {
                YarnReportOptions YarnOpts = new YarnReportOptions();
                var index = -1;

                YarnOpts.BIFSummarised = rbBIFSummarised.Checked;

                QueryParms.BoughtInFabric = chkBoughtInFabric.Checked;
                //QueryParms.Grade = txtGrade.Text;

                foreach (var element in MandSelected)
                {
                    ++index;
                    if (element)
                    {
                        if (index == 0)
                        {
                            YarnOpts.K10Store = true;
                            // YarnOpts.K10StoreFK = ((TLADM_WhseStore)cmboStore.SelectedItem).WhStore_Id;
                        }
                        else if (index == 1)
                        {
                            YarnOpts.K10Grade = true;
                            // YarnOpts.K10GradeFK = txtGrade.Text;
                        }
                        else if (index == 2)
                        {
                            YarnOpts.GreigeProduct = true;
                            // YarnOpts.K10GreigeProductFK = ((TLADM_Griege)cmboProduct.SelectedItem).TLGreige_Id;
                        }
                        else if (index == 3)
                        {
                            YarnOpts.K10ProductQ = true;
                            // YarnOpts.K10GreigeProductQFK = ((TLADM_GreigeQuality)cmboProductGroup.SelectedItem).GQ_Pk;
                        }
                        else if (index == 4)
                        {
                            YarnOpts.K10STF = true;
                            // YarnOpts.K10StockTakeFreqFK = ((TLADM_StockTakeFreq)cmboStockTake.SelectedItem).STF_Pk;
                        }
                    }
                }

                // QueryParms.GradeAwithWarnings = (bool)cbIncludeWarnings.Checked;

                if (!rbBIFSummarised.Checked)
                {
                    frmKnitViewRep vRep = new frmKnitViewRep(24, QueryParms, YarnOpts);
                    int            h    = Screen.PrimaryScreen.WorkingArea.Height;
                    int            w    = Screen.PrimaryScreen.WorkingArea.Width;
                    vRep.ClientSize = new Size(w, h);
                    vRep.ShowDialog(this);
                }
                else
                {
                    frmKnitViewRep vRep = new frmKnitViewRep(30, QueryParms, YarnOpts);
                    int            h    = Screen.PrimaryScreen.WorkingArea.Height;
                    int            w    = Screen.PrimaryScreen.WorkingArea.Width;
                    vRep.ClientSize = new Size(w, h);
                    vRep.ShowDialog(this);
                }

                /*
                 * if (_Version)
                 * {
                 *
                 *
                 * }
                 * else
                 * {
                 *  if (YarnOpts.K10STF || chkBoughtInFabric.Checked) // This is for the SOH Report
                 *  {
                 *      if (!chkBoughtInFabric.Checked || !rbBIFSummarised.Checked)
                 *      {
                 *          frmKnitViewRep vRep = new frmKnitViewRep(24, QueryParms, YarnOpts);
                 *          int h = Screen.PrimaryScreen.WorkingArea.Height;
                 *          int w = Screen.PrimaryScreen.WorkingArea.Width;
                 *          vRep.ClientSize = new Size(w, h);
                 *          vRep.ShowDialog(this);
                 *      }
                 *      else
                 *      {
                 *          frmKnitViewRep vRep = new frmKnitViewRep(30, QueryParms, YarnOpts);
                 *          int h = Screen.PrimaryScreen.WorkingArea.Height;
                 *          int w = Screen.PrimaryScreen.WorkingArea.Width;
                 *          vRep.ClientSize = new Size(w, h);
                 *          vRep.ShowDialog(this);
                 *      }
                 *
                 *  }
                 *  else
                 *  {
                 *
                 *      frmKnitViewRep vRep = new frmKnitViewRep(30, QueryParms);
                 *      int h = Screen.PrimaryScreen.WorkingArea.Height;
                 *      int w = Screen.PrimaryScreen.WorkingArea.Width;
                 *      vRep.ClientSize = new Size(w, h);
                 *      vRep.ShowDialog(this);
                 *  }
                 *
                 * }
                 */

                MandSelected = core.PopulateArray(MandatoryFields.Length, false);

                cmboStockTake.Items.Clear();
                cmboProductGroup.Items.Clear();
                cmboProduct.Items.Clear();
                cmboStore.Items.Clear();
                chkBoughtInFabric.Checked = false;
                rbBIFSummarised.Checked   = true;



                Form_Load(this, null);
            }
        }
Exemplo n.º 10
0
        private void btnReport_Click(object sender, EventArgs e)
        {
            Button oBtn = sender as Button;

            if (oBtn != null)
            {
                YarnReportOptions YarnOpts = new YarnReportOptions();
                if (chkQASummary.Checked)
                {
                    YarnOpts.QASummary = true;
                }

                QueryParms.FromDate = Convert.ToDateTime(dtpFromDate.Value.ToShortDateString());
                QueryParms.ToDate   = Convert.ToDateTime(dtpToDate.Value.ToShortDateString());
                QueryParms.ToDate   = QueryParms.ToDate.AddHours(23.59);

                QueryParms.Grade = txtGrade.Text;

                int index = -1;
                foreach (var element in MandFieldsSelected)
                {
                    ++index;
                    if (element)
                    {
                        if (index == 0)
                        {
                            YarnOpts.K7CustSel = true;
                            //YarnOpts.K7KnittingCustomer_FK = ((TLADM_CustomerFile)cmbKnittingCustomer.SelectedItem).Cust_Pk;
                        }
                        else if (index == 1)
                        {
                            YarnOpts.K7ProdSel = true;
                            //YarnOpts.K7GreigeProduct_FK = ((TLADM_Griege)cmbGreigeProduct.SelectedItem).TLGreige_Id;
                        }
                        else if (index == 2)
                        {
                            YarnOpts.K7MachineSel = true;
                            //YarnOpts.K7Machine_FK = ((TLADM_MachineDefinitions)cmbMachines.SelectedItem).MD_Pk;
                        }
                        else if (index == 3)
                        {
                            YarnOpts.K7OperatorSel = true;
                            //YarnOpts.K7Operator_FK = ((TLADM_MachineOperators)cmbOperator.SelectedItem).MachOp_Pk;
                        }
                        else if (index == 4)
                        {
                            YarnOpts.K7GradeSel = true;
                            YarnOpts.K7Grade    = txtGrade.Text;
                        }
                    }
                }

                if (rbGPByMachine.Checked)
                {
                    YarnOpts.K7rbQA1 = true;
                }
                else if (rbGPByTotal.Checked)
                {
                    YarnOpts.K7rbQA2 = true;
                }
                else if (rbGPOperator.Checked)
                {
                    YarnOpts.K7rbQA3 = true;
                }

                frmKnitViewRep vRep = new frmKnitViewRep(23, QueryParms, YarnOpts);

                int h = Screen.PrimaryScreen.WorkingArea.Height;
                int w = Screen.PrimaryScreen.WorkingArea.Width;
                vRep.ClientSize = new Size(w, h);
                vRep.ShowDialog(this);

                MandFieldsSelected = core.PopulateArray(MandatoryFields.Length, false);
                Form_Load(this, null);
            }
        }
Exemplo n.º 11
0
        private void btnReport_Click(object sender, EventArgs e)
        {
            Button oBtn = sender as Button;

            if (oBtn != null)
            {
                YarnReportOptions YarnOpts = new YarnReportOptions();

                if (chkQASummary.Checked)
                {
                    YarnOpts.QASummary = true;
                }

                //--------------------------------------------------------------------------
                // Do the selection first
                //-----------------------------------------------------------------------

                QueryParms.FromDate = Convert.ToDateTime(dtpFromDate.Value.ToShortDateString());
                QueryParms.ToDate   = Convert.ToDateTime(dtpToDate.Value.ToShortDateString());
                YarnOpts.toDate     = QueryParms.ToDate.AddHours(23.59);
                int index = -1;
                foreach (var element in MandFieldsSelected)
                {
                    ++index;
                    if (element)
                    {
                        if (index == 0)
                        {
                            YarnOpts.K8CustSel = true;
                            //YarnOpts.K8KnittingCustomer_FK = ((TLADM_CustomerFile)cmbKnittingCustomer.SelectedItem).Cust_Pk;
                        }
                        else if (index == 1)
                        {
                            YarnOpts.K8QualSel = true;
                            //YarnOpts.K8GreigeProduct_FK = ((TLADM_Griege)cmbGreigeProduct.SelectedItem).TLGreige_Id;
                        }
                        else if (index == 2)
                        {
                            YarnOpts.K8MachineSel = true;
                            //YarnOpts.K8KnittingMachine_FK = ((TLADM_MachineDefinitions)cmbKnittingMachine.SelectedItem).MD_Pk;
                        }
                        else if (index == 3)
                        {
                            YarnOpts.K8OperatorSel = true;
                            //YarnOpts.K8Operator_Fk = ((TLADM_MachineOperators)cmbOperator.SelectedItem).MachOp_Pk;
                        }
                    }
                }

                //-------------------------------------------------------------------
                // Do The Sort next
                //-----------------------------------------------------------------------

                if (rbQA1.Checked)
                {
                    YarnOpts.K8rbQA1 = true;
                }
                else if (rbQA2.Checked)
                {
                    YarnOpts.K8rbQA2 = true;
                }
                else if (rbQA3.Checked)
                {
                    YarnOpts.K8rbQA3 = true;
                }
                else if (rbQA4.Checked)
                {
                    YarnOpts.K8rbQA4 = true;
                }

                if (rbExcludeCommission.Checked)
                {
                    YarnOpts.ExcludeCommission = true;
                }


                frmKnitViewRep vRep = new frmKnitViewRep(22, QueryParms, YarnOpts);
                int            h    = Screen.PrimaryScreen.WorkingArea.Height;
                int            w    = Screen.PrimaryScreen.WorkingArea.Width;
                vRep.ClientSize = new Size(w, h);
                vRep.ShowDialog(this);

                MandFieldsSelected = core.PopulateArray(MandatoryFields.Length, false);
            }
        }