예제 #1
1
 /// <summary>
 /// constructor
 /// </summary>
 public TaskListCheck(XmlNode Node, Ict.Common.Controls.TVisualStylesEnum Style)
 {
     //
     // The InitializeComponent() call is required for Windows Forms designer support.
     //
     InitializeComponent(Node, Style);
 }
예제 #2
0
        /// <summary>
        /// This method is required for Windows Forms designer support.
        /// Do not change the method contents inside the source code editor. The Forms designer might
        /// not be able to load this method if it was changed manually.
        /// </summary>
        private void InitializeComponent(XmlNode node, Ict.Common.Controls.TVisualStylesEnum Style)
        {
            this.taskList1 = new TTaskList(node, Style);
            this.DisableItemButton = new System.Windows.Forms.Button();
            this.HideItemButton = new System.Windows.Forms.Button();
            //this.taskList1.VisualStyle = new Ict.Common.Controls.TVisualStyles(Ict.Common.Controls.TVisualStylesEnum.vsAccordionPanel);
            this.container = new System.Windows.Forms.Panel();
            this.SuspendLayout();
            //
            // taskList1
            //
            this.taskList1.BackColor = System.Drawing.SystemColors.AppWorkspace;
            //this.taskList1.Location = new System.Drawing.Point(100, 50);
            this.taskList1.Name = "taskList1";
            this.taskList1.TabIndex = 0;
            //
            // container
            //

            this.container.BackColor = System.Drawing.SystemColors.AppWorkspace;
            this.container.Location = new System.Drawing.Point(83, 53);
            this.container.Name = "taskListContainer";
            this.container.AutoSize = true;
            this.container.Size = new System.Drawing.Size(150, 150);
            this.container.TabIndex = 0;

            //this.DisableItemButton
            this.DisableItemButton.Location = new System.Drawing.Point(0, 50);
            this.DisableItemButton.Name = "DisableItemButton";
            this.DisableItemButton.Size = new System.Drawing.Size(75, 23);
            this.DisableItemButton.TabIndex = 1;
            this.DisableItemButton.Text = "DisableItemButton";
            this.DisableItemButton.UseVisualStyleBackColor = true;
            this.DisableItemButton.Click += new System.EventHandler(this.DisableItemButtonClick);

            //this.HideItemButton
            this.HideItemButton.Location = new System.Drawing.Point(0, 100);
            this.HideItemButton.Name = "HideItemButton";
            this.HideItemButton.Size = new System.Drawing.Size(75, 23);
            this.HideItemButton.TabIndex = 1;
            this.HideItemButton.Text = "HideItemButton";
            this.HideItemButton.UseVisualStyleBackColor = true;
            this.HideItemButton.Click += new System.EventHandler(this.HideItemButtonClick);
            //
            // TaskListCheck
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(500, 500);
            this.container.Controls.Add(this.taskList1);
            this.Controls.Add(this.container);
            this.Controls.Add(this.DisableItemButton);
            this.Controls.Add(this.HideItemButton);
            this.Name = "TaskListCheck";
            this.Text = "TaskListCheck";
            this.ResumeLayout(false);
        }
        public async Task <IActionResult> OnGetAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            Ict = await _context.Icts.FirstOrDefaultAsync(m => m.Id == id);

            if (Ict == null)
            {
                return(NotFound());
            }
            return(Page());
        }
예제 #4
0
        public async Task <IActionResult> OnPostAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            Ict = await _context.Icts.FindAsync(id);

            if (Ict != null)
            {
                _context.Icts.Remove(Ict);
                await _context.SaveChangesAsync();
            }

            return(RedirectToPage("./Index"));
        }
        private void NewRowManual(ref Ict.Petra.Shared.MFinance.Account.Data.AMethodOfGivingRow ARow)
        {
            string newName = Ict.Common.Catalog.GetString("NEWTYPE");
            Int32 countNewDetail = 0;

            if (FMainDS.AMethodOfGiving.Rows.Find(new object[] { newName }) != null)
            {
                while (FMainDS.AMethodOfGiving.Rows.Find(new object[] { newName + countNewDetail.ToString() }) != null)
                {
                    countNewDetail++;
                }

                newName += countNewDetail.ToString();
            }

            ARow.MethodOfGivingCode = newName;
            ARow.MethodOfGivingDesc = Catalog.GetString("PLEASE ENTER DESCRIPTION");
        }
