当前位置: 首页>>代码示例>>C#>>正文


C# Janus类代码示例

本文整理汇总了C#中Janus的典型用法代码示例。如果您正苦于以下问题:C# Janus类的具体用法?C# Janus怎么用?C# Janus使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Janus类属于命名空间,在下文中一共展示了Janus类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: EnviarAUiCommandManager_CommandClick

 private void EnviarAUiCommandManager_CommandClick(object sender, Janus.Windows.UI.CommandBars.CommandEventArgs e)
 {
     switch (e.Command.Key)
     {
         case "Impresora":
             Cedeira.SV.Fun.ImprimirGrilla(this, ListaGridEX, Aplicacion.Titulo, true);
             break;
         case "Planilla":
             try
             {
                 Cedeira.SV.Export planilla = new Cedeira.SV.Export();
                 Cursor = Cursors.WaitCursor;
                 planilla.ExportDetails(ListaGridEX, Cedeira.SV.Export.ExportFormat.Excel, this.Text + DateTime.Now.ToString("yyyyMMddhhmmss") + ".xls");
             }
             catch (Exception ex)
             {
                 Microsoft.ApplicationBlocks.ExceptionManagement.ExceptionManager.Publish(ex);
             }
             finally
             {
                 Cursor = Cursors.Default;
             }
             break;
     }
 }
开发者ID:pjeconde,项目名称:CedForecast,代码行数:25,代码来源:OrdenCompraAltaForm.cs

示例2: buttonCommand1_Click

 private void buttonCommand1_Click(object sender, Janus.Windows.Ribbon.CommandEventArgs e)
 {
     if (panel1.Size.Height == 23)
         panel1.Size = new Size(panel1.Size.Width, 100);
     else
         panel1.Size = new Size(panel1.Size.Width, 23);
 }
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:7,代码来源:ViewTab.cs

示例3: ExportGridEx

 public static void ExportGridEx(Janus.Windows.GridEX.GridEX gridEx )
 {
     Stream sw = null;
     try
     {
         var sd = new SaveFileDialog { Filter = "Excel File (*.xml)|*.xml" };
         if (sd.ShowDialog() == DialogResult.OK)
         {
             //sw = new FileStream(sd.FileName, FileMode.OpenOrCreate, FileAccess.ReadWrite);
             sw = new FileStream(sd.FileName, FileMode.Create);
             GridEXExporter grdListExporter = new GridEXExporter();
             grdListExporter.IncludeExcelProcessingInstruction = true;
             grdListExporter.IncludeFormatStyle = true;
             grdListExporter.IncludeHeaders = true;
             grdListExporter.GridEX = gridEx;
             grdListExporter.Export(sw);
             Utility.ShowMsg("Xuất dữ liệu thành công");
         }
     }
     catch (Exception ex)
     {
         Utility.ShowMsg(ex.Message);
     }
     finally
     {
         if (sw != null)
         {
             sw.Flush();
             sw.Close();
             sw.Dispose();
         }
     }
 }
开发者ID:khaha2210,项目名称:CodeNewTeam,代码行数:33,代码来源:ExcelReport.cs

