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


C# DevExpress类代码示例

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


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

示例1: repositoryItemButtonEditSave_ButtonClick

 private void repositoryItemButtonEditSave_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
 {
     if (MessageBox.Show("هل انت متأكد؟", "تحزيــــر", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation) == DialogResult.No)
         return;
     DataRow Row = (DataRow)gridViewMain.GetFocusedDataRow();
     SqlConnection con = new SqlConnection(MyCL.SqlConStr);
     SqlCommand cmd = new SqlCommand("", con);
     try
     {
         if (Row["knowID"].ToString() == string.Empty)// Is Unsaved Row?
         {
             string NewID = MyCL.GetNewID("CDknow", "knowID");
             cmd.CommandText = string.Format(@"Insert Into CDknow (knowID, know) VALUES ({0}, '{1}')",
             NewID, Row["know"]);
         }
         else
         {
             cmd.CommandText = string.Format(@"Update CDknow Set know = '{0}' Where knowID = {1}",
             Row["know"], Row["knowID"]);
         }
         con.Open();
         cmd.ExecuteNonQuery();
         MyCL.ShowMsg("تم الحفظ", false, this);
     }
     catch (SqlException ex)
     {
         MyCL.ShowMsg(MyCL.CheckExp(ex), true, this);
     }
     con.Close();
     LoadData();
 }
开发者ID:EgyFalseX-EESoft-WinForm,项目名称:Training-Center,代码行数:31,代码来源:CDknowFrm.cs

示例2: repositoryItemButtonEditDelete_ButtonClick

 private void repositoryItemButtonEditDelete_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
 {
     if (MessageBox.Show("هل انت متأكد؟", "تحزيــــر", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation) == DialogResult.No)
         return;
     DataRow Row = (DataRow)gridViewMain.GetFocusedDataRow();
     if (Row["knowID"].ToString() == string.Empty)// Is Unsaved Row?
     {
         LoadData();
         return;
     }
     SqlConnection con = new SqlConnection(MyCL.SqlConStr);
     SqlCommand cmd = new SqlCommand("", con);
     try
     {
         cmd.CommandText = @"Delete From CDknow Where knowID = " + Row["knowID"];
         con.Open();
         cmd.ExecuteNonQuery();
         MyCL.ShowMsg("تم الحذف", false, this);
     }
     catch (SqlException ex)
     {
         MyCL.ShowMsg(MyCL.CheckExp(ex), true, this);
     }
     con.Close();
     LoadData();
 }
开发者ID:EgyFalseX-EESoft-WinForm,项目名称:Training-Center,代码行数:26,代码来源:CDknowFrm.cs

示例3: barCheckItem1_CheckedChanged

 private void barCheckItem1_CheckedChanged(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     if ((e.Item as DevExpress.XtraBars.BarCheckItem).Checked)
         this.chartControl1.Legend.Visible = true;
     else
         this.chartControl1.Legend.Visible = false;
 }
开发者ID:supergfox,项目名称:SPC,代码行数:7,代码来源:SampleXYRelationDrawBoard.cs

示例4: btnSearch_ItemClick

        private void btnSearch_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            lstBaseInfo = db.Fetch<PATIENT_BASEINFO, PATIENT_REGIST>("select t.*, t1.*  from PATIENT_BASEINFO t join PATIENT_REGIST t1 on T.ID = T1.BASE_INFO_ID  order by T.ID");
            //lstBaseInfo = db.Fetch<PATIENT_BASEINFO, PATIENT_REGIST, PATIENT_BASEINFO>( new BaseInfoPostRelator ().MapIt, "select t.*, t1.*  from PATIENT_BASEINFO t join PATIENT_REGIST t1 on T.CASE_HISTORY_ID = T1.CASE_HISTORY_ID");

            pATIENTBASEINFOBindingSource.DataSource = lstBaseInfo;
        }
开发者ID:hyblusea,项目名称:BloodInfo_MngPlatform,代码行数:7,代码来源:FrmRptPatientInfo.cs