예제 #6
0
        /// <summary>
        /// Delegate that retrieves the help topic.
        /// </summary>
        /// <param name="ASender"></param>
        /// <param name="AEventArgs"></param>
        /// <returns></returns>
        public static string DetermineHelpTopic(System.Object ASender, Ict.Common.HelpLauncher.TDetermineHelpTopicEventArgs AEventArgs)
        {
            string ReturnValue = String.Empty;
            Form HelpContextForm;
            Control HelpContextControl;
            Cursor FormCursorAtTimeOfCall = null;
            string HelpContext = String.Empty;
            string HelpContextForControl = String.Empty;
            bool HelpTopicFoundForControl = false;

            if (AEventArgs == null)
            {
                throw new ArgumentException("AEventArgs must not be null");
            }

            if (AEventArgs.HelpContextForm == null)
            {
                throw new ArgumentException("The HelpContextForm needs to be specified in the AEventArgs, but it isn't.");
            }
            else
            {
                HelpContextForm = AEventArgs.HelpContextForm;
            }

            // Show Hourglass Cursor
            FormCursorAtTimeOfCall = ((System.Windows.Forms.Form)HelpContextForm).Cursor;
            ((System.Windows.Forms.Form)HelpContextForm).Cursor = Cursors.WaitCursor;

            // Load help topics once and keep it cached from then on.
            if (!FHelpTopicsLookupTableLoaded)
            {
                LoadHelpTopicsLookupTable();
            }

            HelpContextControl = AEventArgs.HelpContextControl;

            HelpContext = HelpContextForm.GetType().Name;

            if (HelpContextControl != null)
            {
                while (!HelpTopicFoundForControl)
                {
                    // We don't support help on TableLayoutPanels as this is too granular, rather use the Parent control of a TableLayoutPanel
                    if (HelpContextControl is TableLayoutPanel)
                    {
                        HelpContextControl = HelpContextControl.Parent;
                    }

                    HelpContextForControl = HelpTopicForHelpContextControl(HelpContextControl);

                    if (HelpContextForControl != String.Empty)
                    {
                        HelpTopicFoundForControl = true;
                    }
                    else
                    {
                        // No help topic found for Control --> go one up in the Control hierarachy and repeat the loop
                        HelpContextControl = HelpContextControl.Parent;

                        if (HelpContextControl is System.Windows.Forms.Form)
                        {
                            HelpContextForControl = HelpTopicForHelpContextForm(HelpContextControl.GetType().Name);
                            break;
                        }
                    }
                }

                ReturnValue = HelpContextForControl;
            }
            else
            {
                // We have only got a Form and no Control --> Return the Form's Help Topic.
                ReturnValue = HelpTopicForHelpContextForm(HelpContext);
            }

            // Reset to originally shown Cursor
            ((System.Windows.Forms.Form)HelpContextForm).Cursor = FormCursorAtTimeOfCall;

            return ReturnValue;
        }
 /// <summary>
 /// Set the given DateTime control to be blank instead of
 /// DateTime.Now if the value is not specified.
 /// </summary>
 private void SetdtpControlManual(Ict.Petra.Client.CommonControls.TtxtPetraDate AControl,
     TVariant AValue)
 {
     if (AValue.IsZeroOrNull())
     {
         AControl.Date = null;
     }
 }
 /// <summary>
 /// Initialisation
 /// </summary>
 public void InitialiseData(Ict.Petra.Client.CommonForms.TFrmPetraUtils APetraUtilsObject)
 {
     // not really needed at the moment. Just needed as dummy code for use in code generation.
 }
예제 #9
0
        public static System.Boolean GetInstalledPatches(out Ict.Petra.Shared.MSysMan.Data.SPatchLogTable APatchLogDT)
        {
            SPatchLogTable TmpTable = new SPatchLogTable();

            APatchLogDT = new SPatchLogTable();
            TDBTransaction ReadTransaction;
            Boolean NewTransaction = false;
            TLogging.LogAtLevel(9, "TSysManServerLookups.GetInstalledPatches called!");

            ReadTransaction = DBAccess.GDBAccessObj.GetNewOrExistingTransaction(IsolationLevel.Serializable,
                TEnforceIsolationLevel.eilMinimum,
                out NewTransaction);

            try
            {
                // Load data
                TmpTable = SPatchLogAccess.LoadAll(ReadTransaction);
            }
            finally
            {
                if (NewTransaction)
                {
                    DBAccess.GDBAccessObj.CommitTransaction();
                    TLogging.LogAtLevel(7, "TSysManServerLookups.GetInstalledPatches: committed own transaction.");
                }
            }

            /* Sort the data...
             */
            TmpTable.DefaultView.Sort = SPatchLogTable.GetDateRunDBName() + " DESC, " +
                                        SPatchLogTable.GetPatchNameDBName() + " DESC";

            /* ...and put it in the output table.
             */
            for (int Counter = 0; Counter < TmpTable.DefaultView.Count; ++Counter)
            {
                TLogging.LogAtLevel(7, "Patch: " + TmpTable.DefaultView[Counter][0]);
                APatchLogDT.ImportRow(TmpTable.DefaultView[Counter].Row);
            }

            return true;
        }
        private void NoMasterDataToSave(object Sender, Ict.Common.TNoMasterDataToSaveEventArgs e)
        {
            TTypedDataTable ChildDTWhoseDataGotSaved;
            bool UCSaveResult;

            // Save the changes in the user control
            UCSaveResult = ucoContactDetail.SaveChanges(out ChildDTWhoseDataGotSaved);

            e.SubmitChangesResult = UCSaveResult ? TSubmitChangesResult.scrOK : TSubmitChangesResult.scrError;
            e.ChildDataTableWhoseDataGotSaved = ChildDTWhoseDataGotSaved;

            FDataSavedInNoMasterDataToSaveEvent = true;
        }
