public Form_SelectStockEditType(Navigation xnav)
 {
     InitializeComponent();
     this.nav = xnav;
     lngRPM.s_btn_EditItemsInStock.Text(btn_EditItemsInStock);
     lngRPM.s_EditStockTakeItems.Text(btn_EditStockTakeItems);
     this.Text = lngRPM.s_Select_StockEdit_Type.s;
 }
 public Form_StockTake_Edit(Navigation xnav, CodeTables.DBTableControl xdbTables)
 {
     InitializeComponent();
     this.nav = xnav;
     dbTables = xdbTables;
     this.Text = lngRPM.s_EditStockTakeItems.s;
     usrc_EditTable1.Text(lngRPM.s_EditStockTake);
 }
Beispiel #3
0
 public startup(Form parent_form, startup_step[] xStep, NavigationButtons.Navigation xnav, Icon xFormIconQuestion)
 {
     sbd = new SampleDB();
     m_parent_form = parent_form;
     Step = xStep;
     nav = xnav;
     m_usrc_Startup = new usrc_Startup(this);
     nav.web_Help = m_usrc_Startup.usrc_web_Help1;
     m_FormIconQuestion = xFormIconQuestion;
 }
Beispiel #4
0
        public Form_Print_A4(InvoiceData xInvoiceData, GlobalData.ePaymentType paymentType, string sPaymentMethod, long durationType, long duration, DateTime_v issue_time, Navigation xnav)
        {
            InitializeComponent();
            nav = xnav;

            this.m_InvoiceData = xInvoiceData;
            this.paymentType = paymentType;
            this.sPaymentMethod = sPaymentMethod;
            this.issue_time = issue_time;
            this.durationType = durationType;
            this.duration = duration;
            lngRPM.s_Template.Text(lbl_Template, ":");
        }
Beispiel #5
0
        public Form_Print_A4(InvoiceData xInvoiceData, GlobalData.ePaymentType paymentType, string sPaymentMethod, string sAmountReceived, string sToReturn, DateTime_v issue_time, NavigationButtons.Navigation xnav)
        {
            InitializeComponent();
            nav = xnav;

            this.m_InvoiceData = xInvoiceData;
            this.paymentType = paymentType;
            this.sPaymentMethod = sPaymentMethod;
            this.sAmountReceived = sAmountReceived;
            this.sToReturn = sToReturn;
            this.issue_time = issue_time;

            lngRPM.s_Template.Text(lbl_Template, ":");
        }
