Exemple #1
0
        private void SetCaptions()
        {
            #region this.Text
            switch (_AppendixType)
            {
            case ProductHelper.Appendix.Appendix1:
                this.Text = string.Format("{0} ({1})", WestwindHelper.GetWord("appendix.setup", "Product"), WestwindHelper.GetWord("appendix.appendix1", "Product"));
                break;

            case ProductHelper.Appendix.Appendix2:
                this.Text = string.Format("{0} ({1})", WestwindHelper.GetWord("appendix.setup", "Product"), WestwindHelper.GetWord("appendix.appendix2", "Product"));
                break;

            case ProductHelper.Appendix.Appendix3:
                this.Text = string.Format("{0} ({1})", WestwindHelper.GetWord("appendix.setup", "Product"), WestwindHelper.GetWord("appendix.appendix3", "Product"));
                break;
            }
            #endregion

            colLN.Text = WestwindHelper.GetWord("listview.line", "Tools");

            //colParentDept.Text = WestwindHelper.GetWord("department.parent", "Model");
            colCode.Text     = WestwindHelper.GetWord("appendix.code", "Product");
            colInitial.Text  = WestwindHelper.GetWord("appendix.initial", "Product");
            colName.Text     = WestwindHelper.GetWord("appendix.name", "Product");
            colNameAlt1.Text = WestwindHelper.GetWord(String.Format("language.{0}", LanguageHelper.AlternateLanguage1.Key.ToLower()), "Menu");
            colNameAlt2.Text = WestwindHelper.GetWord(String.Format("language.{0}", LanguageHelper.AlternateLanguage2.Key.ToLower()), "Menu");

            lblCode.Text     = WestwindHelper.GetWordWithColon("appendix.code", "Product");
            lblName.Text     = WestwindHelper.GetWordWithColon("appendix.name", "Product");
            lblNameAlt1.Text = WestwindHelper.GetWordWithColon(String.Format("language.{0}", LanguageHelper.AlternateLanguage1.Key.ToLower()), "Menu");
            lblNameAlt2.Text = WestwindHelper.GetWordWithColon(String.Format("language.{0}", LanguageHelper.AlternateLanguage2.Key.ToLower()), "Menu");

            lblInitial.Text = WestwindHelper.GetWordWithColon("appendix.initial", "Product");
        }
Exemple #2
0
        /// <summary>
        /// 為咗方便 designer view,有啲 Attributes 喺 codebehide 搞
        /// </summary>
        private void SetAttributes()
        {
            toolTip.SetToolTip(butPower, WestwindHelper.GetWord("logout", "Menu"));
            toolTip.SetToolTip(butLanguage, WestwindHelper.GetWord("language.switcher", "Menu"));
            toolTip.SetToolTip(butTheme, WestwindHelper.GetWord("theme.switcher", "Menu"));

            picLogo.BackgroundImage       = new ImageResourceHandle("logo.png");
            picLogo.BackgroundImageLayout = ImageLayout.Zoom;
            picLogo.Cursor = Cursors.Hand;
            picLogo.Click += Logo_OnClick;

            pnlTaskbarLeft.Dock = DockStyle.Left;
            butDrawer.Image     = new IconResourceHandle("24x24.power_24.png");
            butDrawer.Click    += Drawer_OnClick;
            butDrawer.Visible   = false;

            pnlTaskbarRight.Dock = DockStyle.Fill;
            butPower.Image       = new IconResourceHandle(ThemeHelper.GetIconThemed("fa-power-off.32.png"));
            butPower.FlatAppearance.BorderColor = Color.Red;    // 冇效嘅,咩顏色 border 都係 none,唔加就出黑框
            butPower.FlatStyle = FlatStyle.Flat;
            butPower.Click    += Power_OnClick;
            //
            butTheme.Image = new IconResourceHandle(ThemeHelper.GetIconThemed("fa-adjust.32.png"));
            butTheme.FlatAppearance.BorderColor = Color.Red;
            butTheme.FlatStyle = FlatStyle.Flat;
            butTheme.Click    += Theme_OnClick;
            //
            butLanguage.Image = new IconResourceHandle(ThemeHelper.GetIconThemed("zmdi-translate.32.png"));
            butLanguage.FlatAppearance.BorderColor = Color.Red;
            butLanguage.FlatStyle = FlatStyle.Flat;
            SetLanguageMenu();
        }
Exemple #3
0
 /// <summary>
 /// Processes this instance.
 /// </summary>
 private void Process()
 {
     if (radOption1.Checked)
     {
         this.ProcessMigration(false);
     }
     else if (radOption2.Checked)
     {
         MessageBox.Show(
             WestwindHelper.GetWord("member.warning.partialPurged", "Prompt"),
             WestwindHelper.GetWord("dialog.confirmation", "General"),
             MessageBoxButtons.YesNo,
             MessageBoxIcon.Warning,
             new EventHandler(ProcessWithDeletionEventHandler));
     }
     else if (radPurgeAllRecords.Checked)
     {
         //this.ProcessMigration(false);
         //this.PurgeVipRecords();
         // 2021.01.26 paulus: 問多句先 purge
         MessageBox.Show(
             WestwindHelper.GetWord("member.warning.allPurged", "Prompt"),
             WestwindHelper.GetWord("dialog.confirmation", "General"),
             MessageBoxButtons.YesNo,
             MessageBoxIcon.Warning,
             new EventHandler(ProcessPurgeEventHandler));
     }
 }
