Exemplo n.º 1
0
 /// <summary>
 /// String that is used to update this instance.
 /// </summary>
 /// <returns>String in format: "collumn1=value1, collumn2=value2, collumn3=value3"</returns>
 public string GetSQLiteUpdateString()
 {
     return
         ("eventHash='" + TimeEventHash.ToString() + "', "
          + "type='" + ((long)Type).ToString() + "', "
          + "changeDate='" + ChangeDate.ToString(Constants.DateTimeFormat) + "'");
 }
Exemplo n.º 2
0
 /// <summary>
 /// Return string required for insertion into Database.
 /// </summary>
 /// <returns>String in specific format: "value1, value2, value3"</returns>
 public string GetSQLiteInsertString()
 {
     return
         ("'" + TimeEventHash.ToString() + "', "
          + "'" + ((long)Type).ToString() + "', "
          + "'" + ChangeDate.ToString(Constants.DateTimeFormat) + "'");
 }
Exemplo n.º 3
0
 /// <summary>
 /// String that is used for synchronization through network.
 /// </summary>
 /// <returns>String, where data values are delimited by ';'.</returns>
 public string GetSynchronizationString()
 {
     return
         ("" + TimeEventHash.ToString() + ";"
          + "" + ((long)Type).ToString() + ";"
          + "" + ChangeDate.ToString(Constants.DateTimeFormat) + "");
 }
Exemplo n.º 4
0
        // ------------------------------------------------
        //
        //                     Exit Window
        //
        // ------------------------------------------------

        private void exit(object sender, EventArgs e)
        {
            // StartDate = DateTime.Today;
            StartDate = Start.Value;

            ChangeDate = StartDate.AddMonths(3);

            information[4] = ChangeDate.ToString();
            information[5] = ODStart.Text;

            //save information if not null
            int pos = Array.IndexOf(information, null);

            if (pos > -1)
            {
                Console.WriteLine("values are not being saved?");

                MessageBoxButtons buttons = MessageBoxButtons.YesNo;
                DialogResult      box;

                //make sure if want to exit

                box = MessageBox.Show("Are you sure you want to exit?", "all fields where not filled", buttons);

                if (box == System.Windows.Forms.DialogResult.Yes)
                {
                    box = MessageBox.Show("Warring: if click yes, information maybe become lost or wrong in the future.", "incomplete", buttons);

                    if (box == System.Windows.Forms.DialogResult.Yes)
                    {
                        Console.WriteLine("Saving incomplete data");
                        CheckIFHaveFiles();
                        this.Close();
                    }
                    else if (box == System.Windows.Forms.DialogResult.No)
                    {
                        Console.WriteLine("values are not saved");
                        this.Close();
                    }
                }
            }
            else
            {
                Console.WriteLine("Saving Dates");



                information[3] = StartDate.ToString();
                information[4] = ChangeDate.ToString();

                CheckIFHaveFiles();
            }
        }
Exemplo n.º 5
0
        /// <summary>
        /// Appends this item to the maintenance log.  The log is assumed append-only; editing of entries is not supported.
        /// </summary>
        /// <returns>True for success</returns>
        public void FAddToLog()
        {
            DBHelper dbh = new DBHelper();

            dbh.DoNonQuery("INSERT INTO maintenancelog SET idaircraft=?idAircraft, Description=?Description, Date=?Date, User=?User, Comment = ?Comment",
                           (comm) =>
            {
                comm.Parameters.AddWithValue("idAircraft", AircraftID);
                comm.Parameters.AddWithValue("Description", Description);
                comm.Parameters.AddWithValue("Date", ChangeDate.ToString("yyyy-MM-dd HH:mm", CultureInfo.InvariantCulture));
                comm.Parameters.AddWithValue("User", User);
                comm.Parameters.AddWithValue("Comment", Comment);
            });
            if (dbh.LastError.Length > 0)
            {
                throw new MyFlightbookException("Error adding to log: " + dbh.CommandText + "\r\n" + dbh.LastError);
            }
        }
Exemplo n.º 6
0
 /// <summary>
 /// Returns a hash code for this instance.
 /// </summary>
 /// <returns>An hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.</returns>
 public override int GetHashCode()
 {
     return(string.Concat("DocListFilteredCriteria", DocID.ToString(), DocClassID.ToString(), DocTypeID.ToString(), SenderID.ToString(), RecipientID.ToString(), DocRef.ToString(), DocDate.ToString(), Subject.ToString(), DocStatusID.ToString(), CreateDate.ToString(), CreateUserID.ToString(), ChangeDate.ToString(), ChangeUserID.ToString()).GetHashCode());
 }
