Пример #1
0
        private void BtEnregistrer_Click(object sender, EventArgs e)
        {
            this.F6005BindingSource.EndEdit();
            DBf6005BindingSource.EndEdit();
            var F6005 = this.F6005BindingSource.Current as  Model.F6005;

            if (F6005 != null)
            {
                _controller.Save(F6005.MF6005);
            }
            _CurrentF6005 = _controller.CurrentF6005();
            DBf6005BindingSource.DataSource = _CurrentF6005; this.F6005BindingSource.DataSource = new Model.F6005(_CurrentF6005);
        }
Пример #2
0
        public XtraFrmF6005(LiasseController controller)
        {
            _controller = controller;
            InitializeComponent();
            gridView1.CustomRowCellEdit += GridView1OnCustomRowCellEdit;

            _CurrentF6005 = controller.CurrentF6005();
            DBf6005BindingSource.DataSource    = _CurrentF6005;
            this.F6005BindingSource.DataSource = new Model.F6005(_CurrentF6005);
            btEnregistrer.Click += BtEnregistrer_Click;
            btExporter.Click    += BtExporter_Click;
            //this.gridView1.OptionsView.RowAutoHeight = true;
            //colLibelle.AppearanceCell.TextOptions.WordWrap=WordWrap.Wrap;
            repositoryItemComboBox1.Items.Add("P");
            repositoryItemComboBox1.Items.Add("B");
            saveFileDialog1.FileName = controller.GetXmlFileName(this.DBf6005BindingSource.Current);

            string s1 = string.Empty;
            string s  = string.Empty;

            for (int i = 69; i <= 99; i++)

            {
                //s += "if (F600120" + i + " != (F600100" + i + " - F600110" + i + "))" + Environment.NewLine +
                //"msg.Add(\"F600120" + i + " est  invalide ! F600120" + i + " = F600100" + i + " - F600110" + i + "\"); " + Environment.NewLine;


                s += "if (F60051063 + F60051064 - F60051065 - F60051066 - F60051067 < 0 && F600510" + i + " != 0 )" + Environment.NewLine +
                     "msg.Add(\"F600510" + i + " est  invalide ! F60051063 + F60051064 - F60051065 - F60051066 - F60051067 <0 et F600510" + i + " != 0 \"); " + Environment.NewLine;



                //if (F60051955 < 0 || F60051057 != 0)
                //    msg.Add("F60051057 est  invalide ! F60051955 >= 0 Ou F60051057 = 0");

                //if (F60051063 + F60051064 - F60051065 < 0 && F60051066 != 0)
                //    msg.Add("F60051066 est  invalide !   F60051063 + F60051064 - F60051065 <0 et F60051066 !=0");
            }
            s1 = s;
        }