Exemple #4
0
 private void SetCaptions()
 {
     lblStaffNumber.Text = WestwindHelper.GetWordWithColon("logon.staff", "General");
     lblPassword.Text    = WestwindHelper.GetWordWithColon("logon.password", "General");
     lblZone.Text        = WestwindHelper.GetWordWithColon("logon.zone", "General");
     btnLogon.Text       = WestwindHelper.GetWord("logon", "General");
 }
        private void SetCaptions()
        {
            lblInitial.Text   = WestwindHelper.GetWordWithColon("staff.initial", "Model");
            lblLastName.Text  = WestwindHelper.GetWordWithColon("staff.lastName", "Model");
            lblFirstName.Text = WestwindHelper.GetWordWithColon("staff.firstName", "Model");
            lblName.Text      = WestwindHelper.GetWordWithColon("staff.fullName", "Model");
            lblNameChs.Text   = WestwindHelper.GetWordWithColon(String.Format("language.{0}", LanguageHelper.AlternateLanguage1.Key.ToLower()), "Menu");
            lblNameCht.Text   = WestwindHelper.GetWordWithColon(String.Format("language.{0}", LanguageHelper.AlternateLanguage2.Key.ToLower()), "Menu");
            lblPosition.Text  = WestwindHelper.GetWordWithColon("member.general.job", "Model");

            lblPassword.Text   = WestwindHelper.GetWordWithColon("staff.password", "Model");
            lblStaffGrade.Text = WestwindHelper.GetWordWithColon("staffGroup", "Model");
            lblHiredOn.Text    = WestwindHelper.GetWordWithColon("staff.hiredOn", "Model");

            lblAssistant.Text = WestwindHelper.GetWordWithColon("staff.assistant", "Model");
            lblEmploymen.Text = WestwindHelper.GetWordWithColon("staff.employmentNumber", "Model");
            lblMedical.Text   = WestwindHelper.GetWordWithColon("staff.medicalNumber", "Model");

            lblCreationDate.Text = WestwindHelper.GetWordWithColon("member.general.shop", "Model");
            lblDept.Text         = WestwindHelper.GetWordWithColon("department", "Model");

            //lblURLAddress.Text = WestwindHelper.GetWordWithColon("memberClass", "Model");

            gbxTimeCard.Text       = WestwindHelper.GetWord("staff.timeCard", "Model");
            chkPunch.Text          = WestwindHelper.GetWord("staff.timeCard.punch", "Model");
            chkAdministration.Text = WestwindHelper.GetWord("staff.timeCard.admin", "Model");

            gbxStatus.Text       = WestwindHelper.GetWord("glossary.status", "General");
            lblCreationDate.Text = WestwindHelper.GetWordWithColon("glossary.createdOn", "General");
            lblLastUpdate.Text   = WestwindHelper.GetWordWithColon("glossary.modifiedOn", "General");
            lblStatus.Text       = WestwindHelper.GetWordWithColon("glossary.status", "General");
        }
Exemple #6
0
        private void SetLanguageMenu()
        {
            var localeId   = CookieHelper.CurrentLocaleId;
            var localeList = WestwindHelper.GetLocaleList();

            var i = 0;

            foreach (var item in localeList)
            {
                var menuitem = new MenuItem()
                {
                    Checked = (localeId == item.Key) ? true : false,
                    Index   = i,
                    Tag     = item.Key,
                    Text    = item.Value
                };
                menuitem.Click += Language_OnClick;

                _LanguageMenu.MenuItems.Add(menuitem);
                i++;
            }

            _LanguageMenu.AllowDrop  = true;
            butLanguage.DropDownMenu = _LanguageMenu;
        }
Exemple #7
0
        private void OnButtonClick(object sender, EventArgs e)
        {
            if (sender is Button)
            {
                Button btnCtrl = sender as Button;
                if (btnCtrl != null)
                {
                    switch (btnCtrl.Tag.ToString().ToLower())
                    {
                    case "reload":
                        DoReload();
                        break;

                    case "process":
                        MessageBox.Show(
                            WestwindHelper.GetWord("member.warning.promoteWebMembers", "Prompt"),
                            WestwindHelper.GetWord("dialog.confirmation", "General"),
                            MessageBoxButtons.YesNo,
                            MessageBoxIcon.Warning,
                            new EventHandler(cmdProcessOnClick));
                        break;

                    case "exit":
                        this.Close();
                        break;
                    }
                }
            }
        }
