Esempio n. 1
0
 public Form_MainFiscal(usrc_FVI_SLO xusrc_FVI_SLO)
 {
     InitializeComponent();
     m_usrc_FVI_SLO = xusrc_FVI_SLO;
     this.Text = "FURS";
     Init();
 }
        /****** End For DEBUG & TEST PURPOSES ***/
        public FormFURSCommunication(usrc_FVI_SLO Parent, Thread_FVI_Message msg)
        {
            InitializeComponent();

             if (Parent.FursTESTEnvironment)
             {
                lbl_TEST_Environment.Visible = true;
             }
             else
             {
                lbl_TEST_Environment.Visible = false;
             }

            m_usrc_FVI_SLO = Parent;
             m_msg = msg;

             iForm_Default_Height = this.Height;
             iForm_Default_Width = this.Width;

             /****** For DEBUG & TEST PURPOSES ***/
             if (m_usrc_FVI_SLO.DEBUG)
             {
                 default_FormBorderStyle = this.FormBorderStyle;
                 Show_usrc_DEBUG_MessagePreview();
             }
             /****** End For DEBUG & TEST PURPOSES ***/

             //  this.Location = m_parent.ParentForm.Location;
             //   Point p = new Point(m_parent.ParentForm.Width / 2 - this.Width / 2, m_parent.ParentForm.Height / 2 - this.Height / 2);
             //    this.Location = p;
        }
 public Form_EnterData_to_SalesBookInvoice(usrc_FVI_SLO xusrc_FVI_SLO, long Invoice_ID,int FiscalYear, int InvoiceNumber, string xSerialNaumber, string xSetNumber,string xInvoiceNumber, eMode xEmode)
 {
     InitializeComponent();
     m_usrc_FVI_SLO = xusrc_FVI_SLO;
     lngRPM.s_SalesBookInvoice.Text(this);
     m_SerialNumber = xSerialNaumber;
     m_eMode = xEmode;
     switch (m_eMode)
     {
         case eMode.WRITE:
             this.lbl_Msg.Text = "Vpišete podatke iz vezane knjige računov za račun:" + FiscalYear.ToString() + "/" + InvoiceNumber.ToString();
             txt_SerialNumber.Text = Properties.Settings.Default.Last_SalesBookInvoice_SerialNumber;
             nm_UpDown_SetNumber.Value = Convert.ToDecimal(Properties.Settings.Default.Last_SalesBookInvoice_SetNumber);
             txt_InvoiceNumber.Text = m_usrc_FVI_SLO.FURS_InvoiceNumber(InvoiceNumber);
             this.btn_Write.Text = "Zapiši";
             break;
         case eMode.UPDATE:
             txt_SerialNumber.Text = m_SerialNumber;
             try
             {
                 nm_UpDown_SetNumber.Value = Convert.ToDecimal(xSetNumber);
             }
             catch
             {
                 nm_UpDown_SetNumber.Value = 0;
             }
             txt_InvoiceNumber.Text = xInvoiceNumber;
             this.btn_Write.Text = "Popravi";
             this.lbl_Msg.Text = "Popravite podatke iz vezane knjige računov za račun:" + FiscalYear.ToString() + "/" + InvoiceNumber.ToString();
             break;
     }
 }
        public void Init(bool bTest, usrc_FVI_SLO x_usrc_FVI_SLO)
        {
            m_usrc_FVI_SLO = x_usrc_FVI_SLO;
            Test = bTest;

            if (Test)
            {
                lngRPM.s_Furs_Test_Environment.Text(this.lbl_Environment);
                this.lbl_Environment.ForeColor = Color.HotPink;
                this.txt_CertificateFile.Text = Properties.Settings.Default.furscertificateFileName_TEST;
                this.txt_CertificatePassword.Text = Properties.Settings.Default.fursCertPass_TEST;
                this.txt_fursWebServiceURL.Text = Properties.Settings.Default.fursWebServiceURL_TEST;
                this.txt_fursXmlNamespace.Text = Properties.Settings.Default.fursXmlNamespace_TEST;
            }
            else
            {
                lngRPM.s_Furs_Environment.Text(this.lbl_Environment);
                this.lbl_Environment.ForeColor = Color.DarkBlue;
                this.txt_CertificateFile.Text = Properties.Settings.Default.furscertificateFileName;
                this.txt_CertificatePassword.Text = Properties.Settings.Default.fursCertPass;
                this.txt_fursWebServiceURL.Text = Properties.Settings.Default.fursWebServiceURL;
                this.txt_fursXmlNamespace.Text = Properties.Settings.Default.fursXmlNamespace;
            }
            this.usrc_FURS_BussinesPremiseData1.Init(Test, m_usrc_FVI_SLO);
        }