示例5: btnExportGrid_ItemClick

        private void btnExportGrid_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (selection.SelectedCount <= FrmLogin.MAXROWCOUNT)
            {
                SaveFileDialog saveDialog = new SaveFileDialog();
                saveDialog.Filter = "XLS文件|*.xls";
                saveDialog.Title = "导出Excel文件";
                saveDialog.DefaultExt = "xls";
                if (saveDialog.ShowDialog() == DialogResult.OK)
                {
                    gridView1.Columns["CheckMarkSelection"].Visible = false;

                    gridView1.SelectAll();
                    gridView1.ExportToXls(saveDialog.FileName);

                    gridView1.Columns["CheckMarkSelection"].Visible = true;
                    gridView1.Columns["CheckMarkSelection"].VisibleIndex = 0;

                    MessageBox.Show("导出成功!");

                }
            }
            else
            {
                MessageBox.Show("记录数超过50000条,请缩小查找范围后再导出!");
            }
        }
开发者ID:radtek,项目名称:wxcm-project,代码行数:27,代码来源:FrmSaleReturnErrDetail.cs

示例6: aspxCallback_Callback

        protected void aspxCallback_Callback(object sender, DevExpress.Web.ASPxCallback.CallbackEventArgs e)
        {
            var sqlJobTrigger = (SqlJobTrigger)jobSchedulerService.GetJobTriggerById(Convert.ToInt32(Request["jobTriggerId"]));

            try
            {
                switch (e.Parameter)
                {
                    // SOLO BORRAR SI EL TRIGGER ESTA AGENDADO
                    case "DELETE":
                        if (sqlJobTrigger.JobTriggerStatus == JobTriggerStatus.Agendado)
                        {
                            sqlJobTrigger.DeletedBy = User.Identity.Name;
                            jobSchedulerService.DeleteTrigger(sqlJobTrigger);
                            e.Result = "DELETEDOK";
                        }
                        else
                        {
                            e.Result = "No se puede eliminar el agendamiento porque no está en estado Agendado";
                        }
                        break;
                    case "KILLPROCESS":
                        if (sqlJobTrigger.JobTriggerStatus == JobTriggerStatus.Ejecutando)
                            jobSchedulerService.KillProcess(sqlJobTrigger);
                        e.Result = "PROCESSKILLED";
                        break;
                }
            }
            catch (Exception ex)
            {
                if (log.IsErrorEnabled)
                    log.Error(Utils.UI.Helper.BuildRecursiveErrorMessage(ex));
                e.Result = "Error:\r\n" + Utils.UI.Helper.BuildRecursiveErrorMessage(ex);
            }
        }
开发者ID:pampero,项目名称:cgControlPanel,代码行数:35,代码来源:JobTriggerInfoDialog.aspx.cs

示例7: GVEditor_RowUpdated

 protected void GVEditor_RowUpdated(object sender, DevExpress.Web.Data.ASPxDataUpdatedEventArgs e)
 {
     if (e.Exception != null)
         GVEditor.JSProperties["cpShowPopup"] = e.Exception.Message;
     else
         GVEditor.JSProperties["cpShowPopup"] = "تم التعــــديل ...";
 }
开发者ID:EgyFalseX,项目名称:WebSites,代码行数:7,代码来源:VideoCategoryEditor.aspx.cs

示例8: treeIndex_GetSelectImage

        void treeIndex_GetSelectImage(object sender, DevExpress.XtraTreeList.GetSelectImageEventArgs e)
        {
            treeIndex.BeginUpdate();
            try
            {
                var drv = this.treeIndex.GetDataRecordByNode(e.Node) as DataRowView;

                if (!drv.IsEmpty())
                {
                    if (drv["NodeType"].IsEmpty())
                    {
                        e.NodeImageIndex = 0;
                    }
                    else
                    {
                        var menuType = (NodeType)Convert.ToInt32(drv["NodeType"]);
                        if (menuType.In(NodeType.Folder))
                            e.NodeImageIndex = e.Node.Expanded ? 1 : 0;
                        else
                            e.NodeImageIndex = 2;
                    }
                }
                else
                {
                    e.NodeImageIndex = e.Node.Expanded ? 1 : 0;
                }
            }
            finally
            {
                this.treeIndex.EndUpdate();
            }
        }
开发者ID:JodenSoft,项目名称:JodenSoft,代码行数:32,代码来源:sysCommonReportView.cs