Exemple #8
0
        private void SetCaptions()
        {
            this.Text = WestwindHelper.GetWord("promotion.setup", "Model");

            colLN.Text         = WestwindHelper.GetWord("listview.line", "Tools");
            colWorkplace.Text  = WestwindHelper.GetWord("workplace", "Model");
            colTenderType.Text = WestwindHelper.GetWord("posTenderType", "Model");
            colEventCode.Text  = WestwindHelper.GetWord("promotion.eventCode", "Model");
            colStartDate.Text  = WestwindHelper.GetWord("promotion.startOn", "Model");
            colEndDate.Text    = WestwindHelper.GetWord("promotion.endOn", "Model");
            colFactor.Text     = string.Format("{0} (%)", WestwindHelper.GetWord("promotion.rebate", "Model"));
            colCreatedOn.Text  = WestwindHelper.GetWord("glossary.createdOn", "General");
            colModifiedOn.Text = WestwindHelper.GetWord("glossary.modifiedOn", "General");

            gbxCampaign.Text    = WestwindHelper.GetWord("promotion.campaign", "Model");
            radTender.Text      = WestwindHelper.GetWord("posTenderType", "Model");
            radEvent.Text       = WestwindHelper.GetWord("promotion.event", "Model");
            lblWorkplace.Text   = WestwindHelper.GetWordWithColon("workplace", "Model");
            lblTender.Text      = WestwindHelper.GetWordWithColon("posTenderType", "Model");
            lblEventCode.Text   = WestwindHelper.GetWordWithColon("promotion.eventCode", "Model");
            lblStartDate.Text   = WestwindHelper.GetWordWithColon("promotion.startOn", "Model");
            lblEndDate.Text     = WestwindHelper.GetWordWithColon("promotion.endOn", "Model");
            lblFactorRate.Text  = string.Format("{0} (%)", WestwindHelper.GetWordWithColon("promotion.rebate", "Model"));
            gbxStatus.Text      = WestwindHelper.GetWordWithColon("glossary.status", "General");
            lblCreatedOn.Text   = WestwindHelper.GetWordWithColon("glossary.createdOn", "General");
            lblLastUpdated.Text = WestwindHelper.GetWordWithColon("glossary.modifiedOn", "General");
        }
 private void SetCaptions()
 {
     lblMostBoughtBrands.Text    = WestwindHelper.GetWordWithColon("member.marketing.MFBB", "Model");
     lblMostReadMagazine.Text    = WestwindHelper.GetWordWithColon("member.marketing.MFRM", "Model");
     lblMostUsedCreditCards.Text = WestwindHelper.GetWordWithColon("member.marketing.MFUCC", "Model");
     lblMostVisitedMalls.Text    = WestwindHelper.GetWordWithColon("member.marketing.MFVM", "Model");
 }
Exemple #10
0
        private void SetListViewAns()
        {
            tbrListView.MenuHandle = false;
            tbrListView.DragHandle = false;
            tbrListView.TextAlign  = ToolBarTextAlign.Right;

            ToolBarButton sep = new ToolBarButton();

            sep.Style = ToolBarButtonStyle.Separator;

            #region cmdFilter_Country 下拉選單

            ContextMenu ddlFilter_Country = new ContextMenu();

            using (var ctx = new EF6.RT2020Entities())
            {
                #region 加第一隻,係 default = All
                ddlFilter_Country.MenuItems.Add
                (
                    new MenuItem()
                {
                    Checked = true,
                    Index   = 0,
                    Tag     = Guid.Empty,
                    Text    = WestwindHelper.GetWord("glossary.all", "General")
                }
                );
                #endregion

                #region 加:有 Province 嘅 Countries
                var list   = ctx.Province.Select(x => x.CountryId).Distinct().ToList();
                var listEx = ctx.Country.Where(x => list.Contains(x.CountryId)).OrderBy(x => x.CountryName).ToList();

                foreach (var item in listEx)
                {
                    ddlFilter_Country.MenuItems.Add(
                        new MenuItem()
                    {
                        Checked = false,
                        Tag     = item.CountryId,
                        Text    = LanguageHelper.CurrentLanguageMode == LanguageHelper.LanguageMode.Alt1 ?
                                  item.CountryName_Chs : LanguageHelper.CurrentLanguageMode == LanguageHelper.LanguageMode.Alt2 ?
                                  item.CountryName_Cht :
                                  item.CountryName
                    }
                        );
                }
                #endregion
            }

            ToolBarButton cmdFilter_Country = new ToolBarButton("Filter", WestwindHelper.GetWord("listview.filter", "Tools"));
            cmdFilter_Country.Style        = ToolBarButtonStyle.DropDownButton;
            cmdFilter_Country.Image        = new IconResourceHandle(ThemeHelper.GetIconThemed("16.mdi-filter.png"));
            cmdFilter_Country.DropDownMenu = ddlFilter_Country;

            cmdFilter_Country.MenuClick += new MenuEventHandler(cmdFilter_Country_MenuClick);
            #endregion

            tbrListView.Buttons.Add(cmdFilter_Country);
        }
