示例#1
0
 /// <summary>
 /// Expands all parent rows.
 /// </summary>
 /// <param name="row">The row.</param>
 private void ExpandAllParentRows(Infragistics.Win.UltraWinGrid.UltraGridRow row)
 {
     this.ReportListingGrid.ActiveRow = row;
     this.ReportListingGrid.PerformAction(Infragistics.Win.UltraWinGrid.UltraGridAction.ExpandRow, false, false);
     this.ReportListingGrid.DisplayLayout.Rows[row.Index].ExpansionIndicator = Infragistics.Win.UltraWinGrid.ShowExpansionIndicator.Never;
     this.ReportListingGrid.DisplayLayout.RowConnectorStyle = Infragistics.Win.UltraWinGrid.RowConnectorStyle.None;
 }
        private void grd_MouseDown(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Right)
            {
                Point point = new System.Drawing.Point(e.X, e.Y);
                Infragistics.Win.UIElement uiElement = ((Infragistics.Win.UltraWinGrid.UltraGridBase)sender).DisplayLayout.UIElement.ElementFromPoint(point);

                if (uiElement == null || uiElement.Parent == null)
                {
                    return;
                }

                Infragistics.Win.UltraWinGrid.UltraGridRow row = (Infragistics.Win.UltraWinGrid.UltraGridRow)uiElement.GetContext(typeof(Infragistics.Win.UltraWinGrid.UltraGridRow));

                if (row != null)
                {
                    grd.Rows[row.Index].Selected = true;
                    _protocolId = row.Cells["v_ProtocolId"].Value.ToString();
                    cmProtocol.Items["Edit"].Enabled   = true;
                    cmProtocol.Items["Clonar"].Enabled = true;
                }
                else
                {
                    cmProtocol.Items["Edit"].Enabled   = false;
                    cmProtocol.Items["Clonar"].Enabled = false;
                }
            }
        }
示例#3
0
        private void ProcessBRISFiles()
        {
            for (int r = 0; r < ugBRISMeetings.Selected.Rows.Count; r++)
            {
                try
                {
                    Infragistics.Win.UltraWinGrid.UltraGridRow dr = ugBRISMeetings.Selected.Rows[r];
                    DateTime dRaceDate       = DateTime.Parse(dr.Cells["Race Date"].Text);
                    string   coursecode      = dr.Cells["Course Code"].Text.Trim();
                    string   coursecode_bris = "";
                    if (coursecode.Length == 2)
                    {
                        coursecode_bris = coursecode.ToLower() + "x";
                    }
                    else
                    {
                        coursecode_bris = coursecode.ToLower();
                    }

                    Forms.Utility.ProcessBRISFile(dRaceDate, coursecode_bris, coursecode, lvFeedback);
                }
                catch (Exception e2)
                {
                    ExceptionPolicy.HandleException(e2, "Latekick Exception Policy");
                    Utility.SendFeedbackMessage(lvFeedback, "Error: " + e2.Message);
                }
            }
        }
示例#4
0
        private void grdData_MouseDown(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Right)
            {
                Point point = new System.Drawing.Point(e.X, e.Y);
                Infragistics.Win.UIElement uiElement = ((Infragistics.Win.UltraWinGrid.UltraGridBase)sender).DisplayLayout.UIElement.ElementFromPoint(point);

                if (uiElement == null || uiElement.Parent == null)
                {
                    return;
                }

                Infragistics.Win.UltraWinGrid.UltraGridRow row = (Infragistics.Win.UltraWinGrid.UltraGridRow)uiElement.GetContext(typeof(Infragistics.Win.UltraWinGrid.UltraGridRow));

                if (row != null)
                {
                    grdData.Rows[row.Index].Selected = true;
                    _CalendarId = grdData.Rows[row.Index].Cells["v_CalendarId"].Value.ToString();
                    _DocNumber  = grdData.Rows[row.Index].Cells["v_DocNumber"].Value.ToString();
                    _PersonId   = grdData.Rows[row.Index].Cells["v_PersonId"].Value.ToString();
                    if (grdData.Rows[row.Index].Cells["i_CalendarStatusId"].Value.ToString() == ((int)CalendarStatus.Ingreso).ToString())
                    {
                        contextMenuStrip1.Items["mnuGridCancelar"].Enabled = true;
                    }
                    else
                    {
                        contextMenuStrip1.Items["mnuGridCancelar"].Enabled = false;
                    }
                }
                else
                {
                    contextMenuStrip1.Items["mnuGridCancelar"].Enabled = false;
                }
            }
        }
        private void grdData_MouseDown(object sender, MouseEventArgs e)
        {
            Point point = new System.Drawing.Point(e.X, e.Y);

            Infragistics.Win.UIElement uiElement = ((Infragistics.Win.UltraWinGrid.UltraGridBase)sender).DisplayLayout.UIElement.ElementFromPoint(point);

            if (uiElement == null || uiElement.Parent == null)
            {
                return;
            }

            // Capturar valor de una celda especifica al hace click derecho sobre la celda k se quiere su valor
            Infragistics.Win.UltraWinGrid.UltraGridCell cell = (Infragistics.Win.UltraWinGrid.UltraGridCell)uiElement.GetContext(typeof(Infragistics.Win.UltraWinGrid.UltraGridCell));
            Infragistics.Win.UltraWinGrid.UltraGridRow  row  = (Infragistics.Win.UltraWinGrid.UltraGridRow)uiElement.GetContext(typeof(Infragistics.Win.UltraWinGrid.UltraGridRow));

            if (row != null)
            {
                grdData.Rows[row.Index].Selected = true;
                contextMenuGrdData.Items["removerToolStripMenuItem"].Enabled = true;
                _rowIndex = row.Index;
            }
            else
            {
                contextMenuGrdData.Items["removerToolStripMenuItem"].Enabled = false;
            }
        }
        private void grdServiciosAnteriores_MouseDown(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Right)
            {
                Point point = new System.Drawing.Point(e.X, e.Y);
                Infragistics.Win.UIElement uiElement = ((Infragistics.Win.UltraWinGrid.UltraGridBase)sender).DisplayLayout.UIElement.ElementFromPoint(point);

                if (uiElement == null || uiElement.Parent == null)
                {
                    return;
                }

                Infragistics.Win.UltraWinGrid.UltraGridRow row = (Infragistics.Win.UltraWinGrid.UltraGridRow)uiElement.GetContext(typeof(Infragistics.Win.UltraWinGrid.UltraGridRow));

                if (row != null)
                {
                    grdServiciosAnteriores.Rows[row.Index].Selected = true;
                    _serviceIdByWiewServiceHistory = grdServiciosAnteriores.Selected.Rows[0].Cells["v_ServiceId"].Value.ToString();
                    //cmVerServicioAnterior.Items["mnuVerServicio"].Enabled = true;
                }
                else
                {
                    //cmVerServicioAnterior.Items["mnuVerServicio"].Enabled = false;
                }
            }
        }
