本文整理汇总了C#中DevExpress类的典型用法代码示例。如果您正苦于以下问题:C# DevExpress类的具体用法?C# DevExpress怎么用?C# DevExpress使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DevExpress类属于命名空间,在下文中一共展示了DevExpress类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: barButtonItem3_ItemClick
private void barButtonItem3_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
{
if (Conformation.PersonDelation)
{
}
}
开发者ID:gitter-badger,项目名称:administrator,代码行数:7,代码来源:PersonListControl.cs
示例17: barSave_ItemClick
private void barSave_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
{
if (XtraMessageBox.Show("确定保存该信息?", "操作确认", MessageBoxButtons.OKCancel) == System.Windows.Forms.DialogResult.OK)
{
if (dxValidationProvider1.Validate())
{
dIAGNOSISOUTCOMEBindingSource.EndEdit();
dIAGNOSISOUTCOMEBindingSource.CurrencyManager.EndCurrentEdit();
try
{
diag.Update();
if (NewRegistEvt != null)
NewRegistEvt();
this.Close();
}
catch (Exception err)
{
XtraMessageBox.Show(err.Message, "错误提示", MessageBoxButtons.OK);
}
}
}
}
开发者ID:hyblusea,项目名称:BloodInfo_MngPlatform,代码行数:25,代码来源:FrmEdtDiagosis_Outcome.cs
示例18: aspxCallback_Callback
protected void aspxCallback_Callback(object sender, DevExpress.Web.ASPxCallback.CallbackEventArgs e)
{
SqlJob sqlJob = new SqlJob();
System.Threading.Thread.Sleep(2000);
try
{
// TODO: Validar que se pueda eliminar el proceso.
switch (e.Parameter)
{
case "DELETE":
try
{
jobSchedulerService.DeleteJob(sqlJob);
e.Result = "DELETEOK";
throw new Exception();
}
catch (Exception ex)
{
e.Result = "DELETENOOK";
}
break;
default:
break;
}
}
catch (Exception ex)
{
if (e.Parameter == "DELETE")
{
throw new Exception("No se ha podido eliminar el proceso debido al siguiente error: " + ex.Message);
}
}
}
开发者ID:pampero,项目名称:cgControlPanel,代码行数:34,代码来源:JobDelete.aspx.cs
示例19: DashboardTesterAspNetApplication_DatabaseVersionMismatch
private void DashboardTesterAspNetApplication_DatabaseVersionMismatch(object sender, DevExpress.ExpressApp.DatabaseVersionMismatchEventArgs e) {
#if EASYTEST
e.Updater.Update();
e.Handled = true;
#else
if (System.Diagnostics.Debugger.IsAttached) {
e.Updater.Update();
e.Handled = true;
} else {
string message = "The application cannot connect to the specified database, because the latter doesn't exist or its version is older than that of the application.\r\n" +
"This error occurred because the automatic database update was disabled when the application was started without debugging.\r\n" +
"To avoid this error, you should either start the application under Visual Studio in debug mode, or modify the " +
"source code of the 'DatabaseVersionMismatch' event handler to enable automatic database update, " +
"or manually create a database using the 'DBUpdater' tool.\r\n" +
"Anyway, refer to the following help topics for more detailed information:\r\n" +
"'Update Application and Database Versions' at http://www.devexpress.com/Help/?document=ExpressApp/CustomDocument2795.htm\r\n" +
"'Database Security References' at http://www.devexpress.com/Help/?document=ExpressApp/CustomDocument3237.htm\r\n" +
"If this doesn't help, please contact our Support Team at http://www.devexpress.com/Support/Center/";
if (e.CompatibilityError != null && e.CompatibilityError.Exception != null) {
message += "\r\n\r\nInner exception: " + e.CompatibilityError.Exception.Message;
}
throw new InvalidOperationException(message);
}
#endif
}
开发者ID:aries544,项目名称:eXpand,代码行数:26,代码来源:WebApplication.cs
示例20: GRID_RowInserting
protected void GRID_RowInserting(object sender, DevExpress.Web.Data.ASPxDataInsertingEventArgs e)
{
ASPxGridView grid = (ASPxGridView)sender;
ASPxTextBox txtNombre = (ASPxTextBox)grid.FindEditFormTemplateControl("ASPxNombre");
ASPxListBox cmbMateriales = (ASPxListBox)grid.FindEditFormTemplateControl("ASPxListBox");
MATERIAL newKit = new MATERIAL();
newKit.M_NOMBRE = txtNombre.Text;
newKit.M_TIPO = "Kit";
newKit.M_MEDIDA_COMPRA = 1;
newKit.M_MEDIDA_DISTRIBUCION = 1;
newKit.M_STOCK_BAJO = 1;
newKit.M_STOCK_IDEAL = 100;
newKit.M_STOCK_REAL = 0;
CRUD_Material.Create(newKit);
int kit_id = CRUD_Material.Read(newKit.M_NOMBRE);
foreach (ListEditItem item in cmbMateriales.Items)
{
MATERIAL_KIT mat = new MATERIAL_KIT();
mat.M_ID = kit_id;
mat.MAT_M_ID = CRUD_Material.Read(item.Value.ToString());
mat.MK_CANTIDAD = 1;
CRUD_Kit.Create(mat);
}
e.Cancel = true;
grid.CancelEdit();
}
开发者ID:dralion14,项目名称:BodExpress,代码行数:31,代码来源:MaterialKit.aspx.cs
注:本文中的DevExpress类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论