Exemple #1
0
        public void Form1_Load(object sender, EventArgs e)
        {
            string safepath = "C:\\Program Files\\Business architecture\\PeredatchikPSBR";

            settings.safepath_1(safepath);

            Cursor.Current    = Cursors.Default;
            textBox1.ReadOnly = true;
            textBox1.Text     = Convert.ToString(pp.Date1());


            DBUtils.Datasource1 = Convert.ToString(Form6.ReadSetting("datasource"));
            DBUtils.Database1   = Convert.ToString(Form6.ReadSetting("database"));
            DBUtils.Username1   = Convert.ToString(Form6.ReadSetting("username"));
            DBUtils.Password1   = Convert.ToString(Form6.ReadSetting("password"));

            this.Size = new Size(1500, 800);

            DG.Bounds             = new Rectangle(10, 80, 1460, 650);
            DG.Anchor             = ((AnchorStyles)(((AnchorStyles.Top | AnchorStyles.Left) | AnchorStyles.Right | AnchorStyles.Bottom)));
            DG.AllowUserToAddRows = false;
            this.Controls.Add(DG);


            if (DBUtils.Datasource1 != null && DBUtils.Database1 != null && DBUtils.Username1 != null && DBUtils.Password1 != null)
            {
                GetCurrentPP();
            }

            else
            {
                MessageBox.Show("К локальной/сетевой базе данных не удалось подключиться");
            }
        }
Exemple #2
0
        private void сформироватьED101ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            string EDno = pp.GetEDNo();

            DateTime dt      = DateTime.Now;
            string   curDate = dt.ToShortDateString();

            String curentyear  = dt.ToString("yyyy");
            String curentmonth = dt.ToString("MM");
            String curentday   = dt.ToString("dd");

            string fulldate = curentyear + "-" + curentmonth + "-" + curentday;

            string currentday = Convert.ToString(Form6.ReadSetting("currentday"));

            try
            {
                if (textBox10.Text != "" && textBox5.Text != "" && textBox24.Text != "" && textBox26.Text != "")
                {
                    //MessageBox.Show("Платежное поручение в формате Ed101");
                    createPP.Ed101(fulldate, currentday, EDno, UIS, createPP.P0, createPP.P4, createPP.P6, createPP.P60, createPP.P102, createPP.P7, createPP.P8, createPP.P9, createPP.P10, createPP.P11, createPP.P12, createPP.P101, createPP.P13, createPP.P14, createPP.P15, createPP.P17, createPP.P61, createPP.P103, createPP.P16, createPP.P21, createPP.P24, createPP.P5, createPP.P22, createPP.P104, createPP.P105, createPP.P106, createPP.P107, createPP.P108, createPP.P109, createPP.P110);
                }
                else
                {
                    if (textBox10.Text == "")
                    {
                        textBox10.BackColor = Color.Fuchsia;
                    }

                    if (textBox5.Text == "")
                    {
                        textBox5.BackColor = Color.Fuchsia;
                    }

                    if (textBox24.Text == "")
                    {
                        textBox24.BackColor = Color.Fuchsia;
                    }

                    if (textBox26.Text == "")
                    {
                        textBox26.BackColor = Color.Fuchsia;
                    }
                }
            }

            finally
            {
            }
        }
Exemple #3
0
        private void checkBox1_CheckedChanged(object sender, EventArgs e)
        {
            //string datasource = @"DESKTOP-9H4S4ED\SQLEXPRESS";
            //string database = "ps_bankrussia";
            //string username = "******";
            //string password = "******";

            if (checkBox1.Checked == true)
            {
                textBox1.ReadOnly = true;
                textBox2.ReadOnly = true;
                textBox3.ReadOnly = true;
                textBox4.ReadOnly = true;
                button1.Visible   = false;

                DBUtils.Datasource1 = Convert.ToString(Form6.ReadSetting("datasource"));
                DBUtils.Database1   = Convert.ToString(Form6.ReadSetting("database"));
                DBUtils.Username1   = Convert.ToString(Form6.ReadSetting("username"));
                DBUtils.Password1   = Convert.ToString(Form6.ReadSetting("password"));


                textBox1.Text = DBUtils.Datasource1;
                textBox2.Text = DBUtils.Database1;
                textBox3.Text = DBUtils.Username1;
                textBox4.Text = DBUtils.Password1;
            }

            else
            {
                textBox1.ReadOnly = false;
                textBox2.ReadOnly = false;
                textBox3.ReadOnly = false;
                textBox4.ReadOnly = false;
                button1.Visible   = true;
            }
        }
Exemple #4
0
        private void Form3_Load(object sender, EventArgs e)
        {
            string currentUIS = Convert.ToString(Form6.ReadSetting("UIS"));

            textBox1.Text = currentUIS;
        }