Exemplo n.º 1
0
        public void PopulateControlValue(string Type)
        {
            try
            {
                switch (Type)
                {
                case "RaceReleasePoint":
                    if (RaceReleasePointData.Rows.Count > 0)
                    {
                        txtReleasePointID.Text       = RaceReleasePointData.Rows[0]["RaceReleasePointID"].ToString();
                        lblRaceSchedule.Text         = RaceReleasePointData.Rows[0]["RaceScheduleName"].ToString();
                        lblRaceScheduleCategory.Text = RaceReleasePointData.Rows[0]["RaceScheduleCategoryName"].ToString();
                        lblLap.Text          = RaceReleasePointData.Rows[0]["Lap"].ToString();
                        lblLocationName.Text = RaceReleasePointData.Rows[0]["LocationName"].ToString();
                        lblCoordinates.Text  = RaceReleasePointData.Rows[0]["Coordinates"].ToString();
                        lblDistance.Text     = RaceReleasePointData.Rows[0]["Distance"].ToString() + " KM";
                        lblReleaseDate.Text  = Convert.ToString(RaceReleasePointData.Rows[0]["ReleasedDate"]).Split(' ').GetValue(0).ToString();
                        lblReleaseTime.Text  = RaceReleasePointData.Rows[0]["ReleaseTime"].ToString();
                        lblLapNo.Text        = RaceReleasePointData.Rows[0]["LapNo"].ToString();
                    }
                    break;

                case "Member":
                    if (MemberDetailsData.Rows.Count > 0)
                    {
                        txtMemberID.Text          = MemberDetailsData.Rows[0]["MemberID"].ToString();
                        txtMemberName.Text        = MemberDetailsData.Rows[0]["MemberName"].ToString();
                        txtMemberCoordinates.Text = MemberDetailsData.Rows[0]["Coordinates"].ToString();
                        dtpExpirationDate.Value   = (DateTime)MemberDetailsData.Rows[0]["DateofExpiration"];
                        if (MemberDetailsData.Rows[0]["IsExpired"].ToString() == "true")
                        {
                            chkMembershipExpired.Checked = true;
                        }
                        txtRingNumber.Enabled     = true;
                        txtStickerCode.Enabled    = true;
                        txtEntryBarcodeID.Enabled = true;
                        ReadOnlyControl(true);
                    }
                    break;

                case "MemberDataFromGrid":
                    txtEntryID.Text     = EntryID.ToString();
                    txtMemberIDNo.Text  = MemberIDNo;
                    txtStickerCode.Text = StickerCode;
                    txtRingNumber.Text  = RingNumber;
                    break;
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemplo n.º 2
0
        public override void AppendTo(ref SpanWriter writer, OrderedHashSet <string> strings, ref int entries, ref int switches)
        {
            writer.Write((ushort)0x7B20); // "{ "
            writer.Write(LayoutName);
            writer.Write((byte)0x20);     // ' '
            writer.WriteAscii(X.ToString());
            writer.Write((byte)0x20);     // ' '
            writer.WriteAscii(Y.ToString());
            writer.Write((byte)0x20);     // ' '
            writer.WriteAscii(Width.ToString());
            writer.Write((byte)0x20);     // ' '
            writer.WriteAscii(Height.ToString());
            writer.Write((byte)0x20);     // ' '
            writer.WriteAscii(Hue.ToString());
            writer.Write((byte)0x20);     // ' '
            writer.WriteAscii(EntryID.ToString());
            writer.Write((byte)0x20);     // ' '
            writer.WriteAscii(strings.GetOrAdd(InitialText).ToString());
            writer.Write((ushort)0x207D); // " }"

            entries++;
        }
Exemplo n.º 3
0
        public string CreateEntryDataSaveLine(string data_separator)
        {
            //we want
            //  ent-data;entry-id=geog_222;title=GEOG 222;subtitle=Introduction to Geomatics;colour=#FFFF7272;prerequisites=[];
            //      corequisites=[];avail-col-ids=[20_fa,21_wi,21_fa,22_wi,22_fa,23_wi,23_fa,24_wi];set-col-id=;list-pos=0

            Debug.WriteLine("CreateEntryDataSaveLine");

            string return_data_line;
            string data_line_start = "ent-data";


            return_data_line = data_line_start;


            foreach (string cur_data_parameter in Parameter_Names)
            {
                //should be like this
                // Parameter_Names = { "Entry_ProjectName", "EntryID", "Title", "Subtitle",
                //    "ColourHex", "PrereqEntryIDs", "CoreqEntryIDs", "AvailColIDs", "SetColID", "RowPosition" };
                // Parameter_Save_Names = { "", "entry-id", "title", "subtitle",
                //    "colour", "prerequisites", "corequisites", "avail-col-ids", "set-col-id", "list-pos" };

                //this one is skipped
                if (cur_data_parameter == "Col_ProjectName")
                {
                    continue;
                }


                string cur_data_addition = "";

                string cur_data_save_name = Parameter_Save_Names[Parameter_Names.IndexOf(cur_data_parameter)];
                string data_val           = "";

                switch (cur_data_parameter)
                {
                case "EntryID":
                    data_val = EntryID.ToString();
                    break;

                case "Title":
                    data_val = Title.ToString();
                    break;

                case "Subtitle":
                    data_val = Subtitle.ToString();
                    break;

                case "ColourHex":
                    data_val = ColourHex.ToString();
                    break;

                case "PrereqEntryIDs":
                    data_val = FormattedSaveDataFromList(PrereqEntryIDs);
                    break;

                case "CoreqEntryIDs":
                    data_val = FormattedSaveDataFromList(CoreqEntryIDs);
                    break;

                case "AvailColIDs":
                    data_val = FormattedSaveDataFromList(AvailColIDs);
                    break;

                case "SetColID":
                    data_val = SetColID.ToString();
                    break;

                case "RowPosition":
                    data_val = RowPosition.ToString();
                    break;
                }

                cur_data_addition = string.Format("{0}={1}", cur_data_save_name, data_val);

                return_data_line += data_separator + cur_data_addition;
            }

            return(return_data_line);
        }
Exemplo n.º 4
0
        public void PrintEntryDataValues()
        {
            Debug.WriteLine("\nEntryData class paramters:");



            foreach (string cur_param_name in Parameter_Names)
            {
                bool basic_formatting = false;
                bool list_formatting  = false;

                string        cur_param_val = "";
                List <string> cur_param_lst = new List <string>();

                switch (cur_param_name)
                {
                case "Entry_ProjectName":
                    cur_param_val    = Entry_ProjectName.ToString();
                    basic_formatting = true;
                    break;

                case "EntryID":
                    cur_param_val    = EntryID.ToString();
                    basic_formatting = true;
                    break;

                case "Title":
                    cur_param_val    = Title.ToString();
                    basic_formatting = true;
                    break;

                case "Subtitle":
                    cur_param_val    = Subtitle.ToString();
                    basic_formatting = true;
                    break;

                case "ColourHex":
                    cur_param_val    = ColourHex.ToString();
                    basic_formatting = true;
                    break;

                case "PrereqEntryIDs":
                    cur_param_lst   = PrereqEntryIDs;
                    list_formatting = true;
                    break;

                case "CoreqEntryIDs":
                    cur_param_lst   = CoreqEntryIDs;
                    list_formatting = true;
                    break;

                case "SetColID":
                    cur_param_val    = SetColID.ToString();
                    basic_formatting = true;
                    break;

                case "ActualColID":
                    cur_param_val    = ActualColID.ToString();
                    basic_formatting = true;
                    break;

                case "RowPosition":
                    cur_param_val    = RowPosition.ToString();
                    basic_formatting = true;
                    break;

                case "ColPosition":
                    cur_param_val    = ColPosition.ToString();
                    basic_formatting = true;
                    break;

                case "AvailColIDs":
                    cur_param_lst   = AvailColIDs;
                    list_formatting = true;
                    break;

                case "Is_Selected":
                    cur_param_val    = Is_Selected.ToString();
                    basic_formatting = true;
                    break;
                }

                if (basic_formatting)
                {
                    Debug.WriteLine(string.Format("    {0,-18} = {1}", cur_param_name, cur_param_val));
                }
                if (list_formatting)
                {
                    Debug.Write(string.Format("    {0,-18} = ", cur_param_name));

                    foreach (string cur_val in cur_param_lst)
                    {
                        Debug.Write(string.Format("{0} ", cur_val));
                    }
                    Debug.WriteLine("");
                }
            }
            Debug.WriteLine("");
        }
Exemplo n.º 5
0
 public override string ToString()
 {
     return(EntryID.ToString()); // Für bessere Coded UI Test Erkennung
 }
Exemplo n.º 6
0
        private void DTMemberEntryList_DoubleClick(object sender, EventArgs e)
        {
            try
            {
                DataGridView datagrid = this.dtEntryMemberList;
                Int64        index;
                if (datagrid.RowCount > 0)
                {
                    member  = new BIZ.Member();
                    index   = datagrid.CurrentRow.Index;
                    EntryID = Convert.ToInt64(datagrid.Rows[Convert.ToInt32(index)].Cells[0].Value);
                    if (EntryID > 0)
                    {
                        if ((string)datagrid.CurrentCell.Value.ToString() == "EDIT")
                        {
                            MemberIDNo            = datagrid.Rows[Convert.ToInt32(index)].Cells[4].Value.ToString();
                            BandID                = (Int64)datagrid.Rows[Convert.ToInt32(index)].Cells[6].Value;
                            RingNumber            = datagrid.Rows[Convert.ToInt32(index)].Cells[7].Value.ToString();
                            StickerCode           = datagrid.Rows[Convert.ToInt32(index)].Cells[8].Value.ToString();
                            txtEntryIdentity.Text = Convert.ToString(datagrid.Rows[Convert.ToInt32(index)].Cells[9].Value);
                            PopulateControlValue("MemberDataFromGrid");
                            GetMemberDetails();
                        }
                        else if ((string)datagrid.CurrentCell.Value.ToString() == " + ")
                        {
                            frmEntryMultipleCategory frmMultiplyCategory = new frmEntryMultipleCategory();
                            if (Convert.ToBoolean(datagrid.Rows[Convert.ToInt32(index)].Cells[3].Value))
                            {
                                string entrylist = "";
                                string bandlist  = "";
                                foreach (DataGridViewRow item in datagrid.Rows)
                                {
                                    if (Convert.ToBoolean(item.Cells[3].Value))
                                    {
                                        entrylist = entrylist == "" ? item.Cells[0].Value.ToString() : entrylist + "|" + item.Cells[0].Value.ToString();
                                        bandlist  = bandlist == "" ? item.Cells[7].Value.ToString() : bandlist + "|" + item.Cells[7].Value.ToString();
                                    }
                                }

                                frmMultiplyCategory.EntryID        = "0";
                                frmMultiplyCategory.BandNumberList = bandlist;
                                frmMultiplyCategory.EntryList      = entrylist;
                            }
                            else
                            {
                                frmMultiplyCategory.BandNumber   = datagrid.Rows[Convert.ToInt32(index)].Cells[7].Value.ToString();
                                frmMultiplyCategory.StickerCode  = datagrid.Rows[Convert.ToInt32(index)].Cells[8].Value.ToString();
                                frmMultiplyCategory.EntryID      = datagrid.Rows[Convert.ToInt32(index)].Cells[0].Value.ToString();
                                frmMultiplyCategory.OrigCategory = datagrid.Rows[Convert.ToInt32(index)].Cells[11].Value.ToString();
                                frmMultiplyCategory.MemberID     = txtMemberID.Text;
                            }
                            frmMultiplyCategory.ClubID   = ClubID;
                            frmMultiplyCategory.MemberID = txtMemberID.Text;
                            frmMultiplyCategory.ShowDialog();
                            EntryListGetByMemberIDNo();
                        }
                        else if ((string)datagrid.CurrentCell.Value.ToString() == "DELETE")
                        {
                            txtEntryID.Text = EntryID.ToString();
                            EntryDelete();
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(Common.Common.CustomError(ex.Message), "Error");
            }
        }