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


C# DevExpress.GetDataRow方法代码示例

本文整理汇总了C#中DevExpress.GetDataRow方法的典型用法代码示例。如果您正苦于以下问题:C# DevExpress.GetDataRow方法的具体用法?C# DevExpress.GetDataRow怎么用?C# DevExpress.GetDataRow使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DevExpress的用法示例。


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

示例1: DeleteSelectedRows

        public void DeleteSelectedRows(DevExpress.XtraGrid.Views.Grid.GridView view)
        {
            if (view == null || view.SelectedRowsCount == 0) return;

            DataRow[] rows = new DataRow[view.SelectedRowsCount];

            for (int i = 0; i < view.SelectedRowsCount; i++)
                rows[i] = view.GetDataRow(view.GetSelectedRows()[i]);

            view.BeginSort();

            try
            {
                foreach (DataRow row in rows)
                    row.Delete();
            }
            finally
            {
                view.EndSort();
            }
        }
开发者ID:tofupl,项目名称:Csharp,代码行数:21,代码来源:ws.cs

示例2: UpData

 private static byte[] UpData(DevExpress.XtraGrid.Views.BandedGrid.AdvBandedGridView view)
 {
     string path = null;
     OpenFileDialog openFile = new OpenFileDialog();
     openFile.Title = "Chọn file để cập nhật tài liệu:";
     DialogResult value = openFile.ShowDialog();
     if (value == DialogResult.OK)
     {
         path = openFile.FileName;
         //Kiểm tra độ lớn của file
         if (!HelpFile.CheckFileSize(path, 20))
         {
             //Độ lớn của file lớn hơn độ lớn qui định
             HelpMsgBox.ShowNotificationMessage("Bạn không được chọn file lớn hơn 20 MB.");
             path = null;
             UpData(view);
         }
     }
     else if (value == DialogResult.Cancel)
     {
         path = null;
         return null;
     }
     if (path != null)
     {
         byte[] bytes = null;
         bytes = HelpFile.FileToBytes(path);
         DataRow row = view.GetDataRow(view.FocusedRowHandle);
         if (row == null) HelpMsgBox.ShowNotificationMessage("Bạn chưa chọn nhân sự, vui lòng vào thông tin nhân sự!");
         else
         {
             row["TEN_TAI_LIEU"] = Path.GetFileName(path);
             row["NGAY_NOP"] = DateTime.Now;
             return bytes;
         }
     }
     return null;
 }
开发者ID:khanhdtn,项目名称:my-office-manager,代码行数:38,代码来源:DAQuanLyThucHienNopBai.cs

示例3: focus_new_row_created

        private void focus_new_row_created(DevExpress.XtraGrid.Views.Grid.GridView ip_grv)
        {
            int v_row_index = 0;
            decimal v_id_gd_hd_f340 = 0;
            string v_da_xoa_f340 = "N";
            v_id_gd_hd_f340 = find_id_hd(CIPConvert.ToDecimal(m_sle_chon_nhan_vien.EditValue));

            if (ip_grv == m_grv_hs_lns)
            {
                US_V_F340_DAT_HS_LNS v_us = new US_V_F340_DAT_HS_LNS();
                DS_V_F340_DAT_HS_LNS v_ds = new DS_V_F340_DAT_HS_LNS();

                v_us.FillDataset(v_ds);

                for (v_row_index = 0; v_row_index < v_ds.Tables[0].Rows.Count; v_row_index++)
                {
                    var v_id_gd_hd = CIPConvert.ToDecimal(ip_grv.GetDataRow(v_row_index)["ID_HOP_DONG"].ToString());
                    var v_da_xoa = ip_grv.GetDataRow(v_row_index)["DA_XOA_LNS"].ToString();

                    if (v_id_gd_hd == v_id_gd_hd_f340 && v_da_xoa == v_da_xoa_f340)
                    {
                        break;
                    }
                }
                ip_grv.FocusedRowHandle = v_row_index;
            }
            else if (ip_grv == m_grv_lcd)
            {
                US_V_F340_DAT_LCD v_us = new US_V_F340_DAT_LCD();
                DS_V_F340_DAT_LCD v_ds = new DS_V_F340_DAT_LCD();

                v_us.FillDataset(v_ds);

                for (v_row_index = 0; v_row_index < v_ds.Tables[0].Rows.Count; v_row_index++)
                {
                    var v_id_gd_hd = CIPConvert.ToDecimal(ip_grv.GetDataRow(v_row_index)["ID_HOP_DONG"].ToString());
                    var v_da_xoa = ip_grv.GetDataRow(v_row_index)["DA_XOA_LCD"].ToString();

                    if (v_id_gd_hd == v_id_gd_hd_f340 && v_da_xoa == v_da_xoa_f340)
                    {
                        break;
                    }
                }
                ip_grv.FocusedRowHandle = v_row_index;
            }
        }