Beispiel #6
0
        public ConnectionDialog(ConnectionDialog_enum ConnectionConnectionDialog_type, DBConnection con, string sTitle, NavigationButtons.Navigation xnav)
        {
            m_Title = sTitle;
            my_ConnectionDialog_enum = ConnectionConnectionDialog_type;
            InitializeComponent();
            nav = xnav;
            usrc_NavigationButtons1.Init(nav);
            usrc_NavigationButtons1.Button_NEXT_Enabled = false;

            if (con.RecentItemsFolder.Length ==0)
            {
                con.RecentItemsFolder = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
            }
            this.cmb_ServerName.RecentItemsFolder = con.RecentItemsFolder;
            this.cmb_DataBaseName.RecentItemsFolder = con.RecentItemsFolder;
            this.cmb_UserName.RecentItemsFolder = con.RecentItemsFolder;

            Y[0] = cmb_DataBaseName.Top;
            Y[1] = rdb_UseWindowsAuthentication.Top;
            Y[2] = rdb_SQL_Server_Authentication.Top;
            Y[3] = cmb_UserName.Top;
            Y[4] = txt_Password.Top;

            m_con = con;
            switch (m_con.DBType)
            {
                case DBConnection.eDBType.MYSQL:
                   rdb_UseWindowsAuthentication.Enabled = false;
                   rdb_SQL_Server_Authentication.Enabled = false;
                   this.radioButton_MicrosoftSQL.Checked = false;
                   this.radioButton_MySqlServer.Checked = true;
                   break;

                case DBConnection.eDBType.MSSQL:
                    this.radioButton_MicrosoftSQL.Checked = true;
                    rdb_UseWindowsAuthentication.Enabled = true;
                    rdb_SQL_Server_Authentication.Enabled = true;
                    if (m_con.WindowsAuthentication)
                    {
                        rdb_UseWindowsAuthentication.Checked = true;
                    }
                    else
                    {
                        rdb_SQL_Server_Authentication.Checked = true;
                    }
                    break;
            }
        }
 public Form_myOrg_Office_Data_FVI_SLO_RealEstateBP(long xOffice_Data_ID,NavigationButtons.Navigation xnav)
 {
     InitializeComponent();
     nav = xnav;
     usrc_NavigationButtons1.Init(nav);
     m_Office_Data_ID = xOffice_Data_ID;
     tbl_FVI_SLO_RealEstateBP = new SQLTable(DBSync.DBSync.DB_for_Tangenta.m_DBTables.GetTable(typeof(FVI_SLO_RealEstateBP)));
     this.Text = lngRPM.s_Edit_Office_Data_FVI_SLO_RealEstateBP.s;
     this.usrc_EditTable1.Title = lngRPM.s_Edit_Office_Data_FVI_SLO_RealEstateBP.s;
     string selection =    @"FVI_SLO_RealEstateBP_$_officed_$_office_$$Name,
                             FVI_SLO_RealEstateBP_$_officed_$_office_$$ShortName,
                             FVI_SLO_RealEstateBP_$$BuildingNumber,
                             FVI_SLO_RealEstateBP_$$BuildingSectionNumber,
                             FVI_SLO_RealEstateBP_$$Community,
                             FVI_SLO_RealEstateBP_$$CadastralNumber,
                             FVI_SLO_RealEstateBP_$$ValidityDate,
                             FVI_SLO_RealEstateBP_$$ClosingTag,
                             FVI_SLO_RealEstateBP_$$SoftwareSupplier_TaxNumber,
                             FVI_SLO_RealEstateBP_$$PremiseType,
                             ID";
     if (usrc_EditTable1.Init(DBSync.DBSync.DB_for_Tangenta.m_DBTables, tbl_FVI_SLO_RealEstateBP, selection, ColumnToOrderBy, false, " where FVI_SLO_RealEstateBP_$_officed_$$ID = " + m_Office_Data_ID.ToString() + " ", null, false,nav))
     {
         if (usrc_EditTable1.RowsCount > 0)
         {
             usrc_EditTable1.AllowUserToAddNew = false;
         }
         else
         {
             usrc_EditTable1.FillInitialDataAndSetInputControls(null);
             usrc_EditTable1.AllowUserToAddNew = true;
         }
     }
     else
     {
         bclose = true;
     }
 }