示例#7
0
        private void grdData_MouseDown(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Right)
            {
                Point point = new System.Drawing.Point(e.X, e.Y);
                Infragistics.Win.UIElement uiElement = ((Infragistics.Win.UltraWinGrid.UltraGridBase)sender).DisplayLayout.UIElement.ElementFromPoint(point);

                if (uiElement == null || uiElement.Parent == null)
                {
                    return;
                }

                Infragistics.Win.UltraWinGrid.UltraGridRow row = (Infragistics.Win.UltraWinGrid.UltraGridRow)uiElement.GetContext(typeof(Infragistics.Win.UltraWinGrid.UltraGridRow));

                if (row != null)
                {
                    grdData.Rows[row.Index].Selected = true;
                    contextMenuStrip1.Items["mnuGridNuevo"].Enabled              = true;
                    contextMenuStrip1.Items["mnuGridModificar"].Enabled          = true;
                    contextMenuStrip1.Items["eliminarToolStripMenuItem"].Enabled = true;
                }
                else
                {
                    contextMenuStrip1.Items["mnuGridNuevo"].Enabled              = true;
                    contextMenuStrip1.Items["mnuGridModificar"].Enabled          = false;
                    contextMenuStrip1.Items["eliminarToolStripMenuItem"].Enabled = false;
                }
            }
        }
示例#8
0
        private void grdDataRecommendation_MouseDown(object sender, MouseEventArgs e)
        {
            Point point = new System.Drawing.Point(e.X, e.Y);

            Infragistics.Win.UIElement uiElement = ((Infragistics.Win.UltraWinGrid.UltraGridBase)sender).DisplayLayout.UIElement.ElementFromPoint(point);

            if (uiElement == null || uiElement.Parent == null)
            {
                return;
            }

            // Capturar valor de una celda especifica al hace click derecho sobre la celda k se quiere su valor
            Infragistics.Win.UltraWinGrid.UltraGridCell cell = (Infragistics.Win.UltraWinGrid.UltraGridCell)uiElement.GetContext(typeof(Infragistics.Win.UltraWinGrid.UltraGridCell));
            Infragistics.Win.UltraWinGrid.UltraGridRow  row  = (Infragistics.Win.UltraWinGrid.UltraGridRow)uiElement.GetContext(typeof(Infragistics.Win.UltraWinGrid.UltraGridRow));

            if (row != null)
            {
                grdDataRecommendation.Rows[row.Index].Selected = true;
                contextMenuRecommendation.Items["mnuRemoveRecommendation"].Enabled = true;
                _rowIndexRecommendation = row.Index;

                if (grdDataRecommendation.Selected.Rows[0].Cells[0].Value != null)
                {
                    _ComponentFieldValuesRecommendationId = grdDataRecommendation.Selected.Rows[0].Cells[0].Value.ToString();
                }
            }
            else
            {
                contextMenuRecommendation.Items["mnuRemoveRecommendation"].Enabled = false;
            }
        }