示例4: grdVTTH_CellUpdated

        void grdVTTH_CellUpdated(object sender, Janus.Windows.GridEX.ColumnActionEventArgs e)
        {
            try
            {
                decimal BHYT_PTRAM_TRAITUYENNOITRU = Utility.DecimaltoDbnull(THU_VIEN_CHUNG.Laygiatrithamsohethong("BHYT_PTRAM_TRAITUYENNOITRU", "0", false), 0m);
                new Update(KcbDonthuocChitiet.Schema).Set(KcbDonthuocChitiet.Columns.SoLuong).EqualTo(Utility.Int32Dbnull(Utility.getValueOfGridCell(grdVTTH, KcbDonthuocChitiet.Columns.SoLuong)))
                    .Where(KcbDonthuocChitiet.Columns.IdChitietdonthuoc).IsEqualTo(Utility.Int32Dbnull(Utility.getValueOfGridCell(grdVTTH, KcbDonthuocChitiet.Columns.IdChitietdonthuoc))).Execute();
                DataRow row = ((DataRowView)grdVTTH.CurrentRow.DataRow).Row;

                //    if (!Utility.Byte2Bool(row[KcbDonthuocChitiet.Columns.TuTuc]))
                //    {
                //        decimal BHCT = 0m;
                //        if (objLuotkham.TrangthaiNoitru <= 0)
                //            BHCT = Utility.DecimaltoDbnull(row[KcbDonthuocChitiet.Columns.DonGia], 0) * (Utility.DecimaltoDbnull(objLuotkham.PtramBhyt, 0) / 100);
                //        else//Nội trú cần tính=đơn giá * % đầu thẻ * % tuyến
                //            BHCT = Utility.DecimaltoDbnull(row[KcbDonthuocChitiet.Columns.DonGia], 0) * (Utility.DecimaltoDbnull(objLuotkham.PtramBhytGoc, 0) / 100) * (BHYT_PTRAM_TRAITUYENNOITRU / 100);

                //        //decimal num2 = (Utility.DecimaltoDbnull(row[KcbDonthuocChitiet.Columns.DonGia], 0) * Utility.DecimaltoDbnull(this.objLuotkham.PtramBhyt, 0)) / 100M;
                //        decimal num3 = Utility.DecimaltoDbnull(row[KcbDonthuocChitiet.Columns.DonGia], 0) - BHCT;
                //        row[KcbDonthuocChitiet.Columns.BhytChitra] = BHCT;
                //        row[KcbDonthuocChitiet.Columns.BnhanChitra] = num3;

                //    }
                //    else
                //    {
                //        row[KcbDonthuocChitiet.Columns.PtramBhyt] = 0;

                //        row[KcbDonthuocChitiet.Columns.BhytChitra] = 0;
                //        row[KcbDonthuocChitiet.Columns.BnhanChitra] = Utility.DecimaltoDbnull(row[KcbDonthuocChitiet.Columns.DonGia], 0);
                //    }

                //row["TT_KHONG_PHUTHU"] = Utility.Int32Dbnull(row[KcbDonthuocChitiet.Columns.SoLuong]) * Utility.DecimaltoDbnull(row[KcbDonthuocChitiet.Columns.DonGia]);
                //row["TT"] = Utility.Int32Dbnull(row[KcbDonthuocChitiet.Columns.SoLuong]) * (Utility.DecimaltoDbnull(row[KcbDonthuocChitiet.Columns.DonGia]) + Utility.DecimaltoDbnull(row[KcbDonthuocChitiet.Columns.PhuThu]));
                //row["TT_BHYT"] = Utility.Int32Dbnull(row[KcbDonthuocChitiet.Columns.SoLuong]) * Utility.DecimaltoDbnull(row[KcbDonthuocChitiet.Columns.BhytChitra]);
                //row["TT_BN"] = Utility.Int32Dbnull(row[KcbDonthuocChitiet.Columns.SoLuong]) * (Utility.DecimaltoDbnull(row[KcbDonthuocChitiet.Columns.BnhanChitra], 0) + Utility.DecimaltoDbnull(row[KcbDonthuocChitiet.Columns.PhuThu], 0));
                //row["TT_PHUTHU"] = Utility.Int32Dbnull(row[KcbDonthuocChitiet.Columns.SoLuong]) * Utility.DecimaltoDbnull(row[KcbDonthuocChitiet.Columns.PhuThu], 0);
                //row["TT_BN_KHONG_PHUTHU"] = Utility.Int32Dbnull(row[KcbDonthuocChitiet.Columns.SoLuong]) * Utility.DecimaltoDbnull(row[KcbDonthuocChitiet.Columns.BnhanChitra], 0);
                if (Utility.Byte2Bool(row[KcbDonthuocChitiet.Columns.TrongGoi]))
                {
                    row[KcbDonthuocChitiet.Columns.DonGia] = 0;
                    row[KcbDonthuocChitiet.Columns.BnhanChitra] = 0;
                    row[KcbDonthuocChitiet.Columns.BhytChitra] = 0;
                    row[KcbDonthuocChitiet.Columns.PhuThu] = 0;
                    row["TT_KHONG_PHUTHU"] = Utility.Int32Dbnull(row[KcbDonthuocChitiet.Columns.SoLuong]) * Utility.DecimaltoDbnull(row[KcbDonthuocChitiet.Columns.DonGia]);
                    row["TT"] = Utility.Int32Dbnull(row[KcbDonthuocChitiet.Columns.SoLuong]) * (Utility.DecimaltoDbnull(row[KcbDonthuocChitiet.Columns.DonGia]) + Utility.DecimaltoDbnull(row[KcbDonthuocChitiet.Columns.PhuThu]));
                    row["TT_BHYT"] = Utility.Int32Dbnull(row[KcbDonthuocChitiet.Columns.SoLuong]) * Utility.DecimaltoDbnull(row[KcbDonthuocChitiet.Columns.BhytChitra]);
                    row["TT_BN"] = Utility.Int32Dbnull(row[KcbDonthuocChitiet.Columns.SoLuong]) * (Utility.DecimaltoDbnull(row[KcbDonthuocChitiet.Columns.BnhanChitra], 0) + Utility.DecimaltoDbnull(row[KcbDonthuocChitiet.Columns.PhuThu], 0));
                    row["TT_PHUTHU"] = Utility.Int32Dbnull(row[KcbDonthuocChitiet.Columns.SoLuong]) * Utility.DecimaltoDbnull(row[KcbDonthuocChitiet.Columns.PhuThu], 0);
                    row["TT_BN_KHONG_PHUTHU"] = Utility.Int32Dbnull(row[KcbDonthuocChitiet.Columns.SoLuong]) * Utility.DecimaltoDbnull(row[KcbDonthuocChitiet.Columns.BnhanChitra], 0);
                }
                m_dtVTTH.AcceptChanges();
                m_blnCancel = false;
            }
            catch (Exception ex)
            {
                Utility.SetMsg(lblMsg, ex.Message, true);

            }
        }
