Пример #1
0
        /// <summary>
        /// 加载数据
        /// </summary>
        public override void InitData()
        {
            if (task1 != null && !task1.IsCompleted)
            {
                return;
            }
            DateTime lbStart;
            DateTime lbEnd;

            lbStart = txtProdDt1.DateTime.Date;
            lbEnd   = txtProdDt2.DateTime.Date;
            if (lbStart > lbEnd)
            {
                throw new AppException("结束时间不能大于开始时间,请检查");
            }
            task1 = new Task(() =>
            {
                try
                {
                    SplashScreenManager.ShowForm(typeof(LoadWaitForm));
                    var models = viewService.GetNGDetail(lbStart, lbEnd);
                    this.BeginInvoke(new System.Windows.Forms.MethodInvoker(delegate
                    {
                        this.pivotGridControl1.DataSource = models;
                        this.pivotGridControl1.BestFit();
                    }));
                }
                catch (Exception ef)
                {
                    XtraMessageBox.Show(ef.Message);
                }
                finally
                {
                    SplashScreenManager.CloseForm();
                }
            });
            task1.Start();
        }
Пример #2
0
 private void bbRechnung_ItemClick(object sender, ItemClickEventArgs e)
 {
     try
     {
         SplashScreenManager.ShowForm(this, typeof(WaitForm1), true, true, false);
         SplashScreenManager.Default.SetWaitFormDescription("Bitte warten…");
         if (ObjEProject == null)
         {
             ObjEProject = new EProject();
         }
         if (ObjBProject == null)
         {
             ObjBProject = new BProject();
         }
         ObjEProject = ObjBProject.GetPath(ObjEProject);
         Object oTemplatePath = ObjEProject.TemplatePath + "\\Rechnung_Template.dotx";
         if (File.Exists(Convert.ToString(oTemplatePath)))
         {
             if (!Utility.fileIsOpen(Convert.ToString(oTemplatePath)))
             {
                 Microsoft.Office.Interop.Word.Application ap = new Microsoft.Office.Interop.Word.Application();
                 ap.Documents.Open(oTemplatePath);
                 ap.Visible = true;
                 ap.Activate();
             }
             else
             {
                 throw new Exception("Bitte schließen Sie die Rechnung-Dokumente aller Projekte");
             }
         }
         SplashScreenManager.CloseForm(false);
     }
     catch (Exception ex)
     {
         SplashScreenManager.CloseForm(false);
         Utility.ShowError(ex);
     }
 }
Пример #3
0
        private void repositoryItemToggleSwitch1_EditValueChanged(object sender, EventArgs e)
        {
            var editor = (ToggleSwitch)sender;
            var logic  = editor.EditValue;

            UseRatings = (bool)logic;

            if (txtSourcePath.EditValue != null)
            {
                FileList = null;
                FileList = new List <ImageFile>();
                btnPreview.Visibility = BarItemVisibility.Always;
                SplashScreenManager.ShowForm(this, typeof(ProgressForm), true, true, false);
                SplashScreenManager.Default.SetWaitFormDescription("Processing Images...");

                var dInfo = new DirectoryInfo(txtSourcePath.EditValue.ToString());

                var fInfo = dInfo.GetFiles("*.jpg", chkIncludeSubFolder.Checked ? SearchOption.AllDirectories : SearchOption.TopDirectoryOnly);

                var orderedList = fInfo.OrderBy(x => x.CreationTime).ToList();

                FileList.AddRange(orderedList.Select(file => new ImageFile
                {
                    Name       = file.Name,
                    Number     = Path.GetFileNameWithoutExtension(file.Name),
                    Attributes = file.Attributes,
                    FullPath   = file.FullName,
                    Rating     = UseRatings ? GetRating(file) : ""
                }));

                SplashScreenManager.CloseForm(false);
                if (FileList.Count > 0)
                {
                    var preview = new PreviewForm(FileList, UseRatings);
                    preview.ShowDialog(this);
                }
            }
        }