예제 #11
0
 /// <summary>
 /// Get all the installed Patches
 /// </summary>
 /// <param name="APatchLogDT">Table of installed patches</param>
 /// <returns>true</returns>
 public static Boolean GetInstalledPatches(out Ict.Petra.Shared.MSysMan.Data.SPatchLogTable APatchLogDT)
 {
     return TRemote.MSysMan.Application.WebConnectors.GetInstalledPatches(out APatchLogDT);
 }
 /// <summary>
 /// Adds an event to the txtAutoPopulatedButtonLabel
 /// </summary>
 /// <param name="AEventHandler">Partner changed event handler</param>
 public void AddConfernceKeyChangedEventHandler(Ict.Petra.Client.CommonControls.TDelegatePartnerChanged AEventHandler)
 {
     txtConference.ValueChanged += AEventHandler;
 }
        /// <summary>
        /// Call from ShowDetailsManual after ACurrentDetailRow is known to be non-NULL
        /// </summary>
        public static void FinishShowDetailsManual(GiftBatchTDSAGiftDetailRow ACurrentDetailRow, TCmbAutoPopulated ACmbMotivationDetailCode,
            TtxtAutoPopulatedButtonLabel ATxtDetailRecipientKey, TtxtAutoPopulatedButtonLabel AtxtDetailRecipientLedgerNumber,
            TextBox ATxtDetailCostCentreCode, TextBox ATxtDetailAccountCode, Ict.Common.Controls.TCmbAutoComplete ACmbDetailCommentOneType,
            Ict.Common.Controls.TCmbAutoComplete ACmbDetailCommentTwoType, Ict.Common.Controls.TCmbAutoComplete ACmbDetailCommentThreeType,
            ref string AMotivationGroup, ref string AMotivationDetail, out bool ? AEnableRecipientGiftDestination)
        {
            AEnableRecipientGiftDestination = null;

            //Record current values for motivation
            AMotivationGroup = ACurrentDetailRow.MotivationGroupCode;
            AMotivationDetail = ACurrentDetailRow.MotivationDetailCode;

            if (ACurrentDetailRow.IsCostCentreCodeNull())
            {
                ATxtDetailCostCentreCode.Text = string.Empty;
            }
            else
            {
                ATxtDetailCostCentreCode.Text = ACurrentDetailRow.CostCentreCode;
            }

            if (ACurrentDetailRow.IsAccountCodeNull())
            {
                ATxtDetailAccountCode.Text = string.Empty;
            }
            else
            {
                ATxtDetailAccountCode.Text = ACurrentDetailRow.AccountCode;
            }

            if (ACurrentDetailRow.IsRecipientKeyNull())
            {
                ATxtDetailRecipientKey.Text = String.Format("{0:0000000000}", 0);
                UpdateRecipientKeyText(0, ACurrentDetailRow, AMotivationGroup, AMotivationDetail);
            }
            else
            {
                ATxtDetailRecipientKey.Text = String.Format("{0:0000000000}", ACurrentDetailRow.RecipientKey);
                UpdateRecipientKeyText(ACurrentDetailRow.RecipientKey, ACurrentDetailRow, AMotivationGroup, AMotivationDetail);
            }

            if (Convert.ToInt64(ATxtDetailRecipientKey.Text) == 0)
            {
                OnRecipientPartnerClassChanged(null, ATxtDetailRecipientKey, AtxtDetailRecipientLedgerNumber, out AEnableRecipientGiftDestination);
            }

            if (Convert.ToInt64(AtxtDetailRecipientLedgerNumber.Text) == 0)
            {
                OnRecipientPartnerClassChanged(ATxtDetailRecipientKey.CurrentPartnerClass,
                    ATxtDetailRecipientKey,
                    AtxtDetailRecipientLedgerNumber,
                    out AEnableRecipientGiftDestination);
            }

            if (ACurrentDetailRow.IsCommentOneTypeNull())
            {
                ACmbDetailCommentOneType.SetSelectedString("Both");
            }

            if (ACurrentDetailRow.IsCommentTwoTypeNull())
            {
                ACmbDetailCommentTwoType.SetSelectedString("Both");
            }

            if (ACurrentDetailRow.IsCommentThreeTypeNull())
            {
                ACmbDetailCommentThreeType.SetSelectedString("Both");
            }
        }