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();
 }
 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();
 }
 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;
 }
        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;
        }
        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条,请缩小查找范围后再导出!");
            }
        }
        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);
            }
        }
 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"] = "تم التعــــديل ...";
 }
        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();
            }
        }
        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);
        }
        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;
            }
        }
        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."; }
        }
        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(); }
        }
 protected void gridCorrectionOborotBsby_OnStartRowEditing(object sender, DevExpress.Web.Data.ASPxStartRowEditingEventArgs e)
 {
     if (!gridSaldoBsby.IsNewRowEditing)
     {
         gridCorrectionOborotBsby.DoRowValidation();
     }
 }
        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;
                }
            }
        }
        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);
            }
        }
        private void barButtonItem3_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (Conformation.PersonDelation)
            {

            }
        }
        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);
                    }
                }
            }
        }
        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);
                }
            }
        }
Exemple #19
0
        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
        }
        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();
        }
Exemple #21
0
 void barBtnImport_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     var vw = new ImptView();
     if (vw.ShowDialog() == System.Windows.Forms.DialogResult.OK) {
         barBtnRefresh_ItemClick(null, null);
     }
 }
 private void repositoryItemButtonEditDel_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
 {
     if (MessageBox.Show("هل انت متأكد؟", "تحزير ...", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation) == System.Windows.Forms.DialogResult.No)
         return;
     SqlConnection con = new SqlConnection(FXFW.SqlDB.SqlConStr);
     SqlCommand cmd = new SqlCommand("", con);
     DataRow row = gridViewData.GetFocusedDataRow();
     if (row["org_stu_code"].ToString() == string.Empty)
     {
         LoadGrid();
         return;
     }
     try
     {
         cmd.CommandText = string.Format(@"Delete From student Where stu_code = {0} And asase_code = {1}",
         row["org_stu_code"], row["org_asase_code"]);
         con.Open();
         cmd.ExecuteNonQuery();
         MessageBox.Show("تم الحــــــــذف", "تمت العمليه", MessageBoxButtons.OK, MessageBoxIcon.Information);
         LoadGrid();
     }
     catch (SqlException ex)
     {
         MessageBox.Show(FXFW.SqlDB.CheckExp(ex), "خطــــاء", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
        protected void gdvMenuSistema_HtmlDataCellPrepared(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewTableDataCellEventArgs e)
        {
            if (e.DataColumn.Caption == "Situação")
            {
                if (bool.Parse(e.CellValue.ToString()))
                {
                    Image img = (Image)this.gdvMenuSistema.FindRowCellTemplateControl(e.VisibleIndex, (DevExpress.Web.ASPxGridView.GridViewDataColumn)gdvMenuSistema.Columns["Situacao"], "imgStatus");

                    if (img != null)
                    {
                        //Usuário Ativo
                        img.AlternateText = "Menu ativo";
                        img.Attributes["title"] = "Menu ativo";
                        img.ImageUrl = "images/ativo.png";
                    }
                }
                else
                {
                    Image img = (Image)this.gdvMenuSistema.FindRowCellTemplateControl(e.VisibleIndex, (DevExpress.Web.ASPxGridView.GridViewDataColumn)gdvMenuSistema.Columns["Situacao"], "imgStatus");

                    if (img != null)
                    {
                        //Usuário Desativado
                        img.AlternateText = "Menu desativado";
                        img.Attributes["title"] = "Menu desativado";
                        img.ImageUrl = "images/desativado.png";
                    }
                }
            }
        }
Exemple #24
0
        private void barItemStoreAssignment_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (!IsLoading)
            {
                IsLoading = true;
                var frm = (Forms.Maintenance.StockItemStoreAssignmentForm)FormUtils.SelectInstance(new Forms.Maintenance.StockItemStoreAssignmentForm());

                if (frm.SystemLock == null)
                {
                    var systemLock = _sysInfo.SetSystemLock(rpSRR.Text, e.Item.Caption);

                    if (systemLock.Success)
                    {
                        frm.SystemLock = systemLock;
                        frm.Tag = rpSRR.Text;
                        frm.Setup();
                        frm.ShowForm();
                    }
                    else
                        MessageBox.Show(systemLock.FailureReason, e.Item.Caption, MessageBoxButtons.OK, MessageBoxIcon.Stop);
                }
                IsLoading = false;

            }
        }
Exemple #25
0
 private void gridViewUsers_RowCellClick(object sender, DevExpress.XtraGrid.Views.Grid.RowCellClickEventArgs e)
 {
     if (e.Button.Equals(MouseButtons.Right))
     {
         popupMenuUser.ShowPopup(Cursor.Position);
     }
 }
 private void wizardControlOptions_SelectedPageChanging(object sender, DevExpress.XtraWizard.WizardPageChangingEventArgs e)
 {
     if (e.PrevPage == wizardPagePaths)
     {
         if (!beFilesPath.DoValidate() || !beDeletedFilesPath.DoValidate())
         {
             e.Cancel = true;
             DataCenterX.LogMessage("يجب مليء جميع البيانات", typeof(ServerOptionWizardFrm), nsLib.Utilities.Types.MessageType.Warn, null, true);
         }
     }
     else if (e.PrevPage == wizardPageGeneralOptions)
     {
         if (!tbDefaultUserPassword.DoValidate())
         {
             e.Cancel = true;
             DataCenterX.LogMessage("يجب مليء جميع البيانات", typeof(ServerOptionWizardFrm), nsLib.Utilities.Types.MessageType.Warn, null, true);
         }
     }
     else if (e.PrevPage == wizardPageServerOptions)
     {
         if (!tbServerIP.DoValidate() || !tbServerPort.DoValidate())
         {
             e.Cancel = true;
             DataCenterX.LogMessage("يجب مليء جميع البيانات", typeof(ServerOptionWizardFrm), nsLib.Utilities.Types.MessageType.Warn, null, true);
             return;
         }
     }
 }
 private void btnLuu_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     if (txtMatKhau.Text != txtXacNhanMK.Text)
     { XtraMessageBox.Show("Mật khẩu so khớp không hợp lệ", "Chú ý ", MessageBoxButtons.OK, MessageBoxIcon.Error); }
     else
     {
         if (txtTNV.Text == "" | txtDC.Text == "" | txtSDT.Text == ""
             | cbCVu.Text == "" | txtTenDN.Text == "" | txtMatKhau.Text == "")
         {
             XtraMessageBox.Show("Vui lòng nhập đầy đủ thông tin", "Chú ý !",
                 MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
         else
         {
             if (BNV.KtTenDN1(txtTenDN) == false)
             {
                 DNV.MaNV = txtMNV.Text; DNV.TenNV = txtTNV.Text; DNV.DiaChi = txtDC.Text; DNV.SDT = txtSDT.Text;
                 DNV.ChucVu = cbCVu.Text; DNV.TenDN = txtTenDN.Text; DNV.MK = txtMatKhau.Text; DNV.Site = txtSite.Text;
                 DLS.MaNV = frmDangNhap.MaNhanVien; DLS.TenNV = frmDangNhap.TenNhanVien;
                 string filename1 = temp;
                 //BNV.Insert(DNV, DLS, filename1);
                 BNV.Insert1(DNV, DLS, filename1, txtMatKhau);
             }
         }
     }
 }
 protected void callBackPanel_Callback(object sender, DevExpress.Web.ASPxClasses.CallbackEventArgsBase e)
 {
     List<DataItem> metrics = new List<DataItem>();
     metrics.Add(Analytics.Data.Session.Metrics.visits);
     System.Data.DataTable table = Manager.GetGaDataTable(DateTime.Today, DateTime.Today, metrics);
     metricTotalArticles.InnerText = Convert.ToInt32(table.Rows[0][0]).ToString("n0");
 }
 protected void ASPxScheduler1_CustomCallback(object sender, DevExpress.Web.ASPxClasses.CallbackEventArgsBase e)
 {
     if (e.Parameter.Equals("CALCULATESCHED"))
     {
         CalculateSchedule();
     }
 }
        private void bbiAccept_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            try
            {
                var oBeV = new BESVMC_USUA();
                var oBrV = new BRSVMC_USUA();

                oBeV.ALF_PASS = BRCryptography.Encrypt(txtALF_PASS_ACTU.Text);
                oBeV.COD_USUA = SESSION_USER;
                oBeV.COD_COMP = SESSION_COMP;
                oBeV.NUM_ACCI = 6;

                var oList = oBrV.Get_SVPR_USUA_LIST(oBeV);

                if (oList.Count == 0)
                    throw new ArgumentException("La contraseña actual ingresada no es correcta");

                if (string.IsNullOrEmpty(txtALF_PASS.Text))
                    throw new ArgumentException("Ingrese correctamente la contraseña");
                if (string.IsNullOrEmpty(txtALF_PASS_REPE.Text))
                    throw new ArgumentException("Ingrese correctamente la contraseña");
                if (!txtALF_PASS.Text.Equals(txtALF_PASS_REPE.Text))
                    throw new ArgumentException("Las contraseñas ingresadas no coinciden");
                if (XtraMessageBox.Show("Esta seguro que desea cambiar la contraseña?", "Sistema", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                {
                    oBe.ALF_PASS = BRCryptography.Encrypt(txtALF_PASS.Text);
                    DialogResult = DialogResult.OK;
                }
            }
            catch(Exception ex)
            {
                XtraMessageBox.Show(ex.Message,"Sistema",MessageBoxButtons.OK,MessageBoxIcon.Error);
            }
        }