Exemplo n.º 7
0
 /// <summary>
 /// Returns a hash code for this instance.
 /// </summary>
 /// <returns>An hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.</returns>
 public override int GetHashCode()
 {
     return(string.Concat("FilteredCriteria", FolderTypeID.ToString(), FolderRef.ToString(), Year.ToString(), Subject.ToString(), FolderStatusID.ToString(), CreateDate.ToString(), CreateUserID.ToString(), ChangeDate.ToString(), ChangeUserID.ToString()).GetHashCode());
 }
Exemplo n.º 8
0
        public M_StorePoint_Entity GetStorePointEntity()
        {
            mspe = new M_StorePoint_Entity
            {
                StoreCD        = StoreCD,
                ChangeDate     = txtChangeDate.Text.Replace("/", "-"),
                PointRate      = txtPointRate.Text,
                ServicedayRate = txtServiceDayRate.Text,
                ExpirationDate = txtExperationDate.Text,
                MaxPoint       = txtMaxPoint.Text,
                TicketUnit     = txtTicketUnit.Text,

                Print1 = txtPrint1.Text,
                Size1  = string.IsNullOrWhiteSpace(txtSize1.Text)? "0" : txtSize1.Text,
                Bold1  = chk1.Checked ? "1" : "0",

                Print2 = txtPrint2.Text,
                Size2  = string.IsNullOrWhiteSpace(txtSize2.Text) ? "0" : txtSize2.Text,
                Bold2  = chk2.Checked ? "1" : "0",

                Print3 = txtPrint3.Text,
                Size3  = string.IsNullOrWhiteSpace(txtSize3.Text) ? "0" : txtSize3.Text,
                Bold3  = chk3.Checked ? "1" : "0",

                Print4 = txtPrint4.Text,
                Size4  = string.IsNullOrWhiteSpace(txtSize4.Text) ? "0" : txtSize4.Text,
                Bold4  = chk4.Checked ? "1" : "0",

                Print5 = txtPrint5.Text,
                Size5  = string.IsNullOrWhiteSpace(txtSize5.Text) ? "0" : txtSize5.Text,
                Bold5  = chk5.Checked ? "1" : "0",

                Print6 = txtPrint6.Text,
                Size6  = string.IsNullOrWhiteSpace(txtSize6.Text) ? "0" : txtSize6.Text,
                Bold6  = chk6.Checked ? "1" : "0",

                Print7 = txtPrint7.Text,
                Size7  = string.IsNullOrWhiteSpace(txtSize7.Text) ? "0" : txtSize7.Text,
                Bold7  = chk7.Checked ? "1" : "0",

                Print8 = txtPrint8.Text,
                Size8  = string.IsNullOrWhiteSpace(txtSize8.Text) ? "0" : txtSize8.Text,
                Bold8  = chk8.Checked ? "1" : "0",

                Print9 = txtPrint9.Text,
                Size9  = string.IsNullOrWhiteSpace(txtSize9.Text) ? "0" : txtSize9.Text,
                Bold9  = chk9.Checked ? "1" : "0",

                Print10 = txtPrint10.Text,
                Size10  = string.IsNullOrWhiteSpace(txtSize10.Text) ? "0" : txtSize10.Text,
                Bold10  = chk10.Checked ? "1" : "0",

                Print11 = txtPrint11.Text,
                Size11  = string.IsNullOrWhiteSpace(txtSize11.Text) ? "0" : txtSize11.Text,
                Bold11  = chk11.Checked ? "1" : "0",

                Print12        = txtPrint12.Text,
                Size12         = string.IsNullOrWhiteSpace(txtSize12.Text) ? "0" : txtSize12.Text,
                Bold12         = chk12.Checked ? "1" : "0",
                DeleteFlg      = "0",
                ProcessMode    = "登録",
                InsertOperator = InOperatorCD,
                ProgramID      = InProgramID,
                Key            = StoreCD.ToString() + " " + ChangeDate.ToString(),
                PC             = InPcID,
            };
            return(mspe);
        }