Esempio n. 1
0
        public void Initialize(DeklaritMode mode, DataRow foreignKeys, bool isCopy)
        {
            this.ChangeBinding();
            this.m_ForeignKeys = foreignKeys;
            this.RegisterBindingSources();
            this.m_Mode        = mode;
            this.m_BaseMethods = new GenericFormClass(this.m_FrameworkDescription, this.m_FirstLevelName, "DOKUMENT", this.m_Mode, this.dsDOKUMENTDataSet1, this.dsDOKUMENTDataSet1.DOKUMENT.Columns, this.Controls, this.m_DataGrids, this.m_AutoNumber);
            Binding binding = new Binding("CheckState", this.bindingSourceDOKUMENT, "PS", true);

            binding.Format += new ConvertEventHandler(this.m_BaseMethods.BooleanFormat);
            binding.Parse  += new ConvertEventHandler(this.m_BaseMethods.BooleanParse);
            if (this.checkPS.DataBindings["CheckState"] != null)
            {
                this.checkPS.DataBindings.Remove(this.checkPS.DataBindings["CheckState"]);
            }
            this.checkPS.DataBindings.Add(binding);
            this.m_BaseMethods.FormLoadStyle();
            if ((this.m_BaseMethods.IsUpdate() || this.m_BaseMethods.IsDelete()) || (this.m_BaseMethods.IsSelect() || isCopy))
            {
                this.m_CurrentRow = this.dsDOKUMENTDataSet1.DOKUMENT[0];
            }
            if (this.m_BaseMethods.IsInsert() && !isCopy)
            {
                this.m_CurrentRow = (DOKUMENTDataSet.DOKUMENTRow)((DataRowView)this.bindingSourceDOKUMENT.AddNew()).Row;
                foreach (string str in DataSetUtil.CopyForeignKeyValues(this.m_CurrentRow, foreignKeys))
                {
                    this.m_BaseMethods.SetReadOnly(str, true);
                    this.m_BaseMethods.GetLabelControl(str).Visible = false;
                    this.m_BaseMethods.GetControl(str).Visible      = false;
                }
            }
            this.SetFocusInFirstField();
        }
Esempio n. 2
0
        public void Initialize(DeklaritMode mode, DataRow foreignKeys, bool isCopy)
        {
            this.ChangeBinding();
            this.m_ForeignKeys = foreignKeys;
            this.RegisterBindingSources();
            this.m_Mode        = mode;
            this.m_BaseMethods = new GenericFormClass(this.m_FrameworkDescription, this.m_FirstLevelName, "ZAPOSLENI", this.m_Mode, this.dsZAPOSLENIDataSet1, this.dsZAPOSLENIDataSet1.ZAPOSLENI.Columns, this.Controls, this.m_DataGrids, this.m_AutoNumber);
            Binding binding = new Binding("Text", this.bindingSourceZAPOSLENI, "DATUMZAPOSLENJA", true);

            binding.Format += new ConvertEventHandler(this.m_BaseMethods.DateFormat);
            binding.Parse  += new ConvertEventHandler(this.m_BaseMethods.DateParseNotNull);
            if (this.datePickerDATUMZAPOSLENJA.DataBindings["Text"] != null)
            {
                this.datePickerDATUMZAPOSLENJA.DataBindings.Remove(this.datePickerDATUMZAPOSLENJA.DataBindings["Text"]);
            }
            this.datePickerDATUMZAPOSLENJA.DataBindings.Add(binding);
            this.m_BaseMethods.FormLoadStyle();
            if ((this.m_BaseMethods.IsUpdate() || this.m_BaseMethods.IsDelete()) || (this.m_BaseMethods.IsSelect() || isCopy))
            {
                this.m_CurrentRow = this.dsZAPOSLENIDataSet1.ZAPOSLENI[0];
            }
            if (this.m_BaseMethods.IsInsert() && !isCopy)
            {
                this.m_CurrentRow = (ZAPOSLENIDataSet.ZAPOSLENIRow)((DataRowView)this.bindingSourceZAPOSLENI.AddNew()).Row;
                foreach (string str in DataSetUtil.CopyForeignKeyValues(this.m_CurrentRow, foreignKeys))
                {
                    this.m_BaseMethods.SetReadOnly(str, true);
                    this.m_BaseMethods.GetLabelControl(str).Visible = false;
                    this.m_BaseMethods.GetControl(str).Visible      = false;
                }
            }
            this.SetFocusInFirstField();
        }
Esempio n. 3
0
 public void Initialize(DeklaritMode mode, DataRow foreignKeys, bool isCopy)
 {
     this.ChangeBinding();
     this.m_ForeignKeys = foreignKeys;
     this.RegisterBindingSources();
     this.m_Mode        = mode;
     this.m_BaseMethods = new GenericFormClass(this.m_FrameworkDescription, this.m_FirstLevelName, "ZATVARANJA", this.m_Mode, this.dsZATVARANJADataSet1, this.dsZATVARANJADataSet1.ZATVARANJA.Columns, this.Controls, this.m_DataGrids, this.m_AutoNumber);
     this.m_BaseMethods.FormLoadStyle();
     if ((this.m_BaseMethods.IsUpdate() || this.m_BaseMethods.IsDelete()) || (this.m_BaseMethods.IsSelect() || isCopy))
     {
         this.m_CurrentRow = this.dsZATVARANJADataSet1.ZATVARANJA[0];
         this.textGK1IDGKSTAVKA.ButtonsRight[0].Visible = false;
         this.textGK2IDGKSTAVKA.ButtonsRight[0].Visible = false;
     }
     if (this.m_BaseMethods.IsInsert() && !isCopy)
     {
         this.textGK1IDGKSTAVKA.ButtonsRight[0].Visible = true;
         this.textGK2IDGKSTAVKA.ButtonsRight[0].Visible = true;
         this.m_CurrentRow = (ZATVARANJADataSet.ZATVARANJARow)((DataRowView)this.bindingSourceZATVARANJA.AddNew()).Row;
         foreach (string str in DataSetUtil.CopyForeignKeyValues(this.m_CurrentRow, foreignKeys))
         {
             this.m_BaseMethods.SetReadOnly(str, true);
             this.m_BaseMethods.GetLabelControl(str).Visible = false;
             this.m_BaseMethods.GetControl(str).Visible      = false;
         }
     }
     this.SetFocusInFirstField();
 }
Esempio n. 4
0
 public void SaveAndNew(object sender, EventArgs e)
 {
     if (this.InValidState() && this.RADNOVRIJEMEController.Update(this))
     {
         this.RADNOVRIJEMEController.DataSet = new RADNOVRIJEMEDataSet();
         DataSetUtil.AddEmptyRow(this.RADNOVRIJEMEController.DataSet);
         this.ChangeBinding();
         this.m_CurrentRow = this.RADNOVRIJEMEController.DataSet.RADNOVRIJEME[0];
         DataSetUtil.CopyForeignKeyValues(this.m_CurrentRow, this.m_ForeignKeys);
         this.SetFocusInFirstField();
     }
 }