Пример #4
0
        void FillData()
        {
            SplashScreenManager.ShowForm(typeof(WaitScreen));
            gridControl1.DataSource = CreateColumns();

            using (var db = new DB_PLANTILLA())
            {
                var _locales    = db.GetAllRecords <T_Local>();
                var _subTipos   = db.GetAllElements <T_Subsistema_Tipo>();
                var _subAreas   = db.GetAllElements <T_Subsistema_Area>();
                var _coefs      = db.GetAllElements <T_CoefArea>();
                var _porcientos = db.GetAllElements <T_Porciento_BD>();


                foreach (var item in _localesByProject)
                {
                    gridView1.AddNewRow();

                    int _rowHandle = gridView1.GetRowHandle(gridView1.DataRowCount);

                    if (gridView1.IsNewItemRow(_rowHandle))
                    {
                        var _local = new DB_BIM().GetSingleRecord <Local>(x => x.Id == item.Local);
                        gridView1.SetRowCellValue(_rowHandle, gridView1.Columns["RoomID"], _local.RoomId);
                        gridView1.SetRowCellValue(_rowHandle, gridView1.Columns["KeyName"], _local.Key_Name);
                        var _subTipo = new DB_PLANTILLA().GetSingleRecord <T_Subsistema_Tipo>(x => x.Id == _local.SubsistemaTipo);
                        gridView1.SetRowCellValue(_rowHandle, gridView1.Columns["SubTipo"], _subTipo.Value.ToString());
                        var _subArea = new DB_PLANTILLA().GetSingleRecord <T_Subsistema_Area>(x => x.Id == _local.SubsistemaArea);
                        gridView1.SetRowCellValue(_rowHandle, gridView1.Columns["SubArea"], _subArea.Value.ToString());
                        var _coefArea = new DB_BIM().GetSingleElement <CoefArea>(x => x.Id == _local.Coef_Area);
                        gridView1.SetRowCellValue(_rowHandle, gridView1.Columns["Coef"], _coefArea.Value);
                        var _porcientoBD = new DB_PLANTILLA().GetSingleRecord <T_Porciento_BD>(x => x.Id == _local.Porciento_BD);
                        gridView1.SetRowCellValue(_rowHandle, gridView1.Columns["PorcientoBD"], _porcientoBD.Value);
                    }
                }
            }
            SplashScreenManager.CloseForm();
        }
Пример #5
0
 //下发设备保存命令
 public void SendDeivceComToSOA(object args)
 {
     SplashScreenManager.ShowForm(this.ParentForm, typeof(wfMain), false, true);
     try
     {
         BusinessResult bs = BusinessServiceHelper.Instanse.ExecuteBusiness(ExternalBusinessCmd.DeviceConfigUpdate, "", BusinessType.Set);
         if (bs == null || bs.Result == false)
         {
             ErrorLog.SystemLog(DateTime.Now, Program.infoResource.GetLocalizedString(language.InfoId.OperateFail));
             XtraMessageBox.Show(Program.infoResource.GetLocalizedString(language.InfoId.OperateFail));
         }
         else
         {
             ErrorLog.SystemLog(DateTime.Now, Program.infoResource.GetLocalizedString(language.InfoId.OpearteSuccess));
             XtraMessageBox.Show(Program.infoResource.GetLocalizedString(language.InfoId.OpearteSuccess));
         }
         SplashScreenManager.CloseForm();
     }
     catch
     {
         SplashScreenManager.CloseForm();
     }
 }
Пример #6
0
 private void barButtonItem44_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     SplashScreenManager.ShowForm(typeof(Frm_wait));
     if (chon == "0")
     {
         for (int i = view.RowCount - 1; i >= 0; i--)
         {
             view.SetRowCellValue(i, view.Columns["Chọn"], "True");
         }
         chon = "1";
         barButtonItem44.Caption = "Bỏ chọn tất cả";
     }
     else
     {
         for (int i = view.RowCount - 1; i >= 0; i--)
         {
             view.SetRowCellValue(i, view.Columns["Chọn"], "False");
         }
         chon = "0";
         barButtonItem44.Caption = "Chọn tất cả";
     }
     SplashScreenManager.CloseForm();
 }
Пример #7
0
        private void btnExecute_Click(object sender, EventArgs e)
        {
            if (eventDataBlockChanged != null)
            {
                eventDataBlockChanged(db);
            }

            //Open Wait Form
            SplashScreenManager.ShowForm(this, typeof(WaitForm1), true, true, false);

            //The Wait Form is opened in a separate thread. To change its Description, use the SetWaitFormDescription method.
            for (var i = 1; i <= 100; i++)
            {
                SplashScreenManager.Default.SetWaitFormDescription(i + "%");
                Thread.Sleep(25);
            }

            //Close Wait Form
            SplashScreenManager.CloseForm(false);


            DialogResult = DialogResult.OK;
        }