Beispiel #8
0
        public CreateView_Form(DBTableControl dbTables, SQLTable tbl, TableDockingForm dtF, NavigationButtons.Navigation xnav)
        {
            nav = xnav;
            this.Visible = false;
            bFormCreated = false;
            m_TableDockingForm = dtF;
            m_DBTables = dbTables;
            m_tbl = tbl;
            this.Icon=Properties.Resources.DataView_FormIcon;
            InitializeComponent();
            nmUpDn_Limit.Minimum = 0;
            nmUpDn_Limit.Maximum = 1000000000;
            chk_Limit.Checked = Properties.Settings.Default.bLimit;
            nmUpDn_Limit.Value = Convert.ToDecimal(Properties.Settings.Default.iLimitNumber);
            chk_Descending.Checked = Properties.Settings.Default.b_order_by_ID_desc;

            this.flowLayoutPanel1.Tag = 1;
            this.flowLayoutPanel1.FlowDirection = FlowDirection.LeftToRight;
            this.flowLayoutPanel2.Tag = 2;
            this.flowLayoutPanel2.FlowDirection = FlowDirection.TopDown;

            PictureBox pictureBox_MoveRight = new PictureBox();
            pictureBox_MoveRight.Image = Properties.Resources.MoveRightIcon.ToBitmap();
            pictureBox_MoveRight.Parent = this;
            pictureBox_MoveRight.Left = flowLayoutPanel2.Left + flowLayoutPanel2.Width + 3;
            pictureBox_MoveRight.Top = flowLayoutPanel2.Top + flowLayoutPanel2.Height / 4;
            pictureBox_MoveRight.Width = pictureBox_MoveRight.Image.Size.Width + 6;
            pictureBox_MoveRight.Height = pictureBox_MoveRight.Image.Size.Height + 6;
            pictureBox_MoveRight.Visible = true;
            //pictureBox_MoveRight.Anchor = AnchorStyles.Top | AnchorStyles.Bottom;

            PictureBox pictureBox_MoveLeft = new PictureBox();
            pictureBox_MoveLeft.Image = Properties.Resources.MoveLeftIcon.ToBitmap();
            pictureBox_MoveLeft.Parent = this;
            pictureBox_MoveLeft.Left = flowLayoutPanel2.Left + flowLayoutPanel2.Width + 3;
            pictureBox_MoveLeft.Top = flowLayoutPanel2.Top + flowLayoutPanel2.Height/4 + 30;
            pictureBox_MoveLeft.Width = pictureBox_MoveLeft.Image.Size.Width + 6;
            pictureBox_MoveLeft.Height = pictureBox_MoveLeft.Image.Size.Height + 6;
            pictureBox_MoveLeft.Visible = true;
            //pictureBox_MoveLeft.Anchor = AnchorStyles.Top | AnchorStyles.Bottom;
            //this.pictureBox2.Image = Properties.Resources.MoveLeftIcon.ToBitmap();

            this.flowLayoutPanel1.DragEnter += new DragEventHandler(flowLayoutPanel1_DragEnter);
            this.flowLayoutPanel1.DragDrop += new DragEventHandler(flowLayoutPanel1_DragDrop);
            this.flowLayoutPanel2.DragEnter += new DragEventHandler(flowLayoutPanel1_DragEnter);
            this.flowLayoutPanel2.DragDrop += new DragEventHandler(flowLayoutPanel1_DragDrop);

            if (!bFormCreated)
            {

                int iCtrl = 1;
                m_pTableDockingFormXml = m_DBTables.m_xml.GetTableDockingFormXml(m_tbl.TableName);
                if (m_pTableDockingFormXml == null)
                {
                    m_pTableDockingFormXml = m_DBTables.m_xml.Create_pTableDockingFormXml(m_tbl.TableName);
                    m_DBTables.m_xml.m_xmldata.Add(m_pTableDockingFormXml);
                }
                if (m_pTableDockingFormXml.m_CreateViewFormXml == null)
                {
                    m_pTableDockingFormXml.Create_pCreateViewFormXml();
                }

                m_pTableDockingFormXml.m_CreateViewFormXml.wrect.SetFormPlacement(this);

                // Create DefineView_InputControls with no binding to xml data !
                m_tbl.Create_DefineView_InputControls(null, "", ref m_tbl.DefineView_inpCtrlList, this, this, ref iCtrl);

                //this.DynamicCreateControls(m_DBTables.m_xml.GetCreateViewFormDefaultView(m_tbl.TableName));

                this.DynamicCreateControls(m_pTableDockingFormXml.m_CreateViewFormXml.m_DefaultViewXml);

                bFormCreated = true;
            }
            this.Text = lngRPM.s_DataView_Form.s + m_tbl.lngTableName.s + " (" + m_tbl.TableName + ")";
            tsmi_CreateNew.Text = lngRPM.s_CreateNewView.s;
            tsmi_Select_View.Text = lngRPM.s_SelectView.s;
            tsmi_DeleteView.Text = lngRPM.s_DeleteView.s;
            tsmi_Save.Text =  lngRPM.s_Save.s;
            tsmi_Show.Text = lngRPM.s_Show.s;
            label_PrimaryView.Text = lngRPM.s_PrimaryView.s;
            chk_Limit.Text = lngRPM.s_Limit.s;
            chk_Descending.Text = lngRPM.s_Descending.s;
            grb_ShowLimits.Text = lngRPM.s_View.s;
        }