Exemple #11
0
        private void SetCaptions()
        {
            this.Text = WestwindHelper.GetWord("workplace.setup", "Model");

            cmdDelete.Text    = WestwindHelper.GetWord("edit.delete", "General");
            cmdSave.Text      = WestwindHelper.GetWord("edit.save", "General");
            cmdSaveNew.Text   = WestwindHelper.GetWord("edit.save.new", "General");
            cmdSaveClose.Text = WestwindHelper.GetWord("edit.save.close", "General");

            lblLoc.Text      = WestwindHelper.GetWordWithColon("workplace.code", "Model");
            lblPriority.Text = WestwindHelper.GetWordWithColon("workplace.priority", "Model");
            lblInitial.Text  = WestwindHelper.GetWordWithColon("workplace.initial", "Model");
            lblPassword.Text = WestwindHelper.GetWordWithColon("workplace.password", "Model");
            lblName.Text     = WestwindHelper.GetWordWithColon("workplace.name", "Model");
            lblNameChs.Text  = WestwindHelper.GetWordWithColon(String.Format("language.{0}", LanguageHelper.AlternateLanguage1.Key.ToLower()), "Menu");
            lblNameCht.Text  = WestwindHelper.GetWordWithColon(String.Format("language.{0}", LanguageHelper.AlternateLanguage2.Key.ToLower()), "Menu");
            lblAddress.Text  = WestwindHelper.GetWordWithColon("workplace.address", "Model");
            lblDistrict.Text = WestwindHelper.GetWordWithColon("workplace.district", "Model");
            lblPostal.Text   = WestwindHelper.GetWordWithColon("workplace.postalCode", "Model");

            lblCountry.Text  = WestwindHelper.GetWordWithColon("country", "Model");
            lblProvince.Text = WestwindHelper.GetWordWithColon("province", "Model");
            lblCity.Text     = WestwindHelper.GetWordWithColon("city", "Model");

            lblNature.Text = WestwindHelper.GetWordWithColon("workplaceNature", "Model");
            lblZone.Text   = WestwindHelper.GetWordWithColon("workplaceZone", "Model");
            lblLOO.Text    = WestwindHelper.GetWordWithColon("lineOfOperation", "Model");

            gbxStatus.Text       = WestwindHelper.GetWord("glossary.status", "General");
            lblCreationDate.Text = WestwindHelper.GetWordWithColon("glossary.createdOn", "General");
            lblLastUpdate.Text   = WestwindHelper.GetWordWithColon("glossary.modifiedOn", "General");
            lblStatus.Text       = WestwindHelper.GetWordWithColon("glossary.sync", "General");
        }
Exemple #12
0
        private void SetCaptions()
        {
            #region 配置彈出的 Windows 的 Title 名稱
            switch (AppendixMode)
            {
            case ProductHelper.Appendix.Appendix1:
                this.Text = string.Format("{0} ({1})", WestwindHelper.GetWord("appendix.setup", "Product"), WestwindHelper.GetWord("appendix.appendix1", "Product"));
                break;

            case ProductHelper.Appendix.Appendix2:
                this.Text = string.Format("{0} ({1})", WestwindHelper.GetWord("appendix.setup", "Product"), WestwindHelper.GetWord("appendix.appendix2", "Product"));
                break;

            case ProductHelper.Appendix.Appendix3:
                this.Text = string.Format("{0} ({1})", WestwindHelper.GetWord("appendix.setup", "Product"), WestwindHelper.GetWord("appendix.appendix3", "Product"));
                break;
            }
            #endregion

            lblCode.Text           = WestwindHelper.GetWordWithColon("appendix.code", "Product");
            lblInitial.Text        = WestwindHelper.GetWordWithColon("appendix.initial", "Product");
            lblName.Text           = WestwindHelper.GetWordWithColon("appendix.name", "Product");
            lblNameChs.Text        = WestwindHelper.GetWordWithColon(String.Format("language.{0}", LanguageHelper.AlternateLanguage1.Key.ToLower()), "Menu");
            lblNameCht.Text        = WestwindHelper.GetWordWithColon(String.Format("language.{0}", LanguageHelper.AlternateLanguage2.Key.ToLower()), "Menu");
            lblParentAppendix.Text = WestwindHelper.GetWordWithColon("appendix.parent", "Product");
            lblLastUpdate.Text     = WestwindHelper.GetWordWithColon("glossary.modifiedOn", "General");
            lblCreatedOn.Text      = WestwindHelper.GetWordWithColon("glossary.createdOn", "General");
        }
Exemple #13
0
        /// <summary>
        /// Fills the staff list.
        /// </summary>
        private void FillStaffList()
        {
            string[] textField = new string[] { "StaffNumber", "FullName" };
            string   pattern   = "{0} - {1}";

            string[] orderBy = new string[] { "StaffNumber" };
            StaffEx.LoadCombo(ref cboStaffList, textField, pattern, true, true, WestwindHelper.GetWord("glossary.all", "General"), "Retired = 0", orderBy);
        }