Esempio n. 5
0
        public Form_Settings(usrc_FVI_SLO x_usrc_FVI_SLO,NavigationButtons.Navigation xnav)
        {
            InitializeComponent();
            nav = xnav;
            m_usrc_FVI_SLO = x_usrc_FVI_SLO;
            usrc_NavigationButtons1.Init(nav);
            Properties.Settings.Default.timeOutInSec = SetValue(nm_UpDown_timeOutInSec,Properties.Settings.Default.timeOutInSec);
            Properties.Settings.Default.timeToShowSuccessfulFURSResult = SetValue(this.nm_TimeToShoqSuccessfulFURS_Transaction, Properties.Settings.Default.timeToShowSuccessfulFURSResult);
            Properties.Settings.Default.QRImageWidth = SetValue(this.nm_QRSizeWidth, Properties.Settings.Default.QRImageWidth);
            Properties.Settings.Default.Last_SalesBookInvoice_SetNumber = SetValue(nm_UpDn_SalesBookInvoice_Last_SetNumber, Properties.Settings.Default.Last_SalesBookInvoice_SetNumber);
            Properties.Settings.Default.MAX_SalesBookInvoice_SetNumber = SetValue(nmUpDn_SalesBookInvoice_NumberOfAllSetsWithinOneBook, Properties.Settings.Default.MAX_SalesBookInvoice_SetNumber);
            Properties.Settings.Default.Save();

            lngRPM.s_Furs_Environment.Text(rdb_FURS_Environment);
            lngRPM.s_Furs_Test_Environment.Text(rdb_FURS_TEST_Environment);

            this.rdb_FURS_TEST_Environment.Checked = false;
            this.rdb_FURS_Environment.Checked = false;
            this.usrc_FURS_environment_settings.Init(false, m_usrc_FVI_SLO);
            this.usrc_FURS_environment_settings_TEST.Init(true, m_usrc_FVI_SLO);
            this.txt_SalesBookInvoice_Current_SerialNumber.Text = Properties.Settings.Default.Last_SalesBookInvoice_SerialNumber;
            this.txt_SalesBookInvoice_SerialNumber_Format.Text = Properties.Settings.Default.SalesBookInvoice_SerialNumber_RegularExpression_pattern;
            this.rdb_FURS_TEST_Environment.Checked = false;
            this.rdb_FURS_Environment.Checked = false;
            this.usrc_FURS_environment_settings.Init(false, m_usrc_FVI_SLO);
            this.usrc_FURS_environment_settings_TEST.Init(true, m_usrc_FVI_SLO);
            this.txt_SalesBookInvoice_Current_SerialNumber.Text = Properties.Settings.Default.Last_SalesBookInvoice_SerialNumber;
            this.txt_SalesBookInvoice_SerialNumber_Format.Text = Properties.Settings.Default.SalesBookInvoice_SerialNumber_RegularExpression_pattern;

            if (Properties.Settings.Default.fursTEST_Environment)
            {
                this.rdb_FURS_TEST_Environment.Checked = true;
                this.usrc_FURS_environment_settings.Enabled = false;
                this.usrc_FURS_environment_settings_TEST.Enabled = true;
            }
            else
            {
                this.rdb_FURS_Environment.Checked = true;
                this.usrc_FURS_environment_settings.Enabled = true;
                this.usrc_FURS_environment_settings_TEST.Enabled = false;
            }

            rdb_FURS_TEST_Environment.CheckedChanged += Rdb_FURS_TEST_Environment_CheckedChanged;
            rdb_FURS_Environment.CheckedChanged += Rdb_FURS_Environment_CheckedChanged;
            chk_DebugAndTest.Checked = Properties.Settings.Default.DEBUG;
            chk_DebugAndTest.CheckedChanged += Chk_DebugAndTest_CheckedChanged;
        }
        public Form_SalesBookInvoice_Send(usrc_FVI_SLO xusrc_FVI_SLO, List<InvoiceData> xInvoiceData_List)
        {
            InitializeComponent();
            m_usrc_FVI_SLO = xusrc_FVI_SLO;
            m_InvoiceData_List = xInvoiceData_List;
            lngRPM.s_SalesBookInvoice_UnsentMsg.Text(this.lbl_SalesBookInvoice_UnsentMsg);
            DataColumn dcol_FinancialYear = new DataColumn("FinancialYear", typeof(int));
            DataColumn dcol_InvoiceNumber = new DataColumn("InvoiceNumber", typeof(string));
            DataColumn dcol_IssueDate_v = new DataColumn("IssueDate_v", typeof(DateTime));
            DataColumn dcol_SalesBookInvoice_SerialNumber = new DataColumn("SalesBookInvoice_SerialNumber", typeof(string));
            DataColumn dcol_SalesBookInvoice_SetNumber = new DataColumn("SalesBookInvoice_SetNumber", typeof(string));
            DataColumn dcol_GrossSum = new DataColumn("GrossSum", typeof(decimal));
            DataColumn dcol_TaxSum = new DataColumn("TaxSum", typeof(decimal));
            DataColumn dcol_NetSum = new DataColumn("NetSum", typeof(decimal));
            DataColumn dcol_BarCodeValue = new DataColumn("BarCodeValue", typeof(string));
            DataColumn dcol_IssuerFirstName = new DataColumn("IssuerFirstName", typeof(string));
            DataColumn dcol_IssuerLastName = new DataColumn("IssuerLastName", typeof(string));

            dt.Columns.Add(dcol_FinancialYear);
            dt.Columns.Add(dcol_InvoiceNumber);
            dt.Columns.Add(dcol_BarCodeValue);
            dt.Columns.Add(dcol_SalesBookInvoice_SerialNumber);
            dt.Columns.Add(dcol_SalesBookInvoice_SetNumber);
            dt.Columns.Add(dcol_IssueDate_v);
            dt.Columns.Add(dcol_GrossSum);
            dt.Columns.Add(dcol_TaxSum);
            dt.Columns.Add(dcol_NetSum);
            dt.Columns.Add(dcol_IssuerFirstName);
            dt.Columns.Add(dcol_IssuerLastName);
            int i = 0;
            int iCount = xInvoiceData_List.Count;
            for (i = 0; i < iCount; i++)
            {
                InvoiceData xinvd = xInvoiceData_List[i];
                DataRow dr = dt.NewRow();
                dr["FinancialYear"] = xinvd.FinancialYear;
                dr["InvoiceNumber"] = xinvd.AddOnDI.m_FURS.FURS_SalesBookInvoice_InvoiceNumber_v.v;
                dr["SalesBookInvoice_SerialNumber"] = xinvd.AddOnDI.m_FURS.FURS_SalesBookInvoice_SetNumber_v.v;
                dr["SalesBookInvoice_SetNumber"] = xinvd.AddOnDI.m_FURS.FURS_SalesBookInvoice_SetNumber_v.v;
                dr["IssueDate_v"] = xinvd.IssueDate_v.v;
                dr["GrossSum"] = xinvd.GrossSum;
                dr["TaxSum"] = xinvd.taxsum;
                dr["NetSum"] = xinvd.NetSum;
                dr["IssuerFirstName"] = xinvd.Invoice_Author.FirstName;
                dr["IssuerLastName"] = xinvd.Invoice_Author.LastName;
                dt.Rows.Add(dr);
            }
            dgvx_SalesBookInvoice_Unsent.DataSource = dt;
            dgvx_SalesBookInvoice_Unsent.Columns["FinancialYear"].HeaderText = lngRPM.s_FinancialYear.s;
            dgvx_SalesBookInvoice_Unsent.Columns["InvoiceNumber"].HeaderText = lngRPM.s_InvoiceNumber.s;
            dgvx_SalesBookInvoice_Unsent.Columns["SalesBookInvoice_SerialNumber"].HeaderText = lngRPM.s_SalesBook_SerialNumber.s; ;
            dgvx_SalesBookInvoice_Unsent.Columns["SalesBookInvoice_SetNumber"].HeaderText = lngRPM.s_SalesBook_SetNumber.s;
            dgvx_SalesBookInvoice_Unsent.Columns["IssueDate_v"].HeaderText = lngRPM.s_IssueDate.s;
            dgvx_SalesBookInvoice_Unsent.Columns["GrossSum"].HeaderText = lngRPM.s_GrossSum.s;
            dgvx_SalesBookInvoice_Unsent.Columns["TaxSum"].HeaderText = lngRPM.s_TaxSum.s;
            dgvx_SalesBookInvoice_Unsent.Columns["NetSum"].HeaderText = lngRPM.s_NetSum.s;
            dgvx_SalesBookInvoice_Unsent.Columns["IssuerFirstName"].HeaderText = lngRPM.s_Issuer_FirstName.s;
            dgvx_SalesBookInvoice_Unsent.Columns["IssuerLastName"].HeaderText = lngRPM.s_Issuer_LastName.s;
            DataGridViewDisableButtonColumn dgvbcol = new DataGridViewDisableButtonColumn();
            dgvbcol.Name = "Send";
            dgvbcol.HeaderText = lngRPM.s_SendtoDurs.s;
            dgvbcol.Text = lngRPM.s_SendtoDurs.s;
            dgvbcol.ValueType = typeof(string);
            dgvbcol.UseColumnTextForButtonValue = true;
            dgvx_SalesBookInvoice_Unsent.Columns.Insert(0, dgvbcol);
            dgvx_SalesBookInvoice_Unsent.CellContentClick += Dgvx_SalesBookInvoice_Unsent_CellContentClick;
            dgvx_SalesBookInvoice_Unsent.CellValueChanged += Dgvx_SalesBookInvoice_Unsent_CellValueChanged;
            dgvx_SalesBookInvoice_Unsent.CurrentCellDirtyStateChanged += Dgvx_SalesBookInvoice_Unsent_CurrentCellDirtyStateChanged;
        }
        public void Init(bool bTest, usrc_FVI_SLO x_usrc_FVI_SLO)
        {
            m_usrc_FVI_SLO = x_usrc_FVI_SLO;
            Test = bTest;
            if (Test)
            {
                this.txt_BuildingNumber.Text = Properties.Settings.Default.fursD_BuildingNumber_TEST;
                this.txt_BuildingSectionNumber.Text = Properties.Settings.Default.fursD_BuildingSectionNumber_TEST;
                this.txt_Community.Text = Properties.Settings.Default.fursD_Community_TEST;
                this.txt_CadastralNumber.Text = Properties.Settings.Default.fursD_CadastralNumber_TEST;
                this.dt_ValidityDate.Value = Properties.Settings.Default.fursD_ValidityDate_TEST;

                this.txt_SoftwareSupplier_TaxNumber.Text = Properties.Settings.Default.fursD_SoftwareSupplierTaxID_TEST;
                this.txt_PremiseType.Text = Properties.Settings.Default.fursD_PremiseType_TEST;
                this.txt_MyOrganisation_TaxID.Text = Properties.Settings.Default.fursD_MyOrgTaxID_TEST;
                this.txt_BussinesPremiseID.Text = Properties.Settings.Default.fursD_BussinesPremiseID_TEST;
                this.txt_InvoiceAuthor_TaxID.Text = Properties.Settings.Default.fursD_InvoiceAuthorTaxID_TEST;

                this.txt_City.Text = Properties.Settings.Default.fursD_City_TEST;
                this.txt_PostNumber.Text = Properties.Settings.Default.fursD_PostNumber_TEST;
                this.txt_StreetNumber.Text = Properties.Settings.Default.fursD_StreetNumber_TEST;
                this.txt_StreetNumberAdt.Text = Properties.Settings.Default.fursD_StreetNumberAdt_TEST;
                this.txt_StreetName.Text = Properties.Settings.Default.fursD_StreetName_TEST;

                if (Properties.Settings.Default.fursD_ClosingTag_TEST == "Z")
                    this.Chk_StoreClosed.Checked = true;
                else
                    this.Chk_StoreClosed.Checked = false;

            }
            else
            {
                this.txt_BuildingNumber.Text = Properties.Settings.Default.fursD_BuildingNumber;
                this.txt_BuildingSectionNumber.Text = Properties.Settings.Default.fursD_BuildingSectionNumber;
                this.txt_Community.Text = Properties.Settings.Default.fursD_Community;
                this.txt_CadastralNumber.Text = Properties.Settings.Default.fursD_CadastralNumber;
                this.dt_ValidityDate.Value = Properties.Settings.Default.fursD_ValidityDate;
                this.txt_SoftwareSupplier_TaxNumber.Text = Properties.Settings.Default.fursD_SoftwareSupplierTaxID;
                this.txt_PremiseType.Text = Properties.Settings.Default.fursD_PremiseType;
                this.txt_MyOrganisation_TaxID.Text = Properties.Settings.Default.fursD_MyOrgTaxID;
                this.txt_BussinesPremiseID.Text = Properties.Settings.Default.fursD_BussinesPremiseID;
                this.txt_InvoiceAuthor_TaxID.Text = Properties.Settings.Default.fursD_InvoiceAuthorTaxID;

                this.txt_City.Text = Properties.Settings.Default.fursD_City;
                this.txt_PostNumber.Text = Properties.Settings.Default.fursD_PostNumber;
                this.txt_StreetNumber.Text = Properties.Settings.Default.fursD_StreetNumber;
                this.txt_StreetNumberAdt.Text = Properties.Settings.Default.fursD_StreetNumberAdt;
                this.txt_StreetName.Text = Properties.Settings.Default.fursD_StreetName;

                if (Properties.Settings.Default.fursD_ClosingTag == "Z")
                    this.Chk_StoreClosed.Checked = true;
                else
                    this.Chk_StoreClosed.Checked = false;

            }

            this.txt_BuildingNumber.ReadOnly = m_ReadOnly;
            this.txt_BuildingSectionNumber.ReadOnly = m_ReadOnly;
            this.txt_Community.ReadOnly = m_ReadOnly;
            this.txt_CadastralNumber.ReadOnly = m_ReadOnly;
            this.dt_ValidityDate.Enabled = !m_ReadOnly;
            this.Chk_StoreClosed.Enabled = !m_ReadOnly;
            this.txt_SoftwareSupplier_TaxNumber.ReadOnly = m_ReadOnly;
            this.txt_PremiseType.ReadOnly = m_ReadOnly;
            this.txt_MyOrganisation_TaxID.ReadOnly = m_ReadOnly;
            this.txt_BussinesPremiseID.ReadOnly = m_ReadOnly;
            this.txt_InvoiceAuthor_TaxID.ReadOnly = m_ReadOnly;
            // this.btn_ImportFromDataBase.Visible = !m_ReadOnly;

            this.txt_City.ReadOnly = m_ReadOnly;
            this.txt_PostNumber.ReadOnly = m_ReadOnly;
            this.txt_StreetNumber.ReadOnly = m_ReadOnly;
            this.txt_StreetNumberAdt.ReadOnly = m_ReadOnly;
            this.txt_StreetName.ReadOnly = m_ReadOnly;
        }