Ejemplo n.º 1
0
        private void before_button_Click(object sender, RoutedEventArgs e)
        {
            if (index - 1 < 0)
            {
                return;
            }

            removeLbl.Visibility = Visibility.Hidden;
            Object[] obj = dt.Rows[--index].ItemArray;
            this.ID_Lbl.Content       = Codes.MaghazeEstijari + " - " + obj[0].ToString();
            this.date_Lbl.Content     = obj[1].ToString();
            this.textBox1.Text        = obj[2].ToString();
            this.textBox2.Text        = obj[3].ToString();
            this.textBox3.Text        = obj[4].ToString();
            this.textBox4.Text        = obj[5].ToString();
            this.textBox5.Text        = obj[6].ToString();
            this.textBox6.Text        = obj[7].ToString();
            this.textBox7.Text        = obj[8].ToString();
            this.textBox8.Text        = obj[9].ToString();
            this.textBox9.Text        = obj[10].ToString();
            this.textBox10.Text       = obj[11].ToString();
            this.textBox11.Text       = obj[12].ToString();
            this.textBox12.Text       = obj[13].ToString();
            this.textBox13.Text       = obj[14].ToString();
            this.textBox14.Text       = obj[15].ToString();
            this.textBox15.Text       = obj[16].ToString();
            this.textBox16.Text       = obj[17].ToString();
            this.textBox17.Text       = obj[18].ToString();
            this.textBox18.Text       = obj[19].ToString();
            this.textBox19.Text       = obj[20].ToString();
            this.textBox20.Text       = obj[21].ToString();
            this.textBox21.Text       = MyPriceTextBox.doMaskOnce(obj[22].ToString());
            this.textBox22.Text       = MyPriceTextBox.doMaskOnce(obj[23].ToString());
            this.textBox23.Text       = obj[24].ToString();
            this.checkBox1.IsChecked  = (bool)obj[25];
            this.checkBox2.IsChecked  = (bool)obj[26];
            this.checkBox3.IsChecked  = (bool)obj[27];
            this.checkBox4.IsChecked  = (bool)obj[28];
            this.checkBox5.IsChecked  = (bool)obj[29];
            this.checkBox6.IsChecked  = (bool)obj[30];
            this.checkBox7.IsChecked  = (bool)obj[31];
            this.checkBox8.IsChecked  = (bool)obj[32];
            this.checkBox9.IsChecked  = (bool)obj[33];
            this.checkBox10.IsChecked = (bool)obj[34];
            this.checkBox11.IsChecked = (bool)obj[35];
            this.checkBox12.IsChecked = (bool)obj[36];
            this.checkBox13.IsChecked = (bool)obj[37];
            this.checkBox14.IsChecked = (bool)obj[38];
            this.checkBox15.IsChecked = (bool)obj[39];
            this.checkBox16.IsChecked = (bool)obj[40];
            TextRange _RText = new TextRange(this.richTextBox1.Document.ContentStart, this.richTextBox1.Document.ContentEnd);

            _RText.Text             = obj[41].ToString();
            this.txt_Moarefino.Text = obj[42].ToString();
        }
        private void next_button_Click(object sender, RoutedEventArgs e)
        {
            if (index + 1 >= dt.Rows.Count)
            {
                return;
            }

            removeLbl.Visibility = Visibility.Hidden;
            Object[] obj = dt.Rows[++index].ItemArray;
            this.ID_Lbl.Content       = Codes.ApartmanMaskooniForooshi.ToString() + " - " + obj[0].ToString();
            this.date_Lbl.Content     = obj[1].ToString();
            this.textBox1.Text        = obj[2].ToString();
            this.textBox2.Text        = obj[3].ToString();
            this.textBox3.Text        = obj[4].ToString();
            this.textBox4.Text        = obj[5].ToString();
            this.textBox5.Text        = obj[6].ToString();
            this.textBox6.Text        = obj[7].ToString();
            this.textBox7.Text        = obj[8].ToString();
            this.textBox8.Text        = obj[9].ToString();
            this.textBox9.Text        = obj[10].ToString();
            this.textBox10.Text       = obj[11].ToString();
            this.textBox11.Text       = obj[12].ToString();
            this.textBox12.Text       = obj[13].ToString();
            this.textBox13.Text       = obj[14].ToString();
            this.textBox14.Text       = obj[15].ToString();
            this.textBox15.Text       = obj[16].ToString();
            this.textBox16.Text       = obj[17].ToString();
            this.textBox17.Text       = obj[18].ToString();
            this.textBox18.Text       = obj[19].ToString();
            this.textBox19.Text       = obj[20].ToString();
            this.textBox20.Text       = MyPriceTextBox.doMaskOnce(obj[21].ToString());
            this.textBox21.Text       = MyPriceTextBox.doMaskOnce(obj[22].ToString());
            this.checkBox1.IsChecked  = (bool)obj[23];
            this.checkBox2.IsChecked  = (bool)obj[24];
            this.checkBox3.IsChecked  = (bool)obj[25];
            this.checkBox4.IsChecked  = (bool)obj[26];
            this.checkBox5.IsChecked  = (bool)obj[27];
            this.checkBox6.IsChecked  = (bool)obj[28];
            this.checkBox7.IsChecked  = (bool)obj[29];
            this.checkBox8.IsChecked  = (bool)obj[30];
            this.checkBox9.IsChecked  = (bool)obj[31];
            this.checkBox10.IsChecked = (bool)obj[32];
            this.checkBox11.IsChecked = (bool)obj[33];
            this.checkBox12.IsChecked = (bool)obj[34];
            this.checkBox13.IsChecked = (bool)obj[35];
            this.checkBox14.IsChecked = (bool)obj[36];
            this.checkBox15.IsChecked = (bool)obj[37];
            this.checkBox16.IsChecked = (bool)obj[38];
            this.checkBox17.IsChecked = (bool)obj[39];
            this.checkBox18.IsChecked = (bool)obj[40];
            this.checkBox19.IsChecked = (bool)obj[41];
            this.checkBox20.IsChecked = (bool)obj[42];
            this.checkBox21.IsChecked = (bool)obj[43];
            this.checkBox22.IsChecked = (bool)obj[44];
            this.checkBox23.IsChecked = (bool)obj[45];
            this.checkBox24.IsChecked = (bool)obj[46];
            this.checkBox25.IsChecked = (bool)obj[47];
            this.checkBox26.IsChecked = (bool)obj[48];
            this.checkBox27.IsChecked = (bool)obj[49];
            TextRange _RText = new TextRange(this.richTextBox1.Document.ContentStart, this.richTextBox1.Document.ContentEnd);

            _RText.Text         = obj[50].ToString();
            this.textBox22.Text = obj[51].ToString();
        }