Exemple #14
0
        public static void AppendMenuItem_AppPref(ref ContextMenu ddlViews)
        {
            ddlViews.MenuItems.Add(new MenuItem(WestwindHelper.GetWord("toolbar.preference.save", "Tools"), string.Empty, "Save"));
            ddlViews.MenuItems.Add(new MenuItem(WestwindHelper.GetWord("toolbar.preference.reset", "Tools"), string.Empty, "Reset"));

            ddlViews.MenuItems[0].Icon = new IconResourceHandle("16x16.application_add.png");
            ddlViews.MenuItems[1].Icon = new IconResourceHandle("16x16.application_delete.png");
        }
Exemple #15
0
        private void SetListViewAns_ProvinceFilter()
        {
            ResetProvinceFilter();

            ToolBarButton sep = new ToolBarButton();

            sep.Style = ToolBarButtonStyle.Separator;

            #region cmdFilter_Province 下拉選單

            ContextMenu ddlFilter_Province = new ContextMenu();

            using (var ctx = new EF6.RT2020Entities())
            {
                #region 加第一隻,係 default = All
                ddlFilter_Province.MenuItems.Add
                (
                    new MenuItem()
                {
                    Checked = true,
                    Index   = 0,
                    Tag     = Guid.Empty,
                    Text    = WestwindHelper.GetWord("glossary.all", "General")
                }
                );
                #endregion

                #region 加:有 Province 嘅 Countries
                //var list = ctx.Province.Select(x => x.CountryId).Distinct().ToList();
                //var listEx = ctx.Country.Where(x => list.Contains(x.CountryId)).OrderBy(x => x.CountryName).ToList();
                var list = ctx.Province.Where(x => x.CountryId == _Filter_CountryId).OrderBy(x => x.ProvinceName).AsNoTracking().ToList();
                foreach (var item in list)
                {
                    ddlFilter_Province.MenuItems.Add(
                        new MenuItem()
                    {
                        Checked = false,
                        Tag     = item.ProvinceId,
                        Text    = LanguageHelper.CurrentLanguageMode == LanguageHelper.LanguageMode.Alt1 ?
                                  item.ProvinceName_Chs : LanguageHelper.CurrentLanguageMode == LanguageHelper.LanguageMode.Alt2 ?
                                  item.ProvinceName_Cht :
                                  item.ProvinceName
                    }
                        );
                }
                #endregion
            }

            ToolBarButton cmdFilter_Province = new ToolBarButton("Province", WestwindHelper.GetWord("province", "Model"));
            cmdFilter_Province.Style        = ToolBarButtonStyle.DropDownButton;
            cmdFilter_Province.Image        = new IconResourceHandle(ThemeHelper.GetIconThemed("16.mdi-filter.png"));
            cmdFilter_Province.DropDownMenu = ddlFilter_Province;

            cmdFilter_Province.MenuClick += new MenuEventHandler(cmdFilter_Province_MenuClick);
            #endregion

            ansListView.Buttons.Add(cmdFilter_Province);
        }