Beispiel #9
0
        private void btn_Backup_Click(object sender, EventArgs e)
        {
            string BackupFolder = Properties.Settings.Default.BackupFolder;
            string IniFileFolder = Properties.Settings.Default.IniFileFolder;
            string sDBType = Properties.Settings.Default.DBType;
            DBConnectionControl40.DBConnection.eDBType org_eDBType = DBSync.DBSync.m_DBType;
            NavigationButtons.Navigation nav = new NavigationButtons.Navigation();
            nav.btn3_Visible = true;
            nav.btn3_Text = "";
            nav.btn3_Image = Properties.Resources.Exit;

            DBSync.DBSync.DBMan(Main_Form, Program.Reset2FactorySettings.DBConnectionControlXX_EXE, ((Form_Document)Main_Form).m_XmlFileName, IniFileFolder, ref sDBType, ref BackupFolder, nav);
            Properties.Settings.Default.BackupFolder = BackupFolder;
            Properties.Settings.Default.DBType = sDBType;
            Properties.Settings.Default.Save();
        }
        public void Init(Navigation nav)
        {
            if (nav != null)
            {
                if (nav.ExitProgramQuestionInLanguage != null)
                {
                    ExitQuestion = nav.ExitProgramQuestionInLanguage;
                }
                this.m_eButtons = nav.m_eButtons;
                if (nav.m_Auto_NEXT != null)
                {
                    if (this.m_eButtons == Navigation.eButtons.PrevNextExit)
                    {
                        this.Timer_Next = new System.Windows.Forms.Timer(this.components);
                        this.Timer_Next.Interval = nav.m_Auto_NEXT.NextButtonPressedInMiliSeconds;
                        this.Timer_Next.Enabled = true;
                        this.Timer_Next.Tick += Timer_Next_Tick;
                    }
                    else
                    {
                        MessageBox.Show("AUTO_NEXT works only with (this.m_eButtons == Navigation.eButtons.PrevNextExit");
                    }
                }
                btn1.Visible = nav.btn1_Visible;
                btn2.Visible = nav.btn2_Visible;
                btn3.Visible = nav.btn3_Visible;
                btn1.Text = nav.btn1_Text;
                btn1_ToolTip_Text = nav.btn1_ToolTip_Text;
                btn2.Text = nav.btn2_Text;
                btn2_ToolTip_Text = nav.btn2_ToolTip_Text;
                btn3.Text = nav.btn3_Text;
                btn3_ToolTip_Text = nav.btn3_ToolTip_Text;

                btn1.Image = nav.btn1_Image;
                btn2.Image = nav.btn2_Image;
                btn3.Image = nav.btn3_Image;
            }
            else
            {
                this.m_eButtons = Navigation.eButtons.OkCancel;
            }

            switch (this.m_eButtons)
            {
                case Navigation.eButtons.OkCancel:
                    btn2.Visible = false;
                    btn1.Visible = true;
                    btn3.Visible = true;
                    btn1.Image = null;
                    btn3.Image = null;
                    btn1.Text = lngRPM_strings.s_OK;
                    btn3.Text = lngRPM_strings.s_Cancel;
                    break;

                case Navigation.eButtons.PrevNextExit:
                    btn2.Visible = true;
                    break;
            }
        }
Beispiel #11
0
 private void btn_Settings_Click(object sender, EventArgs e)
 {
     NavigationButtons.Navigation nav_Form_ProgramSettings = new NavigationButtons.Navigation();
     nav_Form_ProgramSettings.bDoModal = true;
     nav_Form_ProgramSettings.m_eButtons = NavigationButtons.Navigation.eButtons.OkCancel;
     Form_ProgramSettings edt_Form = new Form_ProgramSettings(this, nav_Form_ProgramSettings);
     edt_Form.ShowDialog();
     edt_Form.Dispose();
 }
