Ejemplo n.º 1
0
        public FrmMasterDetailDt(FormDesigner frmDesigner)
        {
            InitializeComponent();
            this._data = frmDesigner.Data;
            InitActionCommand();
            _data.SetDetailValue += new EventHandler(_data_SetDetailValue);
            //frmDesigner.setStaticFilter();
            this._frmDesigner              = frmDesigner;
            this._bindingSource            = frmDesigner.bindingSource;
            _bindingSource.CurrentChanged += new EventHandler(_bindingSource_CurrentChanged);

            //dataNavigatorMain.DataSource = this._bindingSource;
            dxErrorProviderMain.DataSource  = this._bindingSource;
            bindingNavigator1.BindingSource = _bindingSource;
            bindingNavigator1.ItemClicked  += new ToolStripItemClickedEventHandler(bindingNavigator1_ItemClicked);
            InitializeLayout();
            this.Load += new EventHandler(FrmMasterDetailCt_Load);
            if (Config.GetValue("Language").ToString() == "1")
            {
                DevLocalizer.Translate(this);
            }
            //dataNavigatorMain.PositionChanged += new EventHandler(dataNavigatorMain_PositionChanged);
            AddICDTData(_data);
            this.WindowState = FormWindowState.Maximized;
            if (_data._dtDtReport != null)
            {
                glReport.Properties.DataSource   = _data._dtDtReport;
                glReport.Properties.ButtonClick += new DevExpress.XtraEditors.Controls.ButtonPressedEventHandler(glReport_ButtonClick);
            }
        }
Ejemplo n.º 2
0
        public FrmSingleDt(FormDesigner frmDesigner)
        {
            InitializeComponent();

            this._data = frmDesigner.Data;

            this._frmDesigner = frmDesigner;
            AddICDTData(_data);
            this._bindingSource                        = frmDesigner.bindingSource;
            dataNavigatorMain.DataSource               = this._bindingSource;
            dxErrorProviderMain.DataSource             = this._bindingSource;
            this._data.DsData.Tables[0].ColumnChanged += Table_ColumnChanged;
            InitializeLayout();
            this.Load += new EventHandler(FrmSingleDt_Load);
            if (Config.GetValue("Language").ToString() == "1")
            {
                DevLocalizer.Translate(this);
            }
            dataNavigatorMain.PositionChanged         += new EventHandler(dataNavigatorMain_PositionChanged);
            this._data.DsData.Tables[0].ColumnChanged += Table_ColumnChanged;
            foreach (ICDTData pl in _lstICDTData)
            {
                pl.AddEvent();
            }
        }
Ejemplo n.º 3
0
        public ReportFilter(CDTData data)
        {
            InitializeComponent();

            this._data              = data;
            this._frmDesigner       = new FormDesigner(this._data);
            _frmDesigner.formAction = FormAction.Filter;
            this.SetFormCaption();
            this.Load += new EventHandler(ReportFilter_Load);
            if (Config.GetValue("Language").ToString() == "1")
            {
                DevLocalizer.Translate(this);
            }
            fieldCount = _data.DsStruct.Tables[0].Rows.Count;
            if (_data.DsData == null)
            {
                _data.GetData();
            }
            _bindingSource.DataSource      = this._data.DsData.Tables[0];
            _frmDesigner.bindingSource     = _bindingSource;
            dxErrorProviderMain.DataSource = _frmDesigner.bindingSource;
            _bindingSource.AddNew();
            _bindingSource.EndEdit();
            if (fieldCount == 0)
            {
                isNotify = true;
                return;
            }
        }
Ejemplo n.º 4
0
        public CustomBeforePrint(CustomData data, int[] arrIndex)
        {
            InitializeComponent();
            _data       = data;
            _reportFile = data.dsStr.Tables[1].Rows[0]["Report"].ToString();
            _title      = data.dsStr.Tables[0].Rows[0]["DienGiai"].ToString();
            _arrIndex   = arrIndex;
            if (Config.GetValue("Language").ToString() == "1")
            {
                DevLocalizer.Translate(this);
            }

            tbMau = _data.GetReportFile(_data.dsStr.Tables[1].Rows[0]["sysTableID"].ToString());

            if (tbMau == null || tbMau.Rows.Count == 0)
            {
                layoutControlItem8.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
            }
            else
            {
                gridLookUpEdit1.Properties.DataSource = tbMau;
                gridLookUpEdit1.EditValue             = tbMau.Rows[0]["RFile"].ToString();
                layoutControlItem1.Visibility         = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
            }
        }