示例#9
0
        private void btnOneClickBRIS_Click(object sender, EventArgs e)
        {
            this.btnOneClickBRIS.Enabled = false;
            try
            {
                if (cbBRISCredentials.Checked)
                {
                    Latekick.Forms.Properties.Settings.Default["BRISuser"] = tbBRISUser.Text;
                    Latekick.Forms.Properties.Settings.Default["BRISpass"] = tbBRISPass.Text;
                    Latekick.Forms.Properties.Settings.Default.Save();
                }
                DateTime      dRaceDate = (DateTime)uccMeetings.Value;
                DirectoryInfo diBRIS    = new DirectoryInfo(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\LKData" + "\\BRIS\\" + dRaceDate.ToString("ddMMMyyyy"));
                if (ugMeetings.Selected.Rows.Count > 0 && !diBRIS.Exists)
                {
                    diBRIS.Create();
                }

                for (int r = 0; r < ugMeetings.Selected.Rows.Count; r++)
                {
                    Infragistics.Win.UltraWinGrid.UltraGridRow dr = ugMeetings.Selected.Rows[r];
                    string coursecode_bris, coursecode = dr.Cells["Course Code"].Text;
                    if (coursecode.Length == 2)
                    {
                        coursecode_bris = coursecode.ToLower() + "x";
                    }
                    else
                    {
                        coursecode_bris = coursecode.ToLower();
                    }


                    //1. Download
                    WebClient wc = new WebClient();
                    wc.Credentials = new NetworkCredential(tbBRISUser.Text, tbBRISPass.Text);
                    try
                    {
                        wc.DownloadFile(new Uri("https://www.brisnet.com/secure-bin/brisclub/brisrep.cgi/" + coursecode_bris + (dRaceDate.Month < 10 ? "0" : "") + dRaceDate.Month + (dRaceDate.Day < 10 ? "0" : "") + dRaceDate.Day + "n.zip?drm" + coursecode_bris + (dRaceDate.Month < 10 ? "0" : "") + dRaceDate.Month + (dRaceDate.Day < 10 ? "0" : "") + dRaceDate.Day + "n.zip"), diBRIS.FullName + "\\" + coursecode + ".zip");

                        Utility.SendFeedbackMessage(lvFeedback, "Succesfully downloaded file " + coursecode_bris + (dRaceDate.Month < 10 ? "0" : "") + dRaceDate.Month + (dRaceDate.Day < 10 ? "0" : "") + dRaceDate.Day + "n.zip");
                    }
                    catch (Exception e2)
                    {
                        Utility.SendFeedbackMessage(lvFeedback, "Problem while downloading" + coursecode_bris + (dRaceDate.Month < 10 ? "0" : "") + dRaceDate.Month + (dRaceDate.Day < 10 ? "0" : "") + dRaceDate.Day + "n.zip: " + e2.Message);
                        break;
                    }

                    //2. Process
                    Latekick.Forms.Utility.ProcessBRISFile(dRaceDate, coursecode_bris, coursecode, lvFeedback);

                    //3. Open
                    string pdffile = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\LKData" + "\\Latekick\\" + dRaceDate.ToString("ddMMMyyyy") + "\\" + coursecode + "_" + (dRaceDate.Month < 10 ? "0" : "") + dRaceDate.Month + (dRaceDate.Day < 10 ? "0" : "") + dRaceDate.Day + "_bris.pdf";
                    Utility.SendFeedbackMessage(lvFeedback, "Opening " + pdffile);
                    System.Diagnostics.Process.Start(pdffile);
                }
            }
            catch (Exception e2) { Utility.SendFeedbackMessage(lvFeedback, e2.Message); }
            finally { btnOneClickBRIS.Enabled = true; }
        }
示例#10
0
            // 合并相同的单元格
            public bool ShouldCellsBeMerged(Infragistics.Win.UltraWinGrid.UltraGridRow row1, Infragistics.Win.UltraWinGrid.UltraGridRow row2, Infragistics.Win.UltraWinGrid.UltraGridColumn column)
            {
                string process1 = row1.GetCellValue("FS_ZC_BATCHNO") != null?row1.GetCellValue("FS_ZC_BATCHNO").ToString() : "";

                string process2 = row2.GetCellValue("FS_ZC_BATCHNO") != null?row2.GetCellValue("FS_ZC_BATCHNO").ToString() : "";

                return(process1 == process2 && !process1.Equals("轧制编号"));
            }
        private void grdProtocolComponent_MouseDown(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Right)
            {
                Point point = new System.Drawing.Point(e.X, e.Y);
                Infragistics.Win.UIElement uiElement = ((Infragistics.Win.UltraWinGrid.UltraGridBase)sender).DisplayLayout.UIElement.ElementFromPoint(point);

                if (uiElement == null || uiElement.Parent == null)
                {
                    return;
                }

                // Capturar valor de una celda especifica al hace click derecho sobre la celda k se quiere su valor
                Infragistics.Win.UltraWinGrid.UltraGridCell cell = (Infragistics.Win.UltraWinGrid.UltraGridCell)uiElement.GetContext(typeof(Infragistics.Win.UltraWinGrid.UltraGridCell));
                Infragistics.Win.UltraWinGrid.UltraGridRow  row  = (Infragistics.Win.UltraWinGrid.UltraGridRow)uiElement.GetContext(typeof(Infragistics.Win.UltraWinGrid.UltraGridRow));

                if (row != null)
                {
                    _rowIndexPc = row.Index;


                    if (row.Cells["v_ProtocolComponentId"].Value != null)
                    {
                        _protocolComponentId = row.Cells["v_ProtocolComponentId"].Value.ToString();
                    }

                    grdProtocolComponent.Rows[_rowIndexPc].Selected = true;

                    cmProtocol.Items["Edit"].Enabled = true;

                    if (_mode == "Edit")
                    {
                        OperationResult objOperationResult  = new OperationResult();
                        var             isProtocolInService = _protocolBL.IsExistsProtocol(ref objOperationResult, _protocolId);

                        if (isProtocolInService)
                        {
                            cmProtocol.Items["delete"].Enabled = false;
                        }
                        else
                        {
                            cmProtocol.Items["delete"].Enabled = true;
                        }
                    }
                    else
                    {
                        cmProtocol.Items["delete"].Enabled = true;
                    }
                }
                else
                {
                    cmProtocol.Items["delete"].Enabled = false;
                    cmProtocol.Items["Edit"].Enabled   = false;
                }
            }
        }
示例#12
0
        private void SetZatvaranje(Infragistics.Win.UltraWinGrid.UltraGridRow racun, Infragistics.Win.UltraWinGrid.UltraGridRow izvod)
        {
            string idGk1 = client.ExecuteScalar("Select IDGKSTAVKA From GKSTAVKA Where IDPARTNER is Not NULL And BROJDOKUMENTA = " + racun.Cells["Broj"].Value).ToString();

            string idGk2 = client.ExecuteScalar("Select IDGKSTAVKA From GKSTAVKA Where IDPARTNER is NULL And BROJDOKUMENTA = " + racun.Cells["Broj"].Value).ToString();

            client.ExecuteNonQuery("");

            racun.Delete();
            izvod.Delete();
        }