Beispiel #12
0
 private bool GetMissingDBSettings(string name)
 {
     MessageBox.Show(this, lngRPM.s_No_DB_Settings_for.s + " " + name);
     NavigationButtons.Navigation nav_FormDBSettings = new Navigation();
     nav_FormDBSettings.bDoModal = true;
     nav_FormDBSettings.m_eButtons = Navigation.eButtons.OkCancel;
     nav_FormDBSettings.eExitResult = Navigation.eEvent.NOTHING;
     repeat_Form_DBSettings:
     nav_FormDBSettings.ChildDialog = new Form_DBSettings(nav_FormDBSettings, Program.AdministratorLockedPassword, Program.MultiuserOperationWithLogin, Program.StockCheckAtStartup);
     nav_FormDBSettings.ShowDialog();
     if (nav_FormDBSettings.eExitResult == Navigation.eEvent.OK)
     {
         Program.AdministratorLockedPassword = ((Form_DBSettings)nav_FormDBSettings.ChildDialog).AdministratorLockedPassword;
         Program.MultiuserOperationWithLogin = ((Form_DBSettings)nav_FormDBSettings.ChildDialog).MultiuserOperationWithLogin;
         Program.StockCheckAtStartup = ((Form_DBSettings)nav_FormDBSettings.ChildDialog).StockCheckAtStartup;
         return true;
     }
     else
     {
         if (MessageBox.Show(this, lngRPM.s_WithoutDatabaseSettingsProgramCanNotRun_ExitOKOrCancel.s, "?", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button2) == DialogResult.OK)
         {
             goto repeat_Form_DBSettings;
         }
         else
         {
             return false;
         }
     }
 }
Beispiel #13
0
 private void Do_TangentaLicence(Navigation nav)
 {
     nav.ShowHelp("Tangenta.Tangenta-LicenseAgreement");
     nav.ChildDialog = new Form_LicenseAgreement(nav);
     nav.ShowDialog();
 }
Beispiel #14
0
 private void Do_TangentaAbout(Navigation nav)
 {
     nav.ShowHelp("Tangenta.Tangenta_about");
     nav.ChildDialog = new Form_Navigate(nav);
     nav.ShowDialog();
 }
Beispiel #15
0
        internal bool SetShopsPricelists(startup myStartup, object oData, Navigation xnav, ref string Err)
        {
            if (m_usrc_InvoiceMan != null)
            {
                if (m_usrc_InvoiceMan.m_usrc_Invoice != null)
                {
                    if (m_usrc_InvoiceMan.m_usrc_Invoice.DBtcn != null)
                    {
                        m_usrc_InvoiceMan.m_usrc_Invoice.Set_eShopsMode(Properties.Settings.Default.eShopsInUse, xnav);
                        if (xnav.eExitResult== Navigation.eEvent.NEXT)
                        {
                            myStartup.eNextStep++;
                            return true;
                        }
                        else if (xnav.eExitResult == Navigation.eEvent.PREV)
                        {
                            myStartup.eNextStep--;
                            return true;
                        }
                        else if (xnav.eExitResult == Navigation.eEvent.EXIT)
                        {
                            myStartup.eNextStep = startup_step.eStep.Cancel;
                            return true;
                        }
                    }
                }
            }

            myStartup.eNextStep++;
            return true;
        }
        private void usrc_NavigationButtons1_ButtonPressed(Navigation.eEvent evt)
        {
            switch (nav.m_eButtons)
            {
                case Navigation.eButtons.OkCancel:

                    switch (evt)
                    {
                        case Navigation.eEvent.OK:
                            nav.eExitResult = evt;
                            if (Button_OK_Click != null)
                            {
                                Button_OK_Click();
                            }
                            break;
                        case Navigation.eEvent.CANCEL:
                            nav.eExitResult = evt;
                            if (Button_Cancel_Click != null)
                            {
                                Button_Cancel_Click();
                            }
                            break;
                    }
                    break;
                case Navigation.eButtons.PrevNextExit:
                    switch (evt)
                    {
                        case Navigation.eEvent.EXIT:
                            nav.eExitResult = evt;
                            if (Button_Cancel_Click != null)
                            {
                                Button_Cancel_Click();
                            }
                            break;
                        case Navigation.eEvent.PREV:
                            nav.eExitResult = evt;
                            if (Button_Cancel_Click != null)
                            {
                                Button_Cancel_Click();
                            }
                            break;
                        case Navigation.eEvent.NEXT:
                            nav.eExitResult = evt;
                            if (usrc_EditTable_PriceList.Changed)
                            {
                                usrc_EditTable_PriceList.Save();
                            }
                            if (Button_OK_Click != null)
                            {
                                Button_OK_Click();
                            }
                            break;
                    }
                    break;
            }
        }