Exemple #16
0
        private void OnCommandClick(object sender, EventArgs e)
        {
            if (!IsSelValid())
            {
                return;
            }

            var cmd = (Button)sender;

            switch (cmd.Name)
            {
            case "cmdPreview":
                htmlBox1.Html = RT2020.Reports.Inventory.Journal.List.HTML(txtFrom.Text.Trim(), txtTo.Text.Trim(), FromDate.ToString("yyyy-MM-dd"), ToDate.ToString("yyyy-MM-dd"));
                break;

            case "cmdPDF":
                #region export PDF
                var pdf = RT2020.Reports.Inventory.Journal.List.PDF(txtFrom.Text.Trim(), txtTo.Text.Trim(), FromDate.ToString("yyyy-MM-dd"), ToDate.ToString("yyyy-MM-dd"));

                if (pdf != null)
                {
                    var dl = new FileDownloadGateway();
                    dl.FileName = string.Format("{0}.{1}.pdf", WestwindHelper.GetWord("report.SA1330", "Setting"), DateTime.Now.ToString("yyyyMMddHHmmss"));
                    dl.SetContentType(DownloadContentType.OctetStream);
                    dl.StartBytesDownload(this, pdf);
                }
                break;

                #endregion
            case "cmdExcel":
                #region export Excel
                var xls = RT2020.Reports.Inventory.Journal.List.Excel(txtFrom.Text.Trim(), txtTo.Text.Trim(), FromDate.ToString("yyyy-MM-dd"), ToDate.ToString("yyyy-MM-dd"));

                if (xls != null)
                {
                    var dl = new FileDownloadGateway();
                    dl.FileName = string.Format("{0}.{1}.xlsx", WestwindHelper.GetWord("report.SA1330", "Setting"), DateTime.Now.ToString("yyyyMMddHHmmss"));
                    dl.SetContentType(DownloadContentType.MicrosoftExcel);
                    dl.StartBytesDownload(this, xls);
                }
                break;

                #endregion
            case "cmdPivot":
                #region export PivotTable
                var pvt = RT2020.Reports.Inventory.Journal.List.Pivot(txtFrom.Text.Trim(), txtTo.Text.Trim(), FromDate.ToString("yyyy-MM-dd"), ToDate.ToString("yyyy-MM-dd"));

                if (pvt != null)
                {
                    var dl = new FileDownloadGateway();
                    dl.FileName = string.Format("{0}.{1}.xlsx", WestwindHelper.GetWord("report.SA1330", "Setting"), DateTime.Now.ToString("yyyyMMddHHmmss"));
                    dl.SetContentType(DownloadContentType.MicrosoftExcel);
                    dl.StartBytesDownload(this, pvt);
                }
                break;
                #endregion
            }
        }
        private void SetToolBar()
        {
            this.tbWizardAction.MenuHandle = false;
            this.tbWizardAction.DragHandle = false;
            this.tbWizardAction.TextAlign  = ToolBarTextAlign.Right;
            this.tbWizardAction.Buttons.Clear();
            this.tbWizardAction.ButtonClick -= new ToolBarButtonClickEventHandler(tbWizardAction_ButtonClick);

            ToolBarButton sep = new ToolBarButton();

            sep.Style = ToolBarButtonStyle.Separator;

            // cmdSave
            ToolBarButton cmdNew = new ToolBarButton("New", WestwindHelper.GetWord("edit.new", "General"));

            cmdNew.Tag     = "New";
            cmdNew.Image   = new IconResourceHandle("16x16.ico_16_3.gif");
            cmdNew.Enabled = RT2020.Controls.UserUtility.IsAccessAllowed(EnumHelper.Permission.Write);

            this.tbWizardAction.Buttons.Add(cmdNew);

            // cmdSave
            ToolBarButton cmdSave = new ToolBarButton("Save", WestwindHelper.GetWord("edit.save", "General"));

            cmdSave.Tag     = "Save";
            cmdSave.Image   = new IconResourceHandle("16x16.16_L_save.gif");
            cmdSave.Enabled = RT2020.Controls.UserUtility.IsAccessAllowed(EnumHelper.Permission.Write);

            this.tbWizardAction.Buttons.Add(cmdSave);

            // cmdSaveNew
            ToolBarButton cmdRefresh = new ToolBarButton("Refresh", WestwindHelper.GetWord("edit.refresh", "General"));

            cmdRefresh.Tag   = "refresh";
            cmdRefresh.Image = new IconResourceHandle("16x16.16_L_refresh.gif");

            this.tbWizardAction.Buttons.Add(cmdRefresh);
            this.tbWizardAction.Buttons.Add(sep);

            // cmdDelete
            ToolBarButton cmdDelete = new ToolBarButton("Delete", WestwindHelper.GetWord("edit.delete", "General"));

            cmdDelete.Tag   = "Delete";
            cmdDelete.Image = new IconResourceHandle("16x16.16_L_remove.gif");

            if (_TermsId == Guid.Empty)
            {
                cmdDelete.Enabled = false;
            }
            else
            {
                cmdDelete.Enabled = RT2020.Controls.UserUtility.IsAccessAllowed(EnumHelper.Permission.Delete);
            }

            this.tbWizardAction.Buttons.Add(cmdDelete);

            this.tbWizardAction.ButtonClick += new ToolBarButtonClickEventHandler(tbWizardAction_ButtonClick);
        }
        private void VisibleGridColumn(bool a1, bool a2, bool a3)
        {
            DataGridViewTextBoxColumn colId = new DataGridViewTextBoxColumn();

            colId.DataPropertyName = "DimDetailId";
            colId.Width            = 50;
            colId.Visible          = false;

            dgvCombinationList.Columns.Add(colId);

            DataGridViewTextBoxColumn colLN = new DataGridViewTextBoxColumn();

            colLN.DataPropertyName           = "rownum";
            colLN.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleLeft;
            colLN.HeaderText = WestwindHelper.GetWord("listview.line", "Tools");
            colLN.HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter;
            colLN.Name  = "colLN";
            colLN.Width = 35;

            dgvCombinationList.Columns.Add(colLN);

            if (a1)
            {
                DataGridViewTextBoxColumn colA1 = new DataGridViewTextBoxColumn();
                colA1.DataPropertyName           = "Appendix1";
                colA1.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleLeft;
                colA1.HeaderText = WestwindHelper.GetWord("appendix.appendix1", "Product");
                colA1.HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter;
                colA1.Name = "colA1";

                dgvCombinationList.Columns.Add(colA1);
            }

            if (a2)
            {
                DataGridViewTextBoxColumn colA2 = new DataGridViewTextBoxColumn();
                colA2.DataPropertyName           = "Appendix2";
                colA2.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleLeft;
                colA2.HeaderText = WestwindHelper.GetWord("appendix.appendix2", "Product");
                colA2.HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter;
                colA2.Name = "colA2";

                dgvCombinationList.Columns.Add(colA2);
            }

            if (a3)
            {
                DataGridViewTextBoxColumn colA3 = new DataGridViewTextBoxColumn();
                colA3.DataPropertyName           = "Appendix3";
                colA3.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleLeft;
                colA3.HeaderText = WestwindHelper.GetWord("appendix.appendix3", "Product");
                colA3.HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter;
                colA3.Name = "colA3";

                dgvCombinationList.Columns.Add(colA3);
            }
        }
        private void SetCaptions()
        {
            this.Text = WestwindHelper.GetWord("priceManagementReason.setup", "Model");

            lblCode.Text     = WestwindHelper.GetWordWithColon("priceManagementReason.code", "Model");
            lblName.Text     = WestwindHelper.GetWordWithColon("priceManagementReason.name", "Model");
            lblNameAlt1.Text = WestwindHelper.GetWordWithColon(String.Format("language.{0}", LanguageHelper.AlternateLanguage1.Key.ToLower()), "Menu");
            lblNameAlt2.Text = WestwindHelper.GetWordWithColon(String.Format("language.{0}", LanguageHelper.AlternateLanguage2.Key.ToLower()), "Menu");
        }
 private void SetCaptions()
 {
     lblFixedPrice.Text     = WestwindHelper.GetWordWithColon("discount.fixedPrice", "Product");
     gbxDiscounts.Text      = WestwindHelper.GetWord("discount.discounts", "Product");
     lblFixPriceItem.Text   = WestwindHelper.GetWordWithColon("discount.fixedPriceItem", "Product");
     lblDiscountItem.Text   = WestwindHelper.GetWordWithColon("discount.discountItem", "Product");
     lblNoDiscountItem.Text = WestwindHelper.GetWordWithColon("discount.noDiscountItem", "Product");
     lblStaff.Text          = WestwindHelper.GetWordWithColon("staff", "Model");
 }
        private void SetCaptions()
        {
            lblPicFileName.Text = WestwindHelper.GetWordWithColon("misc.pictureFile", "Product");
            lblPicSize.Text     = WestwindHelper.GetWordWithColon("misc.pictureSize", "Product");

            toolTip1.SetToolTip(btnRefresh, WestwindHelper.GetWord("edit.refresh", "General"));
            toolTip1.SetToolTip(btnFind, WestwindHelper.GetWord("edit.new", "General"));
            toolTip1.SetToolTip(btnDelete, WestwindHelper.GetWord("edit.delete", "General"));
        }