Пример #8
0
        //public OrdenDeTrabajo _ActividadPendienteActualizar;


        public EditOtXtraForm(Enumerados.TipoActividad tipoActividad)
        {
            ATipoDeActividad = tipoActividad;
            AIsAnUpdate      = false;
            InitializeComponent();

            try
            {
                SplashScreenManager.ShowForm(MdiParent, typeof(WaitForm1), true, true);
            }
            catch (Exception)
            {
                SplashScreenManager.CloseForm();
                SplashScreenManager.ShowForm(MdiParent, typeof(WaitForm1), true, true);
            }
            PopulaControles();
            AcomodaSegunTipoActividad();
            this.DialogResult = DialogResult.OK;
            var ultimaOrden = OrdenDeTrabajo.GetUltimaActividad(ATipoDeActividad);

            FechaConfecciontimeEdit.DateTime            = DateTime.Today;
            FechaConfecciontimeEdit.Properties.MinValue = fechaIncialActividadDateEdit.Properties.MinValue = fechaFinalActividadDateEdit.Properties.MinValue = ultimaOrden != null?ultimaOrden.FechaConfeccion:DateTime.Today;
        }
Пример #9
0
        private void TopEmployeePerformance_Load(object sender, EventArgs e)
        {
            try
            {
                SplashScreenManager.ShowForm(this, typeof(Masters.WaitForm1), true, true, false);
                getTimings();
                Timer MyTimer = new Timer();
                MyTimer.Interval = 60 * 60 * 1000;
                //timer1.Enabled = true;
                MyTimer.Tick += new EventHandler(timer1_Tick);
                MyTimer.Start();
                BindTopPerformer();
            }

            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                SplashScreenManager.CloseForm(false);
            }
        }
Пример #10
0
        public FrmArmsSearch()
        {
            SplashScreenManager.ShowForm(this, typeof(WaitForm1), true, true, false);

            InitializeComponent();

            publicInstance = this;

            publicStreetGroup = this;

            setImages();

            Load += OnFormLoad;

            ToolStripEvent();

            OnFormLoad(null, null);

            temTable.Columns.Add("PaymentRefNumber", typeof(string));
            temTable.Columns.Add("UserId", typeof(string));

            SplashScreenManager.CloseForm(false);
        }
        private void MostrarProyectos()
        {
            SplashScreenManager.ShowForm(this, typeof(WaitForm1), true, true, false);
            SplashScreenManager.Default.SetWaitFormDescription("Recopilando informaciòn...");
            string cCodCompañia        = "000000";
            string cAñoProceso         = Convert.ToString(this.Cbo_AñoProceso.SelectedValue);
            string cVersion            = Convert.ToString(this.Cbo_Version.SelectedValue);
            string cCodTipoFormulacion = Convert.ToString(this.cbo_CodTipoFormulacion.SelectedValue);
            string CodProyecto         = Convert.ToString(this.Txt_CodProyecto.Value);

            Service.Reporte SDG = new Service.Reporte();
            if (MyStuff.UsaWCF == true)
            {
                DT_Proyecto = objWCF.Lista_FormulacionReporteProyecto(cCodCompañia, cAñoProceso, cVersion, cCodTipoFormulacion, CodProyecto).Tables[0];
            }
            else
            {
                DT_Proyecto = SDG.Lista_FormulacionReporteProyecto(cCodCompañia, cAñoProceso, cVersion, cCodTipoFormulacion, CodProyecto).Tables[0];
            }
            this.gridControlData.DataSource = DT_Proyecto;
            gridViewData.ExpandAllGroups();
            SplashScreenManager.CloseForm();
        }
Пример #12
0
        private void btnRemove_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            SplashScreenManager.ShowForm(typeof(WaitForm1));
            int    id   = (int)gvTable.GetRowCellValue(gvTable.FocusedRowHandle, gvTable.Columns[0]);
            string name = gvTable.GetRowCellValue(gvTable.FocusedRowHandle, gvTable.Columns[1]).ToString();

            if (XtraMessageBox.Show("Xóa " + name + "?", "Xác nhận", MessageBoxButtons.YesNo) == DialogResult.Yes)
            {
                if (TableBUS.Instance.DeleteTable(id))
                {
                    LoadTable();
                    SplashScreenManager.CloseForm();
                    XtraMessageBox.Show("Đã xóa " + name, "Thông báo");
                    Log.WriteLog("delete Table, ID = " + id);
                }
                else
                {
                    SplashScreenManager.CloseForm();
                    XtraMessageBox.Show("Không thể xóa bàn đang có người", "Lỗi");
                }
            }
            btnRemove.Enabled = false;
        }