示例#13
0
 public string GetSSCode()
 {
     Infragistics.Win.UltraWinGrid.UltraGridRow row = this.dataGrid.DisplayLayout.ActiveRow;
     if (row != null)
     {
         return(row.Cells[0].Value.ToString());
     }
     else
     {
         return(string.Empty);
     }
 }
        private void grdDataMedicalExam_MouseDown(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Right)
            {
                Point point = new System.Drawing.Point(e.X, e.Y);
                Infragistics.Win.UIElement uiElement = ((Infragistics.Win.UltraWinGrid.UltraGridBase)sender).DisplayLayout.UIElement.ElementFromPoint(point);

                if (uiElement == null || uiElement.Parent == null)
                {
                    return;
                }

                Infragistics.Win.UltraWinGrid.UltraGridRow row = (Infragistics.Win.UltraWinGrid.UltraGridRow)uiElement.GetContext(typeof(Infragistics.Win.UltraWinGrid.UltraGridRow));

                if (row != null)
                {
                    grdDataMedicalExam.Rows[row.Index].Selected = true;
                    contextMenuMedicalExam.Items["verCambiosToolStripMenuItem"].Enabled = true;

                    contextMenuMedicalExam.Items["mnuGridNewMedicalExam"].Enabled    = true;
                    contextMenuMedicalExam.Items["mnuGridEditMedicalExam"].Enabled   = true;
                    contextMenuMedicalExam.Items["mnuGridDeleteMedicalExam"].Enabled = true;
                }
                else
                {
                    contextMenuMedicalExam.Items["verCambiosToolStripMenuItem"].Enabled = true;

                    contextMenuMedicalExam.Items["mnuGridNewMedicalExam"].Enabled    = true;
                    contextMenuMedicalExam.Items["mnuGridEditMedicalExam"].Enabled   = false;
                    contextMenuMedicalExam.Items["mnuGridDeleteMedicalExam"].Enabled = false;
                }
            }
            if (e.Button == MouseButtons.Left)
            {
                Point point = new System.Drawing.Point(e.X, e.Y);
                Infragistics.Win.UIElement uiElement = ((Infragistics.Win.UltraWinGrid.UltraGridBase)sender).DisplayLayout.UIElement.ElementFromPoint(point);

                if (uiElement == null || uiElement.Parent == null)
                {
                    return;
                }

                Infragistics.Win.UltraWinGrid.UltraGridRow row = (Infragistics.Win.UltraWinGrid.UltraGridRow)uiElement.GetContext(typeof(Infragistics.Win.UltraWinGrid.UltraGridRow));

                if (row != null)
                {
                    grdDataMedicalExam.Rows[row.Index].Selected = true;
                    strMedicalExamId = grdDataMedicalExam.Selected.Rows[0].Cells[0].Value.ToString();
                    _ComponentName   = grdDataMedicalExam.Selected.Rows[0].Cells[1].Value.ToString();
                    BindGridMedicalExamFields(strMedicalExamId);
                }
            }
        }