Beispiel #17
0
        private bool Get_FVI(Navigation xnav)
        {
            Program.b_FVI_SLO = false;
            if (myOrg.Address_v!=null)
            {
                if (myOrg.Address_v.Country_ISO_3166_num == TangentaDB.PostAddress_v.SLO_Country_ISO_3166_num)
                {
                    Program.b_FVI_SLO = true;
                    if (Program.bFirstTimeInstallation)
                    {
            Do_Form_FVI_check:
                        xnav.ChildDialog = new Form_FVI_check(xnav);
                        xnav.ShowDialog();
                        if (Program.b_FVI_SLO)
                        {
                            if (xnav.eExitResult == Navigation.eEvent.NEXT)
                            {
            Do_Form_myOrg_Office_Data_FVI_SLO_RealEstateBP:

                                xnav.ChildDialog = new Form_myOrg_Office_Data_FVI_SLO_RealEstateBP(myOrg.myOrg_Office_list[0].Office_Data_ID_v.v, xnav);
                                xnav.ShowDialog();
                                if (xnav.eExitResult == Navigation.eEvent.PREV)
                                {
                                    goto Do_Form_FVI_check;
                                }
                                else if (xnav.eExitResult == Navigation.eEvent.NEXT)
                                {
                                    xnav.ChildDialog = new FiscalVerificationOfInvoices_SLO.Form_Settings(usrc_FVI_SLO1,xnav);
                                    xnav.ShowDialog();
                                    if (xnav.eExitResult == Navigation.eEvent.PREV)
                                    {
                                        goto Do_Form_myOrg_Office_Data_FVI_SLO_RealEstateBP;
                                    }
                                }
                            }
                        }
                    }
                }
            }
            return true;
        }
        public bool Init(SQLTable xtbl_PriceList, bool xbEditUndefined,  eShopType xeShopType,Navigation xnav)
        {
            nav = xnav;
            this.usrc_NavigationButtons1.Init(nav);
            m_eShopType = xeShopType;
            tbl_PriceList = xtbl_PriceList;
            bEditUndefined = xbEditUndefined;
            if (nav!=null)
            {
                if (nav.m_eButtons == Navigation.eButtons.OkCancel)
                {
                    if (m_eShopType == eShopType.ShopB)
                    {
                        usrc_EditTable_Shop_Prices.Title = lngRPM.s_PriceList.s + " " + lngRPM.s_Shop_B.s;
                    }
                    else
                    {
                        usrc_EditTable_Shop_Prices.Title = lngRPM.s_PriceList.s + " " + lngRPM.s_Shop_C.s;
                    }
                }
                else
                {
                    rdb_OnlyValid.Visible = false;
                    rdb_All.Visible = false;
                    rdb_OnlyUnvalid.Visible = false;
                    usrc_EditTable_Shop_Prices.Dispose();
                    usrc_EditTable_Shop_Prices = null;
                    splitContainer1.Panel2Collapsed = true;
                }
            }
            else
            {
                if (m_eShopType == eShopType.ShopB)
                {
                    usrc_EditTable_Shop_Prices.Title = lngRPM.s_PriceList.s + " " + lngRPM.s_Shop_B.s;
                }
                else
                {
                    usrc_EditTable_Shop_Prices.Title = lngRPM.s_PriceList.s + " " + lngRPM.s_Shop_C.s;
                }
            }

            return Init();
        }
Beispiel #19
0
 internal bool Get_Printer(startup myStartup, object oData, Navigation xnav, ref string Err)
 {
     //Insert default templates for Proforma Invoice and for
     if (f_doc.InsertDefault())
     {
         myStartup.eNextStep++;
         return true;
     }
     else
     {
        myStartup.eNextStep = Startup.startup_step.eStep.Cancel;
         return false;
     }
 }