示例9: PhonebooksGridView_RowInserting

        protected void PhonebooksGridView_RowInserting(object sender, DevExpress.Web.Data.ASPxDataInsertingEventArgs e)
        {
            ASPxGridView grid = sender as ASPxGridView;

            if (CustomerUtilities.IsLoggedIn() == true)
            {
                using (var uow = new UnitOfWork())
                {
                    Phonebook phonebook = new Phonebook(uow);
                    SetPhonebookValues(phonebook, e.NewValues);
                    phonebook.Customer = uow.GetObjectByKey<Customer>(CustomerUtilities.CurrentCustomer().Oid);

                    ValidationResult validation = new PhonebookValidator().Validate(phonebook);

                    if (validation.IsValid)
                    {
                        uow.CommitChanges();
                    }
                    else
                    {
                        e.Cancel = true;
                        uow.Dispose();
                    }
                }
            }
            else
            {
                Response.Redirect(UrlManager.Root);
            }

            EndEditing(grid, e);
        }
开发者ID:a1exb1,项目名称:farlon-data-consolidator-dotnet,代码行数:32,代码来源:Manage.aspx.cs

示例10: cbSalvarDadosPagina_Callback

        protected void cbSalvarDadosPagina_Callback(object source, DevExpress.Web.ASPxCallback.CallbackEventArgs e)
        {
            try
            {
                if (e.Parameter == null || string.IsNullOrEmpty(e.Parameter))
                {
                    throw new Exception("Parâmetro nulo ou inválido.");
                }

                if (e.Parameter.Contains("?"))
                {
                    string[] vet = e.Parameter.Split('?');
                    string idBanner = vet[0];
                    string tpOperacao = vet[1];

                    if (tpOperacao.Equals("D"))
                    {
                        //Deleção do Álbum
                        //new AlbumFotosBU().DeletarAlbumFotos(idBanner);
                        new BannerSiteBU().DeletaBannerSite(idBanner);
                        e.Result = "Banner deletado com sucesso!";
                    }
                    else
                    {
                        throw new Exception("Parâmetro Tipo de operação inválido.");
                    }
                }
            }
            catch (Exception eX)
            {
                throw eX;
            }
        }
开发者ID:hugohcn,项目名称:sme_website,代码行数:33,代码来源:ManterBannerSiteForm.aspx.cs

示例11: ImageUploader_FileUploadComplete

        protected void ImageUploader_FileUploadComplete(object sender, DevExpress.Web.FileUploadCompleteEventArgs e)
        {
            FormsIdentity id = (FormsIdentity)HttpContext.Current.User.Identity;
            FormsAuthenticationTicket ticket = id.Ticket;

            if (!ticket.Expired)
            {
                if (e.IsValid)
                {
                    try
                    {
                        string UploadLocation = ConfigurationManager.AppSettings["ImageUploadFolder"].ToString();
                        string NewFileName = DateTime.Now.ToString("ddMMyyHHmmss") + e.UploadedFile.FileName;
                        e.UploadedFile.SaveAs(MapPath(UploadLocation) + NewFileName);

                        ImageUploader.JSProperties["cppopupAttachImage_SystemFileName"] = NewFileName;
                        ImageUploader.JSProperties["cppopupAttachImage_UserFileName"] = e.UploadedFile.FileName;
                        ImageUploader.JSProperties["cpErrMsg"] = string.Empty;
                    }
                    catch (Exception err)
                    {
                        ImageUploader.JSProperties["cpErrMsg"] = err.Message;
                    }
                }
                else
                { ImageUploader.JSProperties["cpErrMsg"] = e.ErrorText; }
            }
            else
            { ImageUploader.JSProperties["cpErrMsg"] = "Session Expired."; }
        }
开发者ID:safaintegrated,项目名称:asm,代码行数:30,代码来源:UploadImage_Controller.ascx.cs

