Changeset 1106 for Scheduling/trunk/cs/bsdx0200GUISourceCode/DApptSearch.cs
- Timestamp:
- Mar 20, 2011, 3:22:11 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Scheduling/trunk/cs/bsdx0200GUISourceCode/DApptSearch.cs
r1097 r1106 53 53 private ColumnHeader colDOW; 54 54 private ColumnHeader colID; 55 private Label lblMessage; 55 56 56 57 private System.ComponentModel.IContainer components; … … 312 313 this.colSlots = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); 313 314 this.colAccessType = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); 315 this.lblMessage = new System.Windows.Forms.Label(); 314 316 this.panel1.SuspendLayout(); 315 317 this.pnlDescription.SuspendLayout(); … … 323 325 // panel1 324 326 // 327 this.panel1.Controls.Add(this.lblMessage); 325 328 this.panel1.Controls.Add(this.cmdSearch); 326 329 this.panel1.Controls.Add(this.cmdCancel); … … 334 337 // cmdSearch 335 338 // 336 this.cmdSearch.Location = new System.Drawing.Point( 536, 8);339 this.cmdSearch.Location = new System.Drawing.Point(33, 6); 337 340 this.cmdSearch.Name = "cmdSearch"; 338 341 this.cmdSearch.Size = new System.Drawing.Size(72, 24); … … 344 347 // 345 348 this.cmdCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; 346 this.cmdCancel.Location = new System.Drawing.Point( 616, 8);349 this.cmdCancel.Location = new System.Drawing.Point(828, 8); 347 350 this.cmdCancel.Name = "cmdCancel"; 348 351 this.cmdCancel.Size = new System.Drawing.Size(64, 24); … … 353 356 // 354 357 this.btnAccept.DialogResult = System.Windows.Forms.DialogResult.OK; 355 this.btnAccept.Location = new System.Drawing.Point(1 28, 8);358 this.btnAccept.Location = new System.Drawing.Point(135, 8); 356 359 this.btnAccept.Name = "btnAccept"; 357 360 this.btnAccept.Size = new System.Drawing.Size(176, 24); … … 436 439 this.dtEnd.Size = new System.Drawing.Size(200, 20); 437 440 this.dtEnd.TabIndex = 65; 441 this.dtEnd.ValueChanged += new System.EventHandler(this.dtEnd_ValueChanged); 438 442 // 439 443 // dtStart … … 443 447 this.dtStart.Size = new System.Drawing.Size(200, 20); 444 448 this.dtStart.TabIndex = 64; 449 this.dtStart.ValueChanged += new System.EventHandler(this.dtStart_ValueChanged); 445 450 // 446 451 // label3 … … 672 677 this.colAccessType.Width = 101; 673 678 // 679 // lblMessage 680 // 681 this.lblMessage.AutoSize = true; 682 this.lblMessage.Font = new System.Drawing.Font("Tahoma", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 683 this.lblMessage.ForeColor = System.Drawing.Color.Red; 684 this.lblMessage.Location = new System.Drawing.Point(337, 16); 685 this.lblMessage.Name = "lblMessage"; 686 this.lblMessage.Size = new System.Drawing.Size(0, 16); 687 this.lblMessage.TabIndex = 3; 688 // 674 689 // DApptSearch 675 690 // … … 685 700 this.Text = "Find Clinic Availability"; 686 701 this.panel1.ResumeLayout(false); 702 this.panel1.PerformLayout(); 687 703 this.pnlDescription.ResumeLayout(false); 688 704 this.grpDescription.ResumeLayout(false); … … 703 719 //Tell user we are processing 704 720 this.Cursor = Cursors.WaitCursor; 705 721 this.lblMessage.Text = String.Empty; 722 706 723 //Get the control data into local vars 707 724 UpdateDialogData(false); … … 879 896 lstResults.Items.Clear(); //empty it from old data 880 897 881 //if (items.Length == 0) lstResults.Items.Add(new ListViewItem(new string[] { "", "", "", "" , "", "No Slots found", "", "" })); // no results882 898 if (items.Length > 0) lstResults.Items.AddRange(items); // add new data 899 else this.lblMessage.Text = "No available Appointment Slots Found!"; 883 900 884 901 lstResults.EndUpdate(); // ok done adding items, draw now. … … 904 921 } 905 922 906 private void grdResult_DoubleClick(object sender, System.EventArgs e) 907 { 908 /* 909 if (lstResults.DataSource == null) 910 return; 911 912 DataGridViewCell dgCell; 913 dgCell = this.grdResult.CurrentCell; 914 this.m_sSelectedResource = grdResult.SelectedRows[0].Cells[2].ToString(); 915 this.m_sSelectedDate = (DateTime)grdResult.SelectedRows[0].Cells[0].Value; 916 this.DialogResult = DialogResult.OK; 917 this.Close(); 918 */ 919 } 920 921 private void grdResult_CurrentCellChanged(object sender, System.EventArgs e) 922 { 923 /* 924 DataGridViewCell dgCell; 925 dgCell = this.grdResult.CurrentCell; 926 */ 927 } 928 929 /// <summary> 930 /// BAAAAAAAAAAAAAAAAAD. Use a shared method instead. 931 /// </summary> 932 /// <param name="sender"></param> 933 /// <param name="e"></param> 923 934 924 private void lstResults_DoubleClick(object sender, EventArgs e) 935 925 { 936 btnAccept_Click(sender, e);926 ProcessChoice(sender, e); 937 927 } 938 928 939 929 private void btnAccept_Click(object sender, EventArgs e) 930 { 931 ProcessChoice(sender, e); 932 } 933 934 /// <summary> 935 /// Shared method to process a user's choice 936 /// </summary> 937 /// <param name="s">sender</param> 938 /// <param name="e">EventArgs</param> 939 private void ProcessChoice(object s, EventArgs e) 940 940 { 941 941 if (lstResults.SelectedIndices.Count == 0) 942 942 { 943 943 this.DialogResult = DialogResult.None; 944 lblMessage.Text = "No Appointment Slot selected!"; 944 945 return; 945 946 } … … 952 953 } 953 954 955 /// <summary> 956 /// Adjust start date based on end date. 957 /// </summary> 958 /// <param name="sender"></param> 959 /// <param name="e"></param> 960 private void dtStart_ValueChanged(object sender, EventArgs e) 961 { 962 if (dtEnd.Value < dtStart.Value) dtEnd.Value = dtStart.Value; 963 } 964 965 /// <summary> 966 /// Adjust end date based on start date. 967 /// </summary> 968 /// <param name="sender"></param> 969 /// <param name="e"></param> 970 private void dtEnd_ValueChanged(object sender, EventArgs e) 971 { 972 if (dtStart.Value > dtEnd.Value) dtStart.Value = dtEnd.Value; 973 } 974 954 975 #endregion Event Handlers 955 976 956 977 #region Properties 957 958 978 959 979 /// <summary> … … 966 986 967 987 #endregion Properties 988 989 968 990 } 969 991 }
Note:
See TracChangeset
for help on using the changeset viewer.