Пример #1
0
 public void UnloadControl(UnloadFinanceControlEventArgs unloadFinanceControlEventArgs)
 {
     if (ui != null)
     {
         ui.UnloadControl(unloadFinanceControlEventArgs);
     }
 }
Пример #2
0
 public void UnloadControl(UnloadFinanceControlEventArgs e)
 {
     if (gui != null)
     {
         gui.UnloadControl(e);
     }
 }
Пример #3
0
 public void UnloadControl(UnloadFinanceControlEventArgs unloadFinanceControlEventArgs)
 {
     ctx.TreeNode.TreeView.AfterSelect += TreeViewOnAfterSelect;
     ctx.TreeNode.Nodes.Clear();
     gui.Dispose();
     gui = null;
 }
Пример #4
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="e"></param>
        public void UnloadControl(UnloadFinanceControlEventArgs e)
        {
            NameValueList settings = ctx.Settings.Get(this);

            for (int i = 0; i < grid.Columns.Count; i++)
            {
                settings[string.Format("GridColumn{0}", i)] = grid.Columns[i].Width.ToString();
            }
            settings["ShowAll"]    = checkBox1.Checked ? "true" : "false";
            settings["FilterDate"] = dateTimePicker1.Value.Ticks.ToString();
        }
Пример #5
0
 public void UnloadControl( UnloadFinanceControlEventArgs e )
 {
     if( ctx == null || ctx.TreeNode == null ) {
         return;
     }
     NameValueList settings = ctx.Settings.Get( this );
     settings[ "SelectedAccount" ] = "";
     if( ac != null ) {
         ac.UnloadControl( e );
         settings[ "SelectedAccount" ] = ac.AccountID.ToString();
     }
     ctx.TreeNode.TreeView.AfterSelect -= TreeViewOnAfterSelect;
     ctx.TreeNode.Nodes.Clear();
 }
Пример #6
0
        public void UnloadControl(UnloadFinanceControlEventArgs e)
        {
            if (ctx == null || ctx.TreeNode == null)
            {
                return;
            }
            NameValueList settings = ctx.Settings.Get(this);

            settings["SelectedAccount"] = "";
            if (ac != null)
            {
                ac.UnloadControl(e);
                settings["SelectedAccount"] = ac.AccountID.ToString();
            }
            ctx.TreeNode.TreeView.AfterSelect -= TreeViewOnAfterSelect;
            ctx.TreeNode.Nodes.Clear();
        }
Пример #7
0
        /// <summary>
        /// This method is called when the btnNewBill's Click event has been fired.
        /// </summary>
        /// <param name="sender">The <see cref="object"/> that fired the event.</param>
        /// <param name="e">The <see cref="EventArgs"/> of the event.</param>
        private void btnNewBill_Click(object sender, EventArgs e)
        {
            if (changed)
            {
                UnloadFinanceControlEventArgs ce = new UnloadFinanceControlEventArgs();
                UnloadControl(ce);
                if (ce.Cancel)
                {
                    return;
                }
            }
            bill = null;
            Bill b = new Bill();

            b.GuestLastReadingTicks    = dpGuestCurrentReading.Value.Ticks;
            b.GuestCurrentReadingTicks = DateTime.Now.Ticks;
            b.GuestPartInGroundFee     = cbFeePart.SelectedIndex;
            b.GuestLastReadingKWh      = tbGuestCurrentReadingkWh.Value;
            //Bills.Add( bill );
            LoadBill(b);
            changed = false;
        }
Пример #8
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="e"></param>
 public void UnloadControl(UnloadFinanceControlEventArgs e)
 {
     if (changed)
     {
         DialogResult dr = MessageBox.Show(this, "Vill du spara dina ändringar?", "Spara ändringar?", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button3);
         if (dr == DialogResult.Cancel)
         {
             e.Cancel = true;
             return;
         }
         if (dr == DialogResult.Yes)
         {
             Save();
         }
     }
     if (context.TreeNode.ContextMenu != null)
     {
         context.TreeNode.ContextMenu.Dispose();
         context.TreeNode.ContextMenu = null;
     }
     ContentPersistentForm.Settings.ActiveBillIndex = cbPreviousBills.SelectedIndex;
     ContentPersistentForm.Settings["AddVAT"]       = cbAddVAT.Checked ? "true" : "false";
     ContentPersistentForm.Settings.Save();
 }
Пример #9
0
 public void UnloadControl(UnloadFinanceControlEventArgs e)
 {
 }
Пример #10
0
 public void UnloadControl( UnloadFinanceControlEventArgs unloadFinanceControlEventArgs )
 {
     ctx.TreeNode.TreeView.AfterSelect += TreeViewOnAfterSelect;
     ctx.TreeNode.Nodes.Clear();
     gui.Dispose();
     gui = null;
 }
Пример #11
0
 public void UnloadControl( UnloadFinanceControlEventArgs unloadFinanceControlEventArgs )
 {
 }
 public void UnloadControl( UnloadFinanceControlEventArgs unloadFinanceControlEventArgs )
 {
     if( ui != null ) {
         ui.UnloadControl( unloadFinanceControlEventArgs );
     }
 }
 /// <summary>
 /// This method is called when the btnNewBill's Click event has been fired.
 /// </summary>
 /// <param name="sender">The <see cref="object"/> that fired the event.</param>
 /// <param name="e">The <see cref="EventArgs"/> of the event.</param>
 private void btnNewBill_Click( object sender, EventArgs e )
 {
     if( changed ) {
         UnloadFinanceControlEventArgs ce = new UnloadFinanceControlEventArgs();
         UnloadControl( ce );
         if( ce.Cancel ) {
             return;
         }
     }
     bill = null;
     Bill b = new Bill();
     b.GuestLastReadingTicks = dpGuestCurrentReading.Value.Ticks;
     b.GuestCurrentReadingTicks = DateTime.Now.Ticks;
     b.GuestPartInGroundFee = cbFeePart.SelectedIndex;
     b.GuestLastReadingKWh = tbGuestCurrentReadingkWh.Value;
     //Bills.Add( bill );
     LoadBill( b );
     changed = false;
 }
 /// <summary>
 /// 
 /// </summary>
 /// <param name="e"></param>
 public void UnloadControl( UnloadFinanceControlEventArgs e )
 {
     if( changed ) {
         DialogResult dr = MessageBox.Show( this, "Vill du spara dina ändringar?", "Spara ändringar?", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button3 );
         if( dr == DialogResult.Cancel ) {
             e.Cancel = true;
             return;
         }
         if( dr == DialogResult.Yes ) {
             Save();
         }
     }
     if( context.TreeNode.ContextMenu != null ) {
         context.TreeNode.ContextMenu.Dispose();
         context.TreeNode.ContextMenu = null;
     }
     ContentPersistentForm.Settings.ActiveBillIndex = cbPreviousBills.SelectedIndex;
     ContentPersistentForm.Settings[ "AddVAT" ] = cbAddVAT.Checked ? "true" : "false";
     ContentPersistentForm.Settings.Save();
 }