开发者ID:khaha2210,项目名称:CodeNewHis,代码行数:59,代码来源:frm_chuyenVTTHvaotronggoiDV.cs

示例5: SetConditionColumns

 private static void SetConditionColumns(ConditionSerializationContext context, GridEXFilterConditionCollection conditions, Janus.Windows.GridEX.GridEX grid)
 {
     if (conditions != null)
     {
         Logger.Log.DebugFormat("conditions={0}", conditions.Count);
         foreach (GridEXFilterCondition condition in conditions)
         {
             ColumnInfo key = context.NextColumnKey();
             if (key != null)
             {
                 condition.Column = grid.Tables[key.TableKey].Columns[key.ColumnKey];
                 SetConditionColumns(context, condition.Conditions, grid);
             }
         }
     }
 }
开发者ID:tgmayfield,项目名称:svn-monitor,代码行数:16,代码来源:ConditionSerializer.cs

示例6: grdListDrug_CellValueChanged

        private void grdListDrug_CellValueChanged(object sender, Janus.Windows.GridEX.ColumnActionEventArgs e)
        {
            try
            {
                if (!AllowedChanged) return;
                if (Utility.isValidGrid(grdListDrug))
                {
                    RowIndex = 1;
                    _OnCellValueChanged(Utility.sDbnull(grdListDrug.GetValue("ten_thuoc"), ""), Utility.Int32Dbnull(grdListDrug.CurrentRow.Cells["id_thuockho"].Value, -1), Utility.sDbnull(grdListDrug.GetValue("gia_ban"), "0"), Utility.sDbnull(grdListDrug.GetValue("ten_donvitinh"), "0"));

                }
            }
            catch (Exception ex)
            {
                Utility.CatchException("_CellValueChanged Error", ex);
            }
        }
开发者ID:khaha2210,项目名称:VXIS,代码行数:17,代码来源:ucGrid.cs