示例#15
0
        private void btnOneClickTrackmaster_Click(object sender, EventArgs e)
        {
            btnOneClickTrackmaster.Enabled = false;
            try
            {
                if (cbTMCredentials.Checked)
                {
                    Latekick.Forms.Properties.Settings.Default["TMuser"] = tbBRISUser.Text;
                    Latekick.Forms.Properties.Settings.Default["TMpass"] = tbBRISPass.Text;
                    Latekick.Forms.Properties.Settings.Default.Save();
                }
                DateTime      dRaceDate     = (DateTime)uccMeetings.Value;
                DirectoryInfo diTrackmaster = new DirectoryInfo(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\LKData" + "\\Trackmaster\\" + dRaceDate.ToString("ddMMMyyyy"));
                if (ugMeetings.Selected.Rows.Count > 0 && !diTrackmaster.Exists)
                {
                    diTrackmaster.Create();
                }

                for (int r = 0; r < ugMeetings.Selected.Rows.Count; r++)
                {
                    Infragistics.Win.UltraWinGrid.UltraGridRow dr = ugMeetings.Selected.Rows[r];
                    string coursecode = dr.Cells["Course Code"].Text;

                    //1. Download
                    //WebClient wc = new WebClient();
                    //wc.Credentials = new NetworkCredential(tbTMUser.Text, tbTMPass.Text);

                    Latekick.BLL.Download.TrackmasterDownloader tdl = new BLL.Download.TrackmasterDownloader(tbTMUser.Text, tbTMPass.Text);
                    try
                    {
                        //wc.DownloadFile(new Uri("http://www.trackmaster.com/nm/tpp_link/download/nm/TM_WEB/" + coursecode.ToLower() + dRaceDate.Year + (dRaceDate.Month < 10 ? "0" : "") + dRaceDate.Month + (dRaceDate.Day < 10 ? "0" : "") + dRaceDate.Day + "ppsxml.zip"), diTrackmaster.FullName + "\\" + coursecode + ".zip");
                        tdl.DownloadRaceCard(dRaceDate, coursecode);
                        Utility.SendFeedbackMessage(lvFeedback, coursecode + dRaceDate.Year + (dRaceDate.Month < 10 ? "0" : "") + dRaceDate.Month + (dRaceDate.Day < 10 ? "0" : "") + dRaceDate.Day + "ppsxml.zip");
                    }
                    catch (Exception e2)
                    {
                        Utility.SendFeedbackMessage(lvFeedback, "Problem while downloading" + coursecode + dRaceDate.Year + (dRaceDate.Month < 10 ? "0" : "") + dRaceDate.Month + (dRaceDate.Day < 10 ? "0" : "") + dRaceDate.Day + "ppsxml.zip: " + e2.Message);
                        break;
                    }

                    //2. Process
                    Latekick.Forms.Utility.ProcessTrackmasterFile(dRaceDate, coursecode, lvFeedback);

                    //3. Open
                    string pdffile = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\LKData" + "\\Latekick\\" + dRaceDate.ToString("ddMMMyyyy") + "\\" + coursecode + "_" + (dRaceDate.Month < 10 ? "0" : "") + dRaceDate.Month + (dRaceDate.Day < 10 ? "0" : "") + dRaceDate.Day + "_trackmaster.pdf";
                    Utility.SendFeedbackMessage(lvFeedback, "Opening " + pdffile);
                    System.Diagnostics.Process.Start(pdffile);
                }
            }
            catch (Exception e2) { Utility.SendFeedbackMessage(lvFeedback, e2.Message); }
            finally { btnOneClickTrackmaster.Enabled = true; }
        }
示例#16
0
        private void btnViewPDF_Click(object sender, EventArgs e)
        {
            for (int r = 0; r < ugMeetings.Selected.Rows.Count; r++)
            {
                Infragistics.Win.UltraWinGrid.UltraGridRow dr = ugMeetings.Selected.Rows[r];
                DateTime dRaceDate  = DateTime.Parse(dr.Cells["Race Date"].Text);
                string   coursecode = dr.Cells["Course Code"].Text;
                string   source     = dr.Cells["Data"].Text;

                string pdffile = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\LKData" + "\\Latekick\\" + dRaceDate.ToString("ddMMMyyyy") + "\\" + coursecode + "_" + (dRaceDate.Month < 10 ? "0" : "") + dRaceDate.Month + (dRaceDate.Day < 10 ? "0" : "") + dRaceDate.Day + (source == "BRIS" ? "_bris" : "_trackmaster") + ".pdf";
                System.Diagnostics.Process.Start(pdffile);
            }
        }
        private void grdDataEPP_MouseDown(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Left)
            {
                Point point = new System.Drawing.Point(e.X, e.Y);
                Infragistics.Win.UIElement uiElement = ((Infragistics.Win.UltraWinGrid.UltraGridBase)sender).DisplayLayout.UIElement.ElementFromPoint(point);

                if (uiElement == null || uiElement.Parent == null)
                {
                    return;
                }

                Infragistics.Win.UltraWinGrid.UltraGridRow row = (Infragistics.Win.UltraWinGrid.UltraGridRow)uiElement.GetContext(typeof(Infragistics.Win.UltraWinGrid.UltraGridRow));

                if (row != null)
                {
                    grdDataEPP.Rows[row.Index].Selected = true;
                    _TypeofEEPId = grdDataEPP.Selected.Rows[0].Cells[0].Value.ToString();
                }
            }
            if (e.Button == MouseButtons.Right)
            {
                Point point = new System.Drawing.Point(e.X, e.Y);
                Infragistics.Win.UIElement uiElement = ((Infragistics.Win.UltraWinGrid.UltraGridBase)sender).DisplayLayout.UIElement.ElementFromPoint(point);

                if (uiElement == null || uiElement.Parent == null)
                {
                    return;
                }

                Infragistics.Win.UltraWinGrid.UltraGridRow row = (Infragistics.Win.UltraWinGrid.UltraGridRow)uiElement.GetContext(typeof(Infragistics.Win.UltraWinGrid.UltraGridRow));

                if (row != null)
                {
                    grdDataEPP.Rows[row.Index].Selected = true;
                    contextMenuTypeEPP.Items["modificarToolStripMenuItem"].Enabled = true;
                    _TypeofEEPName   = grdDataEPP.Selected.Rows[0].Cells[3].Value.ToString();
                    _Percentage      = double.Parse(grdDataEPP.Selected.Rows[0].Cells[4].Value.ToString());
                    _TypeofEEPId     = grdDataEPP.Selected.Rows[0].Cells[0].Value.ToString();
                    _objTypeOfEEPamc = _TempTypeOfEEPList.FindAll(p => p.v_TypeofEEPId == _TypeofEEPId).FirstOrDefault();
                    _IndexListEPP    = _TempTypeOfEEPList.FindIndex(p => p.v_TypeofEEPId == _TypeofEEPId);
                }
                else
                {
                    contextMenuTypeEPP.Items["modificarToolStripMenuItem"].Enabled = false;
                }
            }
        }
        private void grdDataCommponentField_MouseDown(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Left)
            {
                Point point = new System.Drawing.Point(e.X, e.Y);
                Infragistics.Win.UIElement uiElement = ((Infragistics.Win.UltraWinGrid.UltraGridBase)sender).DisplayLayout.UIElement.ElementFromPoint(point);

                if (uiElement == null || uiElement.Parent == null)
                {
                    return;
                }

                Infragistics.Win.UltraWinGrid.UltraGridRow row = (Infragistics.Win.UltraWinGrid.UltraGridRow)uiElement.GetContext(typeof(Infragistics.Win.UltraWinGrid.UltraGridRow));

                if (row != null)
                {
                    btnDeleteCommponent.Enabled = true;
                    grdDataCommponentField.Rows[row.Index].Selected = true;
                    _ComponentFieldId = grdDataCommponentField.Selected.Rows[0].Cells[0].Value.ToString();
                }
            }
            if (e.Button == MouseButtons.Right)
            {
                Point point = new System.Drawing.Point(e.X, e.Y);
                Infragistics.Win.UIElement uiElement = ((Infragistics.Win.UltraWinGrid.UltraGridBase)sender).DisplayLayout.UIElement.ElementFromPoint(point);

                if (uiElement == null || uiElement.Parent == null)
                {
                    return;
                }

                Infragistics.Win.UltraWinGrid.UltraGridRow row = (Infragistics.Win.UltraWinGrid.UltraGridRow)uiElement.GetContext(typeof(Infragistics.Win.UltraWinGrid.UltraGridRow));

                if (row != null)
                {
                    grdDataCommponentField.Rows[row.Index].Selected = true;
                    contextMenuImport.Items["modificarToolStripMenuItem"].Enabled = true;
                    _GroupName             = grdDataCommponentField.Rows[0].Cells[2].Value.ToString();
                    _ComponentFieldId      = grdDataCommponentField.Selected.Rows[0].Cells[0].Value.ToString();
                    _objComponentFieldsamc = _TempComponentFieldsList.FindAll(p => p.v_ComponentId == _ComponentId && p.v_ComponentFieldId == _ComponentFieldId).FirstOrDefault();
                    _IndexList             = _TempComponentFieldsList.FindIndex(p => p.v_ComponentId == _ComponentId && p.v_ComponentFieldId == _ComponentFieldId);
                }
                else
                {
                    contextMenuImport.Items["modificarToolStripMenuItem"].Enabled = false;
                }
            }
        }