Exemple #22
0
        private void SetFormToolBar()
        {
            this.tbWizardAction.MenuHandle = false;
            this.tbWizardAction.DragHandle = false;
            this.tbWizardAction.TextAlign  = ToolBarTextAlign.Right;
            this.tbWizardAction.Buttons.Clear();
            this.tbWizardAction.ButtonClick -= new ToolBarButtonClickEventHandler(tbWizardAction_ButtonClick);

            ToolBarButton sep = new ToolBarButton();

            sep.Style = ToolBarButtonStyle.Separator;

            // cmdSave
            ToolBarButton cmdNew = new ToolBarButton("New", WestwindHelper.GetWord("edit.new", "General"));

            cmdNew.Tag   = "New";
            cmdNew.Image = new IconResourceHandle("16x16.ico_16_3.gif");

            this.tbWizardAction.Buttons.Add(cmdNew);

            // cmdSave
            ToolBarButton cmdSave = new ToolBarButton("Save", WestwindHelper.GetWord("edit.save", "General"));

            cmdSave.Tag   = "Save";
            cmdSave.Image = new IconResourceHandle("16x16.16_L_save.gif");

            this.tbWizardAction.Buttons.Add(cmdSave);

            // cmdSaveNew
            ToolBarButton cmdRefresh = new ToolBarButton("Refresh", WestwindHelper.GetWord("edit.refresh", "General"));

            cmdRefresh.Tag   = "refresh";
            cmdRefresh.Image = new IconResourceHandle("16x16.16_L_refresh.gif");

            this.tbWizardAction.Buttons.Add(cmdRefresh);
            this.tbWizardAction.Buttons.Add(sep);

            // cmdDelete
            ToolBarButton cmdDelete = new ToolBarButton("Delete", WestwindHelper.GetWord("edit.delete", "General"));

            cmdDelete.Tag   = "Delete";
            cmdDelete.Image = new IconResourceHandle("16x16.16_L_remove.gif");

            if (ProvinceId == System.Guid.Empty)
            {
                cmdDelete.Enabled = false;
            }
            else
            {
                cmdDelete.Enabled = true;
            }

            this.tbWizardAction.Buttons.Add(cmdDelete);

            this.tbWizardAction.ButtonClick += new ToolBarButtonClickEventHandler(tbWizardAction_ButtonClick);
        }