示例7: ExportDetails

 public void ExportDetails(Janus.Windows.GridEX.GridEX Grilla, ExportFormat FormatType, string FileName)
 {
     System.Diagnostics.Process loProcess = System.Diagnostics.Process.GetCurrentProcess();
     loProcess.MaxWorkingSet = (IntPtr)10000000;
     loProcess.MinWorkingSet = (IntPtr)5000000;
     try
     {
         DataSet dsExport = Cedeira.SV.Fun.GetDataSetFromJanusGridEx(Grilla, FileName);
         dsExport.DataSetName = "Export";
         dsExport.Tables[0].TableName = "Values";
         string[] sHeaders = new string[dsExport.Tables[0].Columns.Count];
         string[] sFileds = new string[dsExport.Tables[0].Columns.Count];
         for (int i = 0; i < dsExport.Tables[0].Columns.Count; i++)
         {
             dsExport.Tables[0].Columns[i].ColumnName = Convert.ToString(i);
         }
         for (int i = 0; i < dsExport.Tables[0].Columns.Count; i++)
         {
             sHeaders[i] = ReemplazarEspaciosyAcentos(dsExport.Tables[0].Columns[i].Caption);
             dsExport.Tables[0].Columns[i].ColumnName = sHeaders[i];
             sFileds[i] = sHeaders[i];
         }
         for (int l = 0; l < dsExport.Tables[0].Rows.Count; l++)
         {
             for (int i = 0; i < dsExport.Tables[0].Columns.Count; i++)
             {
                 string aux = ReemplazarXPath(Convert.ToString(dsExport.Tables[0].Rows[l].ItemArray[i]));
                 dsExport.Tables[0].Rows[l][i] = aux;
                 dsExport.Tables[0].Rows[l].AcceptChanges();
             }
         }
         string dir = System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal) + "\\CedForecast\\";
         if (!System.IO.Directory.Exists(dir))
         {
             System.IO.Directory.CreateDirectory(dir);
         }
         FileName = dir + ReemplazarCaracteresMalos(FileName);
         Export_with_XSLT_Windows(dsExport, sHeaders, sFileds, FormatType, FileName);
         System.Diagnostics.Process.Start(FileName);
     }
     catch (Exception Ex)
     {
         throw Ex;
     }
 }
开发者ID:pjeconde,项目名称:CedForecast,代码行数:45,代码来源:Export.cs

示例8: grdDocuments_RowDoubleClick

        private void grdDocuments_RowDoubleClick(object sender, Janus.Windows.GridEX.RowActionEventArgs e)
        {
            var document = grdDocuments.GetRow().DataRow as Document;

            using (var sfd = new SaveFileDialog())
            {

                sfd.FileName = document.Name;

                sfd.ShowDialog();

                var cursor = this.Cursor;
                this.Cursor = Cursors.WaitCursor;
                _portalService.DownloadDocument(document, sfd.FileName);
                this.Cursor = cursor;

            }
        }
开发者ID:joncoello,项目名称:CSExample,代码行数:18,代码来源:frmPortalIntegration.cs

示例9: grdList_UpdatingCell

        void grdList_UpdatingCell(object sender, Janus.Windows.GridEX.UpdatingCellEventArgs e)
        {
            try
            {
                if (e.Column.Key == SysSystemParameter.Columns.SValue)
                {
                    int id = Utility.Int32Dbnull(grdList.CurrentRow.Cells[SysSystemParameter.Columns.Id].Value);
                    new Update(SysSystemParameter.Schema)
                        .Set(SysSystemParameter.Columns.SValue).EqualTo(e.Value)
                        .Where(SysSystemParameter.Columns.Id).IsEqualTo(id)
                        .Execute();

                }
            }
            catch (Exception ex)
            {

                Utility.CatchException(ex);
            }
        }
开发者ID:khaha2210,项目名称:CodeNewHis,代码行数:20,代码来源:frm_Sysparams.cs

示例10: gridEX1_InitCustomEdit

        private void gridEX1_InitCustomEdit(object sender, Janus.Windows.GridEX.InitCustomEditEventArgs e)
        {
            //For the sample, we will use BackColor Yellow in the textbox
            //if the cell is in a new row
            if (e.Row.RowType == RowType.NewRecord)
            {
                txtCustom.BackColor = Color.Yellow;
            }
            else
            {
                txtCustom.BackColor = e.FormatStyle.BackColor;
            }

            //When the user start edition by pressing a key,
            //the EditChar property holds the char that
            //started the edition. If edition was started
            //because the user clicked in the cell the
            //EditChar returns (char)0
            if (Char.IsLetterOrDigit(e.EditChar))
            {
                txtCustom.Text = e.EditChar.ToString();
                txtCustom.SelectionStart = txtCustom.Text.Length;
            }
            else
            {
                if (e.Value == null)
                {
                    txtCustom.Text = "";
                }
                else
                {
                    txtCustom.Text = e.Value.ToString();
                }
                txtCustom.SelectionLength = txtCustom.Text.Length;
            }
            //Set the EditControl property to let the GridEX control
            //know which control to position in the cell.
            e.EditControl = txtCustom;
        }