示例#19
0
        private void ProcessTrackmasterFiles()
        {
            for (int r = 0; r < ugTrackmasterMeetings.Selected.Rows.Count; r++)
            {
                try
                {
                    Infragistics.Win.UltraWinGrid.UltraGridRow dr = ugTrackmasterMeetings.Selected.Rows[r];
                    DateTime dRaceDate  = DateTime.Parse(dr.Cells["Race Date"].Text);
                    string   coursecode = dr.Cells["Course Code"].Text.Trim();

                    Forms.Utility.ProcessTrackmasterFile(dRaceDate, coursecode, lvFeedback);
                }
                catch (Exception e2)
                {
                    ExceptionPolicy.HandleException(e2, "Latekick Exception Policy");
                    Utility.SendFeedbackMessage(lvFeedback, "Error: " + e2.Message);
                }
            }
        }
示例#20
0
        private void ActivateRowByItem(string item)
        {
//			foreach(Infragistics.Win.UltraWinGrid.UltraGridRow row in this.ultraGridContent.Rows)
            for (int iGridRowLoopIndex = 0; iGridRowLoopIndex < this.ultraGridContent.Rows.Count; iGridRowLoopIndex++)
            {
                Infragistics.Win.UltraWinGrid.UltraGridRow row = this.ultraGridContent.Rows[iGridRowLoopIndex];
                if (row.Cells["ItemCode"].Text == item)
                {
                    if (!row.Activated)
                    {
                        row.Activated = true;
                    }
                }
                else
                {
                    row.Activated = false;
                    row.Selected  = false;
                }
            }
        }
示例#21
0
        private void grdDataMedicalExamFields_MouseDown(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Right)
            {
                Point point = new System.Drawing.Point(e.X, e.Y);
                Infragistics.Win.UIElement uiElement = ((Infragistics.Win.UltraWinGrid.UltraGridBase)sender).DisplayLayout.UIElement.ElementFromPoint(point);

                if (uiElement == null || uiElement.Parent == null)
                {
                    return;
                }

                Infragistics.Win.UltraWinGrid.UltraGridRow row = (Infragistics.Win.UltraWinGrid.UltraGridRow)uiElement.GetContext(typeof(Infragistics.Win.UltraWinGrid.UltraGridRow));

                if (row != null)
                {
                    _RowIndexgrdDataMedicalExamFields = row.Index;
                    grdDataMedicalExamFields.Rows[row.Index].Selected = true;
                    contextMenuMedicalExamFields.Items["mnuGridNewMedicalExamField"].Enabled    = true;
                    contextMenuMedicalExamFields.Items["mnuGridEditMedicalExamField"].Enabled   = true;
                    contextMenuMedicalExamFields.Items["mnuGridDeleteMedicalExamField"].Enabled = true;
                    contextMenuMedicalExamFields.Items["importarToolStripMenuItem"].Enabled     = true;
                }
                else
                {
                    if (grdDataMedicalExam.Selected.Rows.Count != 0)
                    {
                        contextMenuMedicalExamFields.Items["mnuGridNewMedicalExamField"].Enabled = true;
                        contextMenuMedicalExamFields.Items["importarToolStripMenuItem"].Enabled  = true;
                    }
                    else
                    {
                        contextMenuMedicalExamFields.Items["mnuGridNewMedicalExamField"].Enabled = false;
                        contextMenuMedicalExamFields.Items["importarToolStripMenuItem"].Enabled  = false;
                    }

                    contextMenuMedicalExamFields.Items["mnuGridEditMedicalExamField"].Enabled   = false;
                    contextMenuMedicalExamFields.Items["mnuGridDeleteMedicalExamField"].Enabled = false;
                }
            }
        }
        private void grdDataDangers_MouseDown(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Left)
            {
                Point point = new System.Drawing.Point(e.X, e.Y);
                Infragistics.Win.UIElement uiElement = ((Infragistics.Win.UltraWinGrid.UltraGridBase)sender).DisplayLayout.UIElement.ElementFromPoint(point);

                if (uiElement == null || uiElement.Parent == null)
                {
                    return;
                }

                Infragistics.Win.UltraWinGrid.UltraGridRow row = (Infragistics.Win.UltraWinGrid.UltraGridRow)uiElement.GetContext(typeof(Infragistics.Win.UltraWinGrid.UltraGridRow));

                if (row != null)
                {
                    grdDataDangers.Rows[row.Index].Selected = true;
                    _WorkstationDangersId = grdDataDangers.Selected.Rows[0].Cells[0].Value.ToString();
                }
            }
        }