Пример #13
0
        private void btnBackup_ItemClick(object sender, ItemClickEventArgs e)
        {
            SaveFileDialog save = new SaveFileDialog();

            save.Filter           = "BAK Files (.bak)|*.bak|All Files (*.*)|*.*";
            save.InitialDirectory = Directory.GetCurrentDirectory();

            if (save.ShowDialog() == DialogResult.OK)
            {
                try
                {
                    SplashScreenManager.ShowForm(typeof(WaitForm1));
                    SecurityBUS.Instance.BackupData(save.FileName);
                    SplashScreenManager.CloseForm();
                    XtraMessageBox.Show("Sao lưu thành công!", "Thông báo");
                }
                catch (Exception ex)
                {
                    SplashScreenManager.CloseForm();
                    XtraMessageBox.Show("Sao lưu thất bại!\nError: " + ex, "Lỗi");
                }
            }
        }
Пример #14
0
        private void btnTimDuong_Click(object sender, EventArgs e)
        {
            SplashScreenManager.ShowForm(this, typeof(WaitForm1), true, true, false);
            if (int.Parse(txtSoLuong.Text) > sl)
            {
                Console.Beep();
                txtSoLuong.Focus();
                MessageBox.Show("Số luồng nhập đã vượt tối đa số lượng Danh Sách Đối Tác!", "Thông báo lỗi");
                return;
            }
            if (txtSoLuong.TextLength == 0)
            {
                Console.Beep();
                txtSoLuong.Focus();
                MessageBox.Show("Vui lòng nhập số lượng lớn hơn 0!", "Thông báo lỗi");
                return;
            }
            Node batdau = graph[0];
            //Thực thi với điểm bắt đầu là điểm ở vị trí bắt đầu của danh sách
            Dijkstra dijkstra_3 = new Dijkstra(graph, batdau);

            watch.Reset();
            watch.Start();
            QuaTrinh = TaskEx.Run(() => dijkstra_3.Run_CoDong(int.Parse(txtSoLuong.Text))).Result;
            //Dừng thời gian sau khi thực thi xong
            watch.Stop();

            //Gán kết quả vào label
            lbThoiGian.Text    = String.Format("Thời gian thực thi " + txtSoLuong.Text + " luong: {0:00} s", watch.Elapsed.TotalSeconds.ToString());
            lbThoiGian.Visible = true;//Hiển thị thời gian trên form
            //
            HienThiListView(lstV_SS, QuaTrinh);
            //Tổng đường đi
            lbTongKC.Text    = String.Format("Tổng đường đi: {0:00}", QuaTrinh.ToList().Sum(p => p.Distance));
            lbTongKC.Visible = true;//Hiển thị tổng đường đi trên form
            SplashScreenManager.CloseForm();
        }
Пример #15
0
 /// <summary>
 /// 加载数据
 /// </summary>
 public override void InitData()
 {
     if (task1 != null && !task1.IsCompleted)
     {
         return;
     }
     if (txtProdDt1.DateTime > txtProdDt2.DateTime)
     {
         throw new AppException("结束时间不能大于开始时间,请检查");
     }
     if (string.IsNullOrWhiteSpace(txtProdDt1.Text) || string.IsNullOrWhiteSpace(txtProdDt2.Text))
     {
         throw new AppException("请先输入日期");
     }
     task1 = new Task(() =>
     {
         try
         {
             SplashScreenManager.ShowForm(typeof(LoadWaitForm));
             var models = viewService.GetP106ActMatDaily(txtProdDt1.DateTime.Date, txtProdDt2.DateTime.Date);
             this.BeginInvoke(new System.Windows.Forms.MethodInvoker(delegate
             {
                 this.pivotGridControl1.DataSource = models;
                 this.pivotGridControl1.BestFit();
             }));
         }
         catch (Exception ef)
         {
             XtraMessageBox.Show(ef.Message);
         }
         finally
         {
             SplashScreenManager.CloseForm();
         }
     });
     task1.Start();
 }