开发者ID:assassinadal,项目名称:BKIProject-DichVuMatDat,代码行数:46,代码来源:f340_dat_hs_lns_lcd.cs

示例4: deleteSelectedRows

 public static bool deleteSelectedRows(DevExpress.XtraGrid.Views.Grid.GridView xgv)
 {
     if (xgv == null)
         return false;
     int[] nSelectedRows = xgv.GetSelectedRows();
     if (nSelectedRows.Length == 0)
         return false;
     try
     {
         DataRow drRow = null;
         foreach(int nRowHandle in nSelectedRows)
         {
             drRow = xgv.GetDataRow(nRowHandle);
             if (drRow != null)
                 drRow.Delete();
         }
     }
     catch(Exception ex)
     {
         throw(ex);
     }
     return true;
 }
开发者ID:puentepr,项目名称:thuctapvietinsoft,代码行数:23,代码来源:Definition.cs

示例5: deleteSelectedRow

 public static bool deleteSelectedRow(DevExpress.XtraGrid.Views.Grid.GridView xgv, int nRowHandle)
 {
     if (xgv == null || nRowHandle < 0)
         return false;
     DataRow drDeleteRow = xgv.GetDataRow(nRowHandle);
     if (drDeleteRow == null)
         return false;
     // delete row:
     drDeleteRow.Delete();
     return true;
 }
开发者ID:puentepr,项目名称:thuctapvietinsoft,代码行数:11,代码来源:Definition.cs

示例6: DelMainBurtgel

 public static bool DelMainBurtgel(DevExpress.XtraGrid.Views.Grid.GridView grd)
 {
     bool ReturnValue = false;
     try
     {
         if (Services.Security.checkForm("DELETE_CARD", Variables.UserInfo))
         {
             if (grd.SelectedRowsCount > 0)
             {
                 if (MessageBox.Show("Мэдээллийг устгах уу?", "Анхааруулга", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                 {
                     DataRow Row = grd.GetDataRow(grd.FocusedRowHandle);
                     if (Row["BNoHistory_ID"] != null && Row["BNoHistory_ID"].ToString() != "")
                     {
                         string SQL = "Update MainBurtgel.T_BNoHistory Set Archive = 'Y' Where ID = '" + Row["BNoHistory_ID"].ToString() + "'";
                         if (Services.Database.ExecuteNonQueryStr(SQL))
                             ReturnValue = true;
                         else
                             ReturnValue = false;
                     }
                 }
             }
             else
             {
                 MessageBox.Show("Мэдээлэл сонгоно уу!", "Алдаа", MessageBoxButtons.OK, MessageBoxIcon.Error);
                 ReturnValue = false;
             }
         }
         else
             MessageBox.Show("Уучлаарай! Та хандах эрхгүй байна.", "Анхааруулга", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
     catch (Exception Err)
     {
         MessageBox.Show("Дараахи алдаа гарлаа : " + Err.Message.ToString(), "Алдаа", MessageBoxButtons.OK, MessageBoxIcon.Error);
         ReturnValue = false;
     }
     return ReturnValue;
 }
开发者ID:Chuluunsukh,项目名称:VS_tabi,代码行数:38,代码来源:Function.cs


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