示例#23
0
        private void grdData_MouseDown(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Left)
            {
                Point point = new System.Drawing.Point(e.X, e.Y);
                Infragistics.Win.UIElement uiElement = ((Infragistics.Win.UltraWinGrid.UltraGridBase)sender).DisplayLayout.UIElement.ElementFromPoint(point);

                if (uiElement == null || uiElement.Parent == null)
                {
                    return;
                }

                Infragistics.Win.UltraWinGrid.UltraGridRow row = (Infragistics.Win.UltraWinGrid.UltraGridRow)uiElement.GetContext(typeof(Infragistics.Win.UltraWinGrid.UltraGridRow));

                if (row != null)
                {
                    _strProductId = grdData1.Selected.Rows[0].Cells["v_ProductId"].Value.ToString();
                    BindGridGrdData1andGrdData2(_strProductId);
                }
            }
        }
示例#24
0
        /// <summary>
        /// Deactivates the hyper link.
        /// </summary>
        /// <param name="row">The row.</param>
        private void DeactivateHyperLink(Infragistics.Win.UltraWinGrid.UltraGridRow row, bool isActive)
        {
            // Checks for the isHelp column value,
            // If FORM value is NULL, then there will be NO hyperlink and it will be consider as
            // an Formatted Text Column
            if (isActive)
            {
                //row.Cells[this.form9070ReportListingData.F9070GetReportListing.ReportNumberColumn.ColumnName].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.URL;
                //row.Cells[this.form9070ReportListingData.F9070GetReportListing.ReportNumberColumn.ColumnName].Appearance.FontData.Underline = DefaultableBoolean.True;
                //row.Cells[this.form9070ReportListingData.F9070GetReportListing.ReportNumberColumn.ColumnName].Appearance.Cursor = Cursors.Hand;

                row.Cells[this.form9070ReportListingData.F9070GetReportListing.ReportNumberColumn.ColumnName].EditorControl        = this.ReportFormattedTextEditor;
                row.Cells[this.form9070ReportListingData.F9070GetReportListing.ReportNumberColumn.ColumnName].EditorControl.Cursor = Cursors.Hand;
            }
            else
            {
                row.Cells[this.form9070ReportListingData.F9070GetReportListing.ReportNumberColumn.ColumnName].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.FormattedText;
                row.Cells[this.form9070ReportListingData.F9070GetReportListing.ReportNumberColumn.ColumnName].Appearance.FontData.Underline = DefaultableBoolean.False;
                row.Cells[this.form9070ReportListingData.F9070GetReportListing.ReportNumberColumn.ColumnName].Appearance.Cursor             = Cursors.Default;
            }
        }
示例#25
0
        private void grdDataPeopleAuthoritation_MouseDown(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Left)
            {
                Point point = new System.Drawing.Point(e.X, e.Y);
                Infragistics.Win.UIElement uiElement = ((Infragistics.Win.UltraWinGrid.UltraGridBase)sender).DisplayLayout.UIElement.ElementFromPoint(point);

                if (uiElement == null || uiElement.Parent == null)
                {
                    return;
                }

                Infragistics.Win.UltraWinGrid.UltraGridRow row = (Infragistics.Win.UltraWinGrid.UltraGridRow)uiElement.GetContext(typeof(Infragistics.Win.UltraWinGrid.UltraGridRow));

                if (row != null)
                {
                    grdDataPeopleAuthoritation.Rows[row.Index].Selected = true;
                    _AuthorizedPersonId = grdDataPeopleAuthoritation.Rows[row.Index].Cells["v_AuthorizedPersonId"].Value.ToString();

                    if (grdDataPeopleAuthoritation.Rows[row.Index].Cells["d_EntryToMedicalCenter"].Value != null)
                    {
                        //contextMenuStrip1.Items["mnuGridCancelar"].Enabled = true;
                        btnCancelPersonAuthoritation.Enabled = true;
                    }
                    else
                    {
                        //contextMenuStrip1.Items["mnuGridCancelar"].Enabled = false;
                        btnCancelPersonAuthoritation.Enabled = false;
                    }
                }
                else
                {
                    //contextMenuStrip1.Items["mnuGridCancelar"].Enabled = false;
                    btnCancelPersonAuthoritation.Enabled = false;
                }
            }
        }
示例#26
0
        private void grdDataUserExternal_MouseDown(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Left)
            {
                Point point = new System.Drawing.Point(e.X, e.Y);
                Infragistics.Win.UIElement uiElement = ((Infragistics.Win.UltraWinGrid.UltraGridBase)sender).DisplayLayout.UIElement.ElementFromPoint(point);

                if (uiElement == null || uiElement.Parent == null)
                {
                    return;
                }

                Infragistics.Win.UltraWinGrid.UltraGridRow row = (Infragistics.Win.UltraWinGrid.UltraGridRow)uiElement.GetContext(typeof(Infragistics.Win.UltraWinGrid.UltraGridRow));

                if (row != null)
                {
                    btnDelete.Enabled = true;
                }
                else
                {
                    btnDelete.Enabled = false;
                }
            }
        }