Пример #16
0
        //DAVA PANELİ DOLDUR
        private void FillMainDavaPanel(Dava gelenDava)
        {
            SplashScreenManager.ShowForm(this, typeof(WaitForm1), true, true);
            dosyaBilgileriUC1.FillDava(gelenDava);
            basvurucuUC1.FillDava(gelenDava);

            pnlKarsiTaraf.Controls.Clear();

            foreach (KarsiTaraf kTaraf in gelenDava.KarsiTaraflar)
            {
                if (kTaraf.Taraf != null)
                {
                    if (kTaraf.Taraf.KisiSirketKurum == TarafTipi.Kisi)
                    {
                        karsiTarafUC = new KarsiTarafUC();
                        karsiTarafUC.FillTaraf(kTaraf);
                        pnlKarsiTaraf.Controls.Add(karsiTarafUC);
                    }
                    else if (kTaraf.Taraf.KisiSirketKurum == TarafTipi.Sirket)
                    {
                        karsiTarafSirketUC = new KarsiTarafSirketUC();
                        karsiTarafSirketUC.FillTaraf(kTaraf);
                        pnlKarsiTaraf.Controls.Add(karsiTarafSirketUC);
                    }
                    else if (kTaraf.Taraf.KisiSirketKurum == TarafTipi.Kurum)
                    {
                        karsiTarafKurumUC = new KarsiTarafKurumUC();
                        karsiTarafKurumUC.FillTaraf(kTaraf);
                        pnlKarsiTaraf.Controls.Add(karsiTarafKurumUC);
                    }
                }
            }

            splitMenu.Panel2.Enabled = true;

            SplashScreenManager.CloseForm();
        }
Пример #17
0
        //删除
        private void barBtnLocalDel_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (this.gcCljbxx == null || ((DataTable)this.gvCljbxx.DataSource).Rows.Count < 1)
            {
                MessageBox.Show("当前没有数据可以操作!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            var dtSel = GridControlHelper.SelectedItems(this.gvCljbxx);

            if (dtSel.Rows.Count < 1)
            {
                MessageBox.Show("请选择您要操作的记录!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            if (MessageBox.Show("确定要删除吗?", "删除确认", MessageBoxButtons.OKCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) != DialogResult.OK)
            {
                return;
            }
            try
            {
                SplashScreenManager.ShowForm(typeof(DevWaitForm));
                string vinStr = string.Join("','", dtSel.AsEnumerable().Select(d => d.Field <string>("VIN")).ToArray());
                AccessHelper.ExecuteNonQuery(AccessHelper.conn, string.Format("delete from FC_CLJBXX where VIN in ('{0}')", vinStr));
                AccessHelper.ExecuteNonQuery(AccessHelper.conn, string.Format("delete from RLLX_PARAM_ENTITY where VIN in ('{0}')", vinStr));
            }
            catch (Exception ex)
            {
                MessageBox.Show("操作出现错误:" + ex.Message, "异常", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            finally
            {
                SplashScreenManager.CloseForm();
            }
            int pageNum = Convert.ToInt32(txtPage.Text.Substring(0, txtPage.Text.LastIndexOf("/")));

            this.SearchLocal(pageNum);
        }
Пример #18
0
        public FrmModification()
        {
            try
            {
                SplashScreenManager.ShowForm(this, typeof(WaitForm1), true, true, false);

                InitializeComponent();

                publicInstance = this;

                Load += OnFormLoad;

                setImages();

                ToolStripEvent();

                OnFormLoad(null, null);

                dtRev.Columns.Add("SN", typeof(Int32));
                dtRev.Columns.Add("PaymentRef", typeof(string));
                dtRev.Columns.Add("EReceiptNumber", typeof(string));
                dtRev.Columns.Add("ReprintType", typeof(string));
                dtRev.Columns.Add("NewRevenueCode", typeof(string));
                dtRev.Columns.Add("NewRevenueName", typeof(string));
                dtRev.Columns.Add("NewAgencyCode", typeof(string));
                dtRev.Columns.Add("NewAgencyName", typeof(string));
                dtRev.Columns.Add("NewPayerName", typeof(string));
                dtRev.Columns.Add("NewPayerAddress", typeof(string));
                dtRev.Columns.Add("Reasonforrequest", typeof(string));
                dtRev.Columns.Add("RequestSentBY", typeof(string));
                //dtRev.Columns.Add("Amount", typeof(double));
            }
            finally
            {
                SplashScreenManager.CloseForm(false);
            }
        }
Пример #19
0
        //批量导入
        private void barBtnImportNew_ItemClick(object sender, ItemClickEventArgs e)
        {
            string returnMsg = string.Empty;

            if (openFileDialog.ShowDialog() == DialogResult.OK)
            {
                try
                {
                    SplashScreenManager.ShowForm(typeof(DevWaitForm));
                    Utils ut = new Utils();

                    returnMsg += ut.ImportNoticeData(openFileDialog.FileName);
                }
                catch (Exception ex)
                {
                    XtraMessageBox.Show(ex.Message, "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }
                finally
                {
                    SplashScreenManager.CloseForm();
                    //记录操作日志
                    LogUtils.ReviewLogManager.ReviewLog(Properties.Settings.Default.LocalUserName, String.Format("{0}-{1}", this.Text, this.barBtnImportNew.Caption));
                }
            }
            if (!string.IsNullOrEmpty(returnMsg))
            {
                using (MessageForm mf = new MessageForm(returnMsg)
                {
                    Text = "导入结果"
                })
                {
                    mf.ShowDialog();
                }
            }
            //刷新
            refrashCurrentPage();
        }
Пример #20
0
        void btnRead_Click(object sender, EventArgs e)
        {
            try
            {
                SplashScreenManager.ShowForm(this, typeof(WaitForm1), true, true, false);

                GridView view = gridView1;

                excel.AddMapping <BankImportClass>(x => x.TIN, cboTin.Text.ToString().Trim());
                excel.AddMapping <BankImportClass>(x => x.Months, cboMonth.Text.ToString().Trim());
                excel.AddMapping <BankImportClass>(x => x.Staff_No, cboNo.Text.ToString().Trim());
                excel.AddMapping <BankImportClass>(x => x.Surname, CboSurname.Text.ToString().Trim());
                excel.AddMapping <BankImportClass>(x => x.Othernames, CboOther.Text.ToString().Trim());
                excel.AddMapping <BankImportClass>(x => x.Total_Income, CboIncome.Text.ToString().Trim());
                excel.AddMapping <BankImportClass>(x => x.Total_Relief, CboRelief.Text.ToString().Trim());
                excel.AddMapping <BankImportClass>(x => x.Total_Deduction, CboDeduction.Text.ToString().Trim());
                excel.AddMapping <BankImportClass>(x => x.Tax_Deducted, CboDeducted.Text.ToString().Trim());

                var bankImportList = (from c in excel.Worksheet <BankImportClass>(cboSheet.Text.ToString().Trim())
                                      select c).ToList();

                if (bankImportList.Any())
                {
                    gridControl1.DataSource = null;

                    gridControl1.DataSource = bankImportList;
                }
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                SplashScreenManager.CloseForm(false);
            }
        }
        private void btnTimKiem_Click(object sender, EventArgs e)
        {
            SplashScreenManager.ShowForm(typeof(O2S_Common.Utilities.ThongBao.WaitForm_Wait));
            try
            {
                DataGridView_ResetLaiCot();

                int _KhoaHocId = O2S_Common.TypeConvert.Parse.ToInt32(cboKhoaHoc.SelectedValue.ToString());
                int _LopHocId  = O2S_Common.TypeConvert.Parse.ToInt32(cboLopHoc.SelectedValue.ToString());

                if (_KhoaHocId != 0 && _LopHocId != 0)
                {
                    XepLichHocFilter _filter = new XepLichHocFilter();
                    _filter.LopHocId = _LopHocId;
                    List <XepLichHoc_PlusDTO> _lstNgayHoc = XepLichHocLogic.SelectGroupTheoNgayHoc(_filter);
                    if (_lstNgayHoc != null && _lstNgayHoc.Count > 0)
                    {
                        foreach (var item in _lstNgayHoc)
                        {
                            item.ThoiGianHoc_Long = item.ThoiGianHoc.ToString("yyyyMMdd");
                        }
                        TaoCot_DataGridView(_lstNgayHoc);
                        LayDuLieuLenGridView(_lstNgayHoc, _LopHocId, _KhoaHocId);
                    }
                }
                else
                {
                    O2S_Common.Utilities.ThongBao.frmThongBao frmthongbao = new O2S_Common.Utilities.ThongBao.frmThongBao(Base.ThongBaoLable.VUI_LONG_NHAP_DAY_DU_THONG_TIN);
                    frmthongbao.Show();
                }
            }
            catch (Exception ex)
            {
                O2S_Common.Logging.LogSystem.Error(ex);
            }
            SplashScreenManager.CloseForm();
        }
Пример #22
0
        public FrmBatch()
        {
            SplashScreenManager.ShowForm(this, typeof(WaitForm1), true, true, false);

            InitializeComponent();

            spinEdit1.Value = DateTime.Today.Year;

            var dtf = CultureInfo.CurrentCulture.DateTimeFormat;

            int j = 12;

            ToolStripEvent();

            //dt.Columns.Add
            dt.Columns.Add("Months", typeof(String));
            dt.Columns.Add("MonthsVal", typeof(String));

            for (int i = 1; i <= j; i++)
            {
                string monthName = dtf.GetMonthName(i);

                dt.Rows.Add(new object[] { monthName, string.Format("{0:00}", i) });
            }

            Common.setComboList(cboMonths, dt, "MonthsVal", "Months");

            cboMonths.Text = dtf.GetMonthName(DateTime.Today.Month);

            cboMonths.KeyPress += cboMonths_KeyPress;

            bttnUpdate.Click += bttnUpdate_Click;

            cboMonths.Focus(); setReload();

            SplashScreenManager.CloseForm(false);
        }
Пример #23
0
        private void btnBackup_Click(object sender, EventArgs e)
        {
            try
            {
                prgBarDbUtility.Text = (0).ToString();

                if (RequiredFieldsNotBlank("backup"))
                {
                    oDbUtilityBL.DbName           = lkeDatabases.EditValue.ToString().Trim();
                    oDbUtilityBL.DbBackupLocation = txtBackupLocation.Text.Trim();
                    oDbUtilityBL.TaskIsBackup     = true;

                    if (chkWindowsAuthentication.CheckState == CheckState.Unchecked)
                    {
                        oDbUtilityBL.UserName = txtUserName.Text.Trim();
                        oDbUtilityBL.Password = txtPassword.Text.Trim();
                    }

                    //users are not allowed to close the form
                    canClose = false;

                    oDbUtilityBL.IsLoginSecured = chkWindowsAuthentication.CheckState == CheckState.Unchecked ? false : true;

                    oDbUtilityBL.ServerName = lkeServer.EditValue.ToString();

                    oDbUtilityBL.Connect();

                    SplashScreenManager.ShowForm(typeof(WaitForm1));

                    backgroundWorker.RunWorkerAsync();
                }
            }
            catch (Exception ex)
            {
                DbUtilityHelper.DisplayMessageBox(ex.Message, "error");
            }
        }
Пример #24
0
        private void btnSearch_Click(object sender, EventArgs e)
        {
            string msg       = string.Empty;
            string startTime = this.dtStartTime.Text.Trim();
            string endTime   = this.dtEndTime.Text.Trim();

            if (string.IsNullOrEmpty(startTime))
            {
                msg += "统计开始时间不能为空\r\n";
            }
            if (string.IsNullOrEmpty(endTime))
            {
                msg += "统计结束时间不能为空\r\n";
            }
            if (!string.IsNullOrEmpty(msg))
            {
                MessageBox.Show(msg, "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }
            try
            {
                SplashScreenManager.ShowForm(typeof(DevWaitForm));
                msg = this.DataBinds(this.txtclxh.Text.Trim(), this.cbRllx.Text.Trim(), startTime, endTime);
                if (!string.IsNullOrEmpty(msg))
                {
                    MessageBox.Show(msg, "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("操作出现错误:" + ex.Message, "异常", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            finally
            {
                SplashScreenManager.CloseForm();
            }
        }
Пример #25
0
        private void btnSearch_Click(object sender, EventArgs e)
        {
            string msg       = string.Empty;
            string clxh      = this.txtclxh.Text.Trim();
            string rllx      = this.cbRllx.Text.Trim();
            string startTime = this.dtStartTime.Text.Trim();
            string endTime   = this.dtEndTime.Text.Trim();

            if (string.IsNullOrEmpty(startTime))
            {
                msg += "统计开始时间不能为空\r\n";
            }
            if (string.IsNullOrEmpty(endTime))
            {
                msg += "统计结束时间不能为空\r\n";
            }
            DateTime dtStart = Convert.ToDateTime(startTime);
            DateTime dtEnd   = Convert.ToDateTime(endTime);

            if (dtStart > dtEnd)
            {
                msg += "开始时间不能大于结束时间\r\n";
            }
            if (!string.IsNullOrEmpty(msg))
            {
                MessageBox.Show(msg, "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }
            SplashScreenManager.ShowForm(typeof(DevWaitForm));
            msg = this.DataBinds(clxh, rllx, startTime, endTime);
            SplashScreenManager.CloseForm();

            if (!string.IsNullOrEmpty(msg))
            {
                MessageBox.Show(msg, "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }
Пример #26
0
        static void Main()
        {
            try
            {
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);

                //界面汉化
                System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("zh-CN");
                BonusSkins.Register();
                SkinManager.EnableFormSkins();
                UserLookAndFeel.Default.SetSkinStyle("Money Twins");

                #region 执行脚本
                string filename = "measure.sql";
                if (File.Exists(filename))
                {
                    if (Script.ExecuteSqlScript(filename) == 1)
                    {
                        File.Delete(filename);
                    }
                }
                #endregion



                //新增
                SplashScreenManager.ShowForm(typeof(SplashScreen1));
                //Thread.Sleep(7000);

                Application.Run(View.MainForm.GetInstance());
            }
            catch (Exception ex)
            {
                Log4netHelper.Error(ex);
            }
        }
Пример #27
0
        public FrmCriteria()
        {
            SplashScreenManager.ShowForm(this, typeof(WaitForm1), true, true, false);

            InitializeComponent();

            iTransType = TransactionTypeCode.Null;

            publicInstance = this;

            setImages();

            ToolStripEvent();

            temTable.Columns.Add("BankCode", typeof(string));

            temTable.Columns.Add("BranchCode", typeof(string));

            temTableAgcy.Columns.Add("AgencyCode", typeof(string));

            temTableAgcy.Columns.Add("RevenueCode", typeof(string));

            cboAgencyTest.EditValueChanged += cboAgencyTest_EditValueChanged;

            cboBankEdt.EditValueChanged += cboBankEdt_EditValueChanged;

            gridView1.DoubleClick += GridView1_DoubleClick;

            bttnUpdate.Click += BttnUpdate_Click;

            Load += OnFormLoad;

            OnFormLoad(null, null);

            SplashScreenManager.CloseForm(false);
        }
Пример #28
0
 private void Accuracy_Summary_Load(object sender, EventArgs e)
 {
     try
     {
         SplashScreenManager.ShowForm(this, typeof(Masters.WaitForm1), true, true, false);
         WindowState = FormWindowState.Maximized;
         checkEditCustomize.Checked = false;
         dbc.BindMonth(lookUpEditMonth);
         dbc.BindYear(lookUpEditYear);
         lookUpEditMonth.EditValue = DateTime.Now.Month;
         lookUpEditYear.EditValue  = DateTime.Now.Year;
         //firstDateOfMonth = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1);
         //lastDateOfMonth = DateTime.Now;
     }
     catch (Exception ex)
     {
         SplashScreenManager.CloseForm(false);
         XtraMessageBox.Show("Something went wrong");
     }
     finally
     {
         SplashScreenManager.CloseForm(false);
     }
 }
Пример #29
0
        public bool CheckConnectionString()
        {
            bool estadoConexion;

            _connectionStringVerification = Cryptography.DecryptStringAes(ConfigurationManager.ConnectionStrings["MainConnection"].ConnectionString);

            var connection = new SqlConnection(_connectionStringVerification);

            try
            {
                connection.Open();
                estadoConexion = true;
            }
            catch
            {
                SplashScreenManager.CloseForm();
                var serverConnectionSettingsFrm = new ServerConnectionSettingsFrm();
                serverConnectionSettingsFrm.ShowDialog();
                serverConnectionSettingsFrm.BringToFront();
                if (serverConnectionSettingsFrm.IsConfig)
                {
                    SplashScreenManager.ShowForm(typeof(SplashScreenFrm), false, false);
                    estadoConexion = true;
                }
                else
                {
                    _connectionStringVerification = null;
                    estadoConexion = false;
                }
            }
            finally
            {
                connection.Close();
            }
            return(estadoConexion);
        }
        private void MostrarOrdenes()
        {
            SplashScreenManager.ShowForm(this, typeof(WaitForm1), true, true, false);
            SplashScreenManager.Default.SetWaitFormDescription("Recopilando informaciòn...");

            double dblImporte = Convert.ToDouble(this.Txt_Importe.Value);

            Service.DataGeneral SDG = new Service.DataGeneral();
            if (MyStuff.UsaWCF == true)
            {
                DT_Proyecto = objWCF.Lista_Proyecto_SaldoAñoAnterior(strCodCompañia,
                                                                     strCodProyecto,
                                                                     strCodCentroCosto,
                                                                     dblImporte,
                                                                     strOrdenesElegidas
                                                                     ).Tables[0];
            }
            else
            {
                DT_Proyecto = SDG.Lista_Proyecto_SaldoAñoAnterior(strCodCompañia,
                                                                  strCodProyecto,
                                                                  strCodCentroCosto,
                                                                  dblImporte,
                                                                  strOrdenesElegidas
                                                                  ).Tables[0];
            }
            this.Grd_mvto_Mayor_FuenteFinanciamiento.DataSource = DT_Proyecto;
            if (blnMuestraFormato == true)
            {
                blnMuestraFormato = false;
                this.FormatoGrid();
            }

            this.AdicionaImagenesGrilla();
            SplashScreenManager.CloseForm();
        }