示例#1
0
        private void AddAvailability()
        {
            Availability availability = new Availability();

            AvailCollection.Add(availability);
            SelectedAvailability = availability;
            MessageBox.Show("Click Save button after entering the Contractor Availability details.", "Add Contractor Availability", MessageBoxButton.OK, MessageBoxImage.Warning);
        }
示例#2
0
        public AvailabilityViewModel(string ContractorId)
        {
            //  MessageBox.Show(ContractorId);

            DAL       dal = new DAL();
            DataTable dt  = dal.Read("Select * from bit_contractor_availability where Contractor_Id = " + ContractorId);

            PassedContractorId = Convert.ToInt32(ContractorId);
            foreach (DataRow dr in dt.Rows)
            {
                Availability availability = new Availability(dr);
                AvailCollection.Add(availability);
            }
        }