示例#27
0
        private void listaMouseUp(object sender, MouseEventArgs e)
        {
            try
            {
                _pagamentoClick = null;
                if (e.Button == MouseButtons.Right && lista != null)
                {
                    _rowClick = DataGridHelper.GetCellEvent(lista, e);
                    if (_rowClick != null)
                    {
                        var idPagamento = DataGridHelper.GetCellEvent<PagamentoSpesaDTO>(lista, e).ID;
                        _pagamentoClick = getPagamentoFatturaService().GetById(idPagamento);
                        if (_pagamentoClick != null)
                            contextMenuStrip1.Show(lista, e.X, e.Y);
                    }
                }
            }
            catch (Exception ex)
            {
                _log.ErrorFormat("Errore nel click con il bottone dx - {0} - azienda:{1}", ex, Gipasoft.Library.Utility.GetMethodDescription(), Security.Login.Instance.CurrentLogin().Azienda);
            }

        }
示例#28
0
 private void listaMouseUp(object sender, MouseEventArgs e)
 {
     _subentroService = null;
     if (e.Button == MouseButtons.Right)
     {
         _rowClick = DataGridHelper.GetRowEvent(lista, e);
         if (_rowClick != null && _rowClick.ListObject is SubentroDTO)
             contextMenuStrip1.Show(lista, e.X, e.Y);
     }
 }
示例#29
0
 private void listaMouseUp(object sender, MouseEventArgs e)
 {
     _pagamentoClick = null;
     if (e.Button == MouseButtons.Right)
     {
         _rowClick = DataGridHelper.GetCellEvent(listaPagamenti, e);
         _pagamentoClick = DataGridHelper.GetCellEvent<PagamentoDTO>(listaPagamenti, e);
         if (_pagamentoClick != null)
             contextMenuStrip1.Show(listaPagamenti, e.X, e.Y);
     }
 }
示例#30
0
        public void PrintDialogRm(string operation, Infragistics.Win.UltraWinGrid.UltraGridRow uRow, DataTable dt)
        {
            var xtreport = new XtraReport();
            // _btApp = new BarTender.Application();
            //判断当前打印模版路径是否存在
            //var _RmcTempletFileName = Application.StartupPath + @"\Label\班次制令单.repx";
            var temPath = _RmcTempletFileName;     //_cTempletFileName;      //Application.StartupPath + @"\Label\" +   _cTempletFileName;

            if (!File.Exists(temPath))
            {
                MessageBox.Show(@"当前路径下的打印模版文件不存在!", @"异常", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                xtreport.ShowDesigner();
                return;
            }
            xtreport.LoadLayout(temPath);
            xtreport.PrinterName             = _cPrinter;
            xtreport.RequestParameters       = false;
            xtreport.ShowPrintStatusDialog   = false;
            xtreport.ShowPrintMarginsWarning = false;

            var cFitemID      = uRow.Cells["cFitemID"].Value.ToString();
            var cLotNo        = uRow.Cells["FBatchNo"].Value.ToString();
            var cDefine2      = dt.Rows[0]["cDefine2"].ToString();
            var cSerialNumber = dt.Rows[0]["cSerialNumber"].ToString();
            var cInvCode      = dt.Rows[0]["cInvCode"].ToString();
            var cInvName      = dt.Rows[0]["cInvName"].ToString();
            var dDate         = dt.Rows[0]["dDate"].ToString();
            var cInvStd       = dt.Rows[0]["cInvStd"].ToString();
            var cFullName     = dt.Rows[0]["cFullName"].ToString();
            var iQuantity     = uRow.Cells["iQuantity"].Value.ToString();
            var cMemo         = dt.Rows[0]["cMemo"].ToString();
            var cDefine1      = dt.Rows[0]["cDefine1"].ToString();

            //模板赋值
            DllWorkPrintLabel.SetParametersValue(xtreport, "cSerialNumber", lblTitleMain.lblcSerialNumber.Text);
            DllWorkPrintLabel.SetParametersValue(xtreport, "cBarCode", "R*" + cFitemID + "*L*" + cLotNo + "*S*" + cSerialNumber + ";" + cDefine2);
            DllWorkPrintLabel.SetParametersValue(xtreport, "cInvCode", cInvCode);
            DllWorkPrintLabel.SetParametersValue(xtreport, "cInvName", cInvName);
            DllWorkPrintLabel.SetParametersValue(xtreport, "dDate", dDate);
            DllWorkPrintLabel.SetParametersValue(xtreport, "cInvStd", cInvStd);
            DllWorkPrintLabel.SetParametersValue(xtreport, "cFullName", txtcFullName.Text);
            DllWorkPrintLabel.SetParametersValue(xtreport, "cVendor", cFullName);
            DllWorkPrintLabel.SetParametersValue(xtreport, "cLotNo", cLotNo);
            DllWorkPrintLabel.SetParametersValue(xtreport, "iQuantity", iQuantity);
            DllWorkPrintLabel.SetParametersValue(xtreport, "cMemo", cMemo);
            DllWorkPrintLabel.SetParametersValue(xtreport, "cDefine1", cDefine1);
            if (dtpdDate.Checked)
            {
                DllWorkPrintLabel.SetParametersValue(xtreport, "cVendorDate", dtpdDate.Value);
            }
            //模板赋值
            switch (operation)
            {
            case "print":
                xtreport.Print();
                break;

            case "design":
                xtreport.ShowDesigner();
                break;

            case "preview":
                xtreport.ShowPreview();
                break;
            }
        }