示例12: cbp_UploadImage_Loader_Callback

        protected void cbp_UploadImage_Loader_Callback(object sender, DevExpress.Web.CallbackEventArgsBase e)
        {
            DataTable Dt = new DataTable();

            try
            {
                string err = ImageUploaderMethods.ImageInfo(RowId.Text, ref Dt);

                if (err == string.Empty)
                {
                    if (Dt.Rows.Count == 1)
                    {
                        ImageFileUserName.Text = Dt.Rows[0]["ImageFileUserName"].ToString();
                        UploadedBy.Text = Dt.Rows[0]["UploadedBy"].ToString();
                        Notes.Text = Dt.Rows[0]["Notes"].ToString();
                        UploadedDate.Text = Convert.ToDateTime(Dt.Rows[0]["UploadedDate"]).ToString("dd/MM/yyyy HH:mm");
                        CurrImage.ImageUrl = Path.Combine(ConfigurationManager.AppSettings["ImageUploadFolder"].ToString(), Dt.Rows[0]["ImageFileSystemName"].ToString());
                        cbp_UploadImage_Loader.JSProperties["cpErrMsg"] = string.Empty;
                    }
                    else
                    { cbp_UploadImage_Loader.JSProperties["cpErrMsg"] = "Sistem tidak dapat membuka info gambar yang telah dipilih."; }
                }
                else
                { cbp_UploadImage_Loader.JSProperties["cpErrMsg"] = err; }
            }
            catch (Exception err)
            {
                cbp_UploadImage_Loader.JSProperties["cpErrMsg"] = err.Message;
            }
            finally
            { Dt.Dispose(); }
        }
开发者ID:safaintegrated,项目名称:asm,代码行数:32,代码来源:UploadImage_Controller.ascx.cs

示例13: gridCorrectionOborotBsby_OnStartRowEditing

 protected void gridCorrectionOborotBsby_OnStartRowEditing(object sender, DevExpress.Web.Data.ASPxStartRowEditingEventArgs e)
 {
     if (!gridSaldoBsby.IsNewRowEditing)
     {
         gridCorrectionOborotBsby.DoRowValidation();
     }
 }
开发者ID:kosenv,项目名称:NMActiveMSFO,代码行数:7,代码来源:OborotBsby.aspx.cs

示例14: barButtonItem2_ItemClick

        private void barButtonItem2_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
              SaveFileDialog saveFileDialog1 = new SaveFileDialog();
            string fname = "";
            saveFileDialog1.Filter = "Microsoft Excel (*.xls)|*.xls";


            if (saveFileDialog1.ShowDialog() == DialogResult.OK)
            {
                fname = saveFileDialog1.FileName;
                try
                {
                    dsoFramerControl1.FileSave(saveFileDialog1.FileName, true);
                    
                    if (MsgBox.ShowAskMessageBox("导出成功,是否打开该文档?") != DialogResult.OK)
                    {
                       
                        ExcelAccess ex = new ExcelAccess();
                        ex.Open(fname);
                        //此处写填充内容代码
                        ex.ShowExcel();
                        return;
                    }
                }
                catch
                {
                    MsgBox.ShowSuccessfulMessageBox("无法保存" + fname + "。请用其他文件名保存文件,或将文件存至其他位置。");
                    return;
                }
            }
        }
开发者ID:s7loves,项目名称:mypowerscgl,代码行数:31,代码来源:frm22sbpjbTemplate.cs

示例15: cbp_Callback

        protected void cbp_Callback(object sender, DevExpress.Web.ASPxClasses.CallbackEventArgsBase e)
        {
            var cbp = sender as ASPxCallbackPanel;
            if (cbp == null) return;

            var objSett = this.Get_DefineInfo();
            if (cbp.ID == this.cbpSavingMsg.ID)
            {
                var actionName = Lib.IsNOE(this.Get_CurrentSettingCode()) ? "Add new " : "Update ";
                try
                {
                    // Gọi hàm save
                    var objWgIntr = new lsttbl_WidgetInteraction()
                    {
                        WidgetCode = this.MyPage.LayoutCode,
                        JsonStr = objSett.ToJsonStr()
                    };
                    MyBI.Me.Save_WidgetInteraction(objWgIntr);
                }
                catch { this.Set_SaveMsgText(string.Format("{0} failed!", actionName), true); }
                // Gửi trạng thái về client;
                this.Set_SaveMsgText(string.Format("{0} success!", actionName), false);
            }
            else if (cbp.ID == this.cbpPreView.ID)
            {
                //this.SetPreView(objSett);
            }
        }
开发者ID:tuyen-truong,项目名称:HTLBIWebApp2012,代码行数:28,代码来源:wcInteractionSetting.ascx.cs


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