Exemple #23
0
        private void SetCaptions()
        {
            this.Text = WestwindHelper.GetWord("supplier.setup", "Model");
            lblSupplierNumber.Text = WestwindHelper.GetWordWithColon("supplier.number", "Model");

            tabGeneral.Text = WestwindHelper.GetWord("supplier.general", "Model");
            tabAddress.Text = WestwindHelper.GetWord("supplier.address", "Model");
            tabContact.Text = WestwindHelper.GetWord("supplier.contact", "Model");
            tabFinance.Text = WestwindHelper.GetWord("supplier.finance", "Model");
        }
        private void SetCaptions()
        {
            lblAddressType.Text = WestwindHelper.GetWordWithColon("supplierAddressType", "Model");

            lblAddress.Text    = WestwindHelper.GetWordWithColon("supplier.address", "Model");
            lblPostalCode.Text = WestwindHelper.GetWordWithColon("supplier.address.postalCode", "Model");
            lblCountry.Text    = WestwindHelper.GetWordWithColon("country", "Model");
            lblProvince.Text   = WestwindHelper.GetWordWithColon("province", "Model");
            lblCity.Text       = WestwindHelper.GetWordWithColon("city", "Model");
        }
Exemple #25
0
        private void SetCredits()
        {
            this.Text = WestwindHelper.GetWord("help.about", "Menu");

            picLogo.Image = new ImageResourceHandle("RT2020.Logo.jpg");

            textBox2.Text += Environment.NewLine + Environment.NewLine +
                "Credits:" + Environment.NewLine +
                "Arron Tam, Brabara Cheung, David Chen, Ken Fong, Paulus Yeung";
        }
        private void SetCaptions()
        {
            lblAddress.Text = WestwindHelper.GetWordWithColon("staffAddress", "Model");
            lblPostal.Text  = WestwindHelper.GetWordWithColon("staffAddress.postalCode", "Model");
            lblSalary.Text  = WestwindHelper.GetWordWithColon("staff.salary", "Model");
            lblBankAC.Text  = WestwindHelper.GetWordWithColon("staff.bankAccount", "Model");

            lblCountry.Text = WestwindHelper.GetWordWithColon("country", "Model");
            lblState.Text   = WestwindHelper.GetWordWithColon("province", "Model");
            lblCity.Text    = WestwindHelper.GetWordWithColon("city", "Model");
        }
Exemple #27
0
        private void SetCaptions()
        {
            this.Text = WestwindHelper.GetWord("password.setup", "General");

            lblOldPwd.Text = WestwindHelper.GetWordWithColon("password.old", "General");
            lblNewpwd.Text = WestwindHelper.GetWordWithColon("password.new", "General");
            lblComPwd.Text = WestwindHelper.GetWordWithColon("password.confirm", "General");

            btnAccept.Text = WestwindHelper.GetWord("dialog.accept", "General");
            btnCancel.Text = WestwindHelper.GetWord("dialog.cancel", "General");
        }
Exemple #28
0
        private void SetCaptions()
        {
            lblBarcode.Text        = WestwindHelper.GetWordWithColon("barcode", "Product");
            lblBarcodeType.Text    = WestwindHelper.GetWordWithColon("barcode.type", "Product");
            lblPrimaryBarcode.Text = WestwindHelper.GetWordWithColon("barcode.primary", "Product");

            colLN.Text             = WestwindHelper.GetWord("listview.line", "Tools");
            colBarcode.Text        = WestwindHelper.GetWord("barcode", "Product");
            colBarcodeType.Text    = WestwindHelper.GetWord("barcode.type", "Product");
            colPrimaryBarcode.Text = WestwindHelper.GetWord("barcode.primary", "Product");
        }
Exemple #29
0
 private void btnPost_Click(object sender, EventArgs e)
 {
     if (ListViewHelper.CountCheckedItems(ref lvwList) > 0)
     {
         MessageBox.Show(WestwindHelper.GetWordWithQuestionMark("dialog.areYouSure", "General"), WestwindHelper.GetWord("dialog.warning", "General"), MessageBoxButtons.YesNo, MessageBoxIcon.Warning, new EventHandler(DoPost));
     }
     else
     {
         MessageBox.Show(WestwindHelper.GetWord("dialog.noSelectedRecord", "General"), WestwindHelper.GetWord("dialog.information", "General"), MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Exemple #30
0
        private void SetCaptions()
        {
            this.Text = WestwindHelper.GetWord("member.promoteTempMembers", "MenuStrip");

            radOption1.Text         = WestwindHelper.GetWord("member.promoteTempMembers", "Prompt");
            radOption2.Text         = WestwindHelper.GetWord("member.promoteTempMembersWithDelete", "Prompt");
            radPurgeAllRecords.Text = WestwindHelper.GetWord("member.purgeAllMemberRecords", "Prompt");
            gbxOptions.Text         = WestwindHelper.GetWord("glossary.options", "General");
            btnProcess.Text         = WestwindHelper.GetWord("glossary.process", "General");
            btnExit.Text            = WestwindHelper.GetWord("glossary.cancel", "General");
        }