开发者ID:opherg,项目名称:Janus-GridEx-Tutorials,代码行数:39,代码来源:Form1.cs

示例11: GridEX1_LoadingRow

        private void GridEX1_LoadingRow(object sender, Janus.Windows.GridEX.RowLoadEventArgs e)
        {
            if (e.Row.RowType == RowType.Record)
            {
                decimal result = 0;

                //You can get the values directly from the GridEXRow object
                short quantity = (short)e.Row.Cells["Quantity"].Value;
                decimal unitPrice = (decimal)e.Row.Cells["UnitPrice"].Value;
                float discount = (float)e.Row.Cells["Discount"].Value;
                result = Convert.ToDecimal(quantity) * unitPrice * Convert.ToDecimal(1 - discount);

                /*
                //or you can get the values from the Order_DetailsRow this GridEXRow represents.
                System.Data.DataRowView rowView = (System.Data.DataRowView)e.Row.DataRow;
                NorthWind.Order_DetailsRow detail = (NorthWind.Order_DetailsRow)rowView.Row;

                result = Convert.ToDecimal(detail.Quantity) * detail.UnitPrice * Convert.ToDecimal(((float)1-detail.Discount));
                */
                e.Row.Cells["Total"].Value = result;
            }
        }
开发者ID:opherg,项目名称:Janus-GridEx-Tutorials,代码行数:22,代码来源:Form1.cs

示例12: gridEX1_LinkClicked

        private void gridEX1_LinkClicked(object sender, Janus.Windows.GridEX.ColumnActionEventArgs e)
        {
            //MessageBox.Show(sender.ToString());
            frmMain frm = (frmMain)this.ParentForm;

            int hid = int.Parse(this.gridEX1.CurrentRow.Cells[0].Value.ToString());
            int yid = int.Parse(this.gridEX1.CurrentRow.Cells[3].Value.ToString());

            frm.cboHospital.ComboBox.SelectedValue=hid;
            frm.cboYear.ComboBox.SelectedValue=yid;
            if (e.Column.Caption == "主观评分")
            {
                foreach (Form frmTemp in frm.MdiChildren)
                {
                    if (frmTemp.Name == "frmObjectEval" && MessageBox.Show(this, "主观评分窗口当前已打开,要重新载入数据吗?\n\r重新载入可能丢失您当前尚未保存的数据,建议手工保存后再执行此操作。", Application.ProductName, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                    {
                        frmTemp.Dispose();
                    }
                }
                frmObjectEval frmObjectEval = new frmObjectEval();
                frmObjectEval.MdiParent = frm;
                frmObjectEval.Show();
            }
            else
            {
                foreach (Form frmTemp in frm.MdiChildren)
                {
                    if (frmTemp.Name == "frmSubjectEval" && MessageBox.Show(this, "客观评分窗口当前已打开,要重新载入数据吗?\n\r重新载入可能丢失您当前尚未保存的数据,建议手工保存后再执行此操作。", Application.ProductName, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                    {
                        frmTemp.Dispose();
                    }
                }
                frmSubjectEval frmSubjectEval = new frmSubjectEval();
                frmSubjectEval.MdiParent = frm;
                frmSubjectEval.Show();

            }
        }
开发者ID:rzhh1212,项目名称:hpes,代码行数:38,代码来源:frmEvalSummary.cs

示例13: stopClicked

 private void stopClicked(object sender, Janus.Windows.Ribbon.CommandEventArgs e)
 {
     detach = false;
     StopDebuggee();
 }
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:5,代码来源:NuGenInSightMainForm.cs

示例14: stepOutClicked

 private void stepOutClicked(object sender, Janus.Windows.Ribbon.CommandEventArgs e)
 {
     if (NuGenDebugEventHandler.Instance.State == DebuggerState.DebuggeeStopped)
     {
         ilEditor1.SetBreakpointOnFirstInstruction();
     }
     else
     {
         NuGenBreakpointHandler.Instance.Step(StepType.StepOut);
     }
 }
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:11,代码来源:NuGenInSightMainForm.cs

示例15: detachClick

 private void detachClick(object sender, Janus.Windows.Ribbon.CommandEventArgs e)
 {
     detach = true;
     NuGenDebugEventHandler.Instance.Detach();
 }
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:5,代码来源:NuGenInSightMainForm.cs


注:本文中的Janus类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。