Ejemplo n.º 5
0
        public FrmSingleDt(CDTData data, BindingSource bs, bool isEdit)
        {
            InitializeComponent();

            this._data              = data;
            this._frmDesigner       = new FormDesigner(this._data);
            _frmDesigner.formAction = FormAction.Edit;
            _bindingSource          = bs;
            //_bindingSource.DataSource = this._data.DsData.Tables[0];
            AddICDTData(_data);
            _frmDesigner.bindingSource                 = _bindingSource;
            dataNavigatorMain.DataSource               = _frmDesigner.bindingSource;
            dxErrorProviderMain.DataSource             = _frmDesigner.bindingSource;
            this._data.DsData.Tables[0].ColumnChanged += Table_ColumnChanged;
            //_data.DsData.Tables[0].Rows[_data.DsData.Tables[0].Rows.Count - 1]["MaKH"] = "XXXX";

            InitializeLayout();
            this.Load += new EventHandler(FrmSingleDt_Load);
            if (Config.GetValue("Language").ToString() == "1")
            {
                DevLocalizer.Translate(this);
            }
            else
            {
                this.dataNavigatorMain.TextStringFormat = "Mục {0} của {1}";
            }
            dataNavigatorMain.PositionChanged         += new EventHandler(dataNavigatorMain_PositionChanged);
            this._data.DsData.Tables[0].ColumnChanged += Table_ColumnChanged;
            foreach (ICDTData pl in _lstICDTData)
            {
                pl.AddEvent();
            }
        }
Ejemplo n.º 6
0
 public BeforePrint(CDTData data, int[] arrIndex)
 {
     InitializeComponent();
     _data       = data;
     _reportFile = _data.DrTable["Report"].ToString();
     _title      = data.dataType == CDTControl.DataType.MasterDetail ? _data.DrTableMaster["DienGiai"].ToString(): _data.DrTable["DienGiai"].ToString();
     _arrIndex   = arrIndex;
     if (Config.GetValue("Language").ToString() == "1")
     {
         DevLocalizer.Translate(this);
     }
     if (_data.dataType == CDTControl.DataType.MasterDetail)
     {
         tbMau = (_data as DataFactory.DataMasterDetail).GetReportFile(_data.DrTable["sysTableID"].ToString());
     }
     if (tbMau == null || tbMau.Rows.Count == 0)
     {
         layoutControlItem8.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
     }
     else
     {
         gridLookUpEdit1.Properties.DataSource = tbMau;
         drMau = tbMau.Rows[0];
         gridLookUpEdit1.EditValue     = tbMau.Rows[0]["RFile"].ToString();
         layoutControlItem1.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
     }
     if (!Boolean.Parse(Config.GetValue("Admin").ToString()))
     {
         this.simpleButtonSuaMau.Visible = false;
     }
     if (Config.GetValue("Language").ToString() == "1")
     {
         DevLocalizer.Translate(this);
     }
 }
Ejemplo n.º 7
0
        public ReportPreview(CDTData data)
        {
            InitializeComponent();

            _data = data;

            InitializeLayout();
            (_data as DataReport).GetDataForReport();
            gridControlReport.DataSource = (_data as DataReport).DtReportData;
            GetColumnsInfo();
            if (Config.GetValue("Language").ToString() == "1")
            {
                DevLocalizer.Translate(this);
            }
            else
            {
                gridViewReport.GroupPanelText = "Bảng nhóm: kéo thả một cột vào đây để nhóm số liệu";
            }
            gridViewReport.BestFitColumns();
            if (Int32.Parse(_data.DrTable["RpType"].ToString()) == 1)
            {
                if ((_data as DataReport).DtReportData.Columns.Contains("TTSX"))
                {
                    gridViewReport.SortInfo.Add(gridViewReport.Columns["TTSX"], DevExpress.Data.ColumnSortOrder.Ascending);
                    gridViewReport.Columns["TTSX"].Visible = false;
                    gridViewReport.Columns[0].Visible      = false;
                }
            }
            //if ((_data as DataReport).DtReportData.Columns.Contains("SoCTGoc"))
            //{
            //    gridViewReport.OptionsBehavior.Editable = true;
            //}
            drDefaultReport = (_data as DataReport).GetDefaultReport();
            GetFormReport();
        }
Ejemplo n.º 8
0
        public FrmMasterDetailDt(CDTData data)
        {
            InitializeComponent();

            this._data = data;
            InitActionCommand();
            _data.SetDetailValue          += new EventHandler(_data_SetDetailValue);
            this._frmDesigner              = new FormDesigner(this._data);
            _frmDesigner.formAction        = FormAction.New;
            _bindingSource.DataSource      = this._data.DsData;
            _bindingSource.CurrentChanged += new EventHandler(_bindingSource_CurrentChanged);

            _frmDesigner.bindingSource = _bindingSource;
            //dataNavigatorMain.DataSource = _frmDesigner.bindingSource;
            bindingNavigator1.BindingSource = _bindingSource;
            bindingNavigator1.ItemClicked  += new ToolStripItemClickedEventHandler(bindingNavigator1_ItemClicked);
            dxErrorProviderMain.DataSource  = _frmDesigner.bindingSource;
            _bindingSource.AddNew();

            InitializeLayout();
            this.Load += new EventHandler(FrmMasterDetailCt_Load);
            if (Config.GetValue("Language").ToString() == "1")
            {
                DevLocalizer.Translate(this);
            }
            //else
            //this.dataNavigatorMain.TextStringFormat = "Mục {0} của {1}";
            //dataNavigatorMain.PositionChanged += new EventHandler(dataNavigatorMain_PositionChanged);
            if (_data._dtDtReport != null)
            {
                glReport.Properties.DataSource   = _data._dtDtReport;
                glReport.Properties.ButtonClick += new DevExpress.XtraEditors.Controls.ButtonPressedEventHandler(glReport_ButtonClick);
            }
        }
Ejemplo n.º 9
0
 public ChangePassword()
 {
     InitializeComponent();
     if (Config.GetValue("Language").ToString() == "1")
     {
         DevLocalizer.Translate(this);
     }
 }
Ejemplo n.º 10
0
 private void radioGroupLanguage_SelectedIndexChanged(object sender, EventArgs e)
 {
     LanguageForPackage(radioGroupLanguage.SelectedIndex == 0);
     try
     {
         _sysPackage = new SysPackage();
         _sysPackage.InitDictionary();
         DevLocalizer.Translate(this);
     }
     catch { }
 }
Ejemplo n.º 11
0
 public FrmSingle(CDTData data)
 {
     InitializeComponent();
     this._data = data;
     SetRight();
     this._frmDesigner = new FormDesigner(this._data, _bindingSource);
     InitializeLayout();
     this.Load += new EventHandler(FrmSingle_Load);
     if (Config.GetValue("Language").ToString() == "1")
     {
         DevLocalizer.Translate(this);
     }
 }
Ejemplo n.º 12
0
 public UserConfig()
 {
     InitializeComponent();
     _sysConfig.GetUserConfig();
     if (_sysConfig.DsStartConfig != null)
     {
         IsShow = _sysConfig.DsStartConfig.Tables[0].Rows.Count > 0;
     }
     if (Config.GetValue("Language").ToString() == "1")
     {
         DevLocalizer.Translate(this);
     }
 }
Ejemplo n.º 13
0
 public CheckData(bool isUpdate)
 {
     InitializeComponent();
     _isUpdate = isUpdate;
     if (!_isUpdate)
     {
         this.Text = "Xem lưu vết số liệu";
     }
     if (Config.GetValue("Language").ToString() == "1")
     {
         DevLocalizer.Translate(this);
     }
 }
Ejemplo n.º 14
0
        public About()
        {
            InitializeComponent();
            object packageName = Config.GetValue("PackageName");

            if (packageName != null)
            {
                textEditPackageName.Text = packageName.ToString();
            }
            object version = Config.GetValue("Version");

            if (version != null)
            {
                textEditVersion.Text = version.ToString();
            }
            object copyright = Config.GetValue("Copyright");

            if (copyright != null)
            {
                textEditCopyright.Text = copyright.ToString();
            }
            object vendor = Config.GetValue("Vendor");

            if (vendor != null)
            {
                textEditVendor.Text = vendor.ToString();
            }
            object vendorInfo = Config.GetValue("VendorInfo");

            if (vendorInfo != null)
            {
                memoEditVendorInfo.Text = vendorInfo.ToString();
            }
            object customer = Config.GetValue("CompanyName");

            if (customer != null)
            {
                textEditCustomer.Text = customer.ToString();
            }
            object fbID = Config.GetValue("fbID");

            if (fbID != null)
            {
                tfbID.Text = fbID.ToString();
            }
            if (Config.GetValue("Language").ToString() == "1")
            {
                DevLocalizer.Translate(this);
            }
        }
Ejemplo n.º 15
0
        private void fTaskList_Load(object sender, EventArgs e)
        {
            bool Language = Config.GetValue("Language").ToString() == "1";

            if (bool.Parse(Config.GetValue("Admin").ToString()))
            {
                return;
            }
            gridView1.KeyUp += gridView1_KeyUp;
            //RefreshTaskList();
            if (Language)
            {
                DevLocalizer.Translate(this);
            }
        }
Ejemplo n.º 16
0
        //[HostProtectionAttribute(SecurityAction.LinkDemand, MayLeakOnAbort = true)]

        private void UserConfigAcc_Load(object sender, EventArgs e)
        {
            if (_sysConfig.DsStartConfig.Tables.Count < 1)
            {
                return;
            }
            tb = _sysConfig.DsStartConfig.Tables[0];
            foreach (DataRow dr in tb.Rows)
            {
                try
                {
                    Config.NewKeyValue(dr["_Key"], dr["_Value"]);
                }
                catch (Exception ex)
                {
                }
            }
            groupControl1.Text = Config.GetValue("TenCongTy").ToString();
            tDiachiCty.Text    = Config.GetValue("DiaChiCty").ToString();
            tMST.Text          = Config.GetValue("MaSoThue").ToString();
            tGiamdoc.Text      = Config.GetValue("GiamDoc").ToString();
            tKTT.Text          = Config.GetValue("KeToanTruong").ToString();
            tNguoilap.Text     = Config.GetValue("NguoiLap").ToString();
            tThukho.Text       = Config.GetValue("Thukho").ToString();
            tThuQuy.Text       = Config.GetValue("ThuQuy").ToString();
            //
            sNamLV.EditValue   = int.Parse(Config.GetValue("NamLamViec").ToString());
            dNgayct1.EditValue = DateTime.Parse(Config.GetValue("Khoasolieu").ToString()).AddDays(1);
            dNgayct2.EditValue = DateTime.Parse(Config.GetValue("Khoasolieu1").ToString());
            mQuyetdinh.Text    = Config.GetValue("QuyetDinh").ToString();
            //
            tReportPath.Text  = Config.GetValue("DuongDanBaoCao").ToString();
            tBackupPath.Text  = Config.GetValue("BackupPath").ToString();
            tPrinterName.Text = Config.GetValue("PrinterName").ToString();
            tCert.Text        = Config.GetValue("PublicKey").ToString();
            begin             = false;
            if (Config.GetValue("Language").ToString() == "1")
            {
                DevLocalizer.Translate(this);
            }
        }
Ejemplo n.º 17
0
        public Main(DataRow drUser, DataRow drPackage)
        {
            InitializeComponent();
            sysPackageID = drPackage["sysPackageID"].ToString();
            dbName       = drPackage["DbName"].ToString();
            _sysMenu.SynchronizeMenuWithPlugins(pm);


            InitializeMenu();
            if (sysPackageID == "5")
            {
                DesignLog.SqlError(DateTime.Now.ToLongTimeString());
            }
            barManagerMain.Items.Add(barSubItemHelp);
            barMainMenu.LinksPersistInfo.Add(new DevExpress.XtraBars.LinkPersistInfo(barSubItemHelp));
            barManagerMain.ItemClick += new ItemClickEventHandler(barManagerMain_ItemClick);

            if (Config.GetValue("Language").ToString() == "1")
            {
                DevLocalizer.Translate(this);
                TranslateForMenu();
            }
            this.Disposed += new EventHandler(Main_Disposed);
            InitializeForm(drUser, drPackage);
            // bool supported = false;
            //string RegSupport = Registry.GetValue(H_KEY, "SupportOnline", "false").ToString();
            //if (RegSupport != string.Empty)
            //    supported = Boolean.Parse(RegSupport);

            //if (DateTime.Today.DayOfWeek == DayOfWeek.Monday && !supported)
            //{
            //Startup frm = new Startup();
            //frm.MdiParent = this;
            //frm.Show();
            //    Registry.SetValue(H_KEY, "SupportOnline", true);
            //}
            //else
            //    if (DateTime.Today.DayOfWeek != DayOfWeek.Monday && supported)
            //        Registry.SetValue(H_KEY, "SupportOnline", false);
        }
Ejemplo n.º 18
0
 private void fChonCN_Load(object sender, EventArgs e)
 {
     DevLocalizer.Translate(this);
     gridLookUpEdit1.KeyDown += GridLookUpEdit1_KeyDown;
 }
Ejemplo n.º 19
0
 private void fChonCa_Load(object sender, EventArgs e)
 {
     DevLocalizer.Translate(this);
 }