InsertPhoneContext() public method

public InsertPhoneContext ( sp_Phone_DM _cPhone ) : void
_cPhone VolTeer.DomainModels.VT.Vol.sp_Phone_DM
return void
Exemplo n.º 1
0
        public static void InsertVolPhoneData(TestContext testContext)
        {
            System.Diagnostics.Debug.WriteLine(String.Format("{0}", DateTime.Now));
            cExcel.RemoveAllData();
            cExcel.InsertData(ExcelFilenames);

            sp_Volunteer_BLL volBLL = new sp_Volunteer_BLL();
            generalTestVol = new sp_Volunteer_DM();
            generalTestVol.VolFirstName = "TestFirst";
            generalTestVol.VolMiddleName = "TestMiddle";
            generalTestVol.VolLastName = "TestLast";
            generalTestVol.ActiveFlg = true;
            System.Guid volID = Guid.NewGuid();
            generalTestVol.VolID = volID;
            volBLL.InsertVolunteerContext(ref generalTestVol);

            sp_VolPhone_BLL volPhone_bll = new sp_VolPhone_BLL();
            primaryTestVolPhone = new sp_Phone_DM();
            primaryTestVolPhone.PhoneNbr = "1357924680";
            primaryTestVolPhone.VolID = volID;
            primaryTestVolPhone.ActiveFlg = true;
            primaryTestVolPhone.PrimaryFlg = true;
            volPhone_bll.InsertPhoneContext(primaryTestVolPhone);

            secondaryTestVolPhone = new sp_Phone_DM();
            secondaryTestVolPhone.PhoneNbr = "2468013579";
            secondaryTestVolPhone.VolID = volID;
            secondaryTestVolPhone.ActiveFlg = true;
            secondaryTestVolPhone.PrimaryFlg = false;
            volPhone_bll.InsertPhoneContext(secondaryTestVolPhone);
        }
Exemplo n.º 2
0
        public sp_Phone_DM hCreateVolPhone(string PhoneNbr,Guid VolID,bool primaryPhone,ref int numberPhones)
        {
            sp_Phone_DM Phone = new sp_Phone_DM();
            sp_VolPhone_BLL VolPhoneBll = new sp_VolPhone_BLL();

            numberPhones = numberPhones + 1;
            Phone.PhoneID = numberPhones;
            Phone.ActiveFlg = true;
            Phone.PhoneNbr = PhoneNbr;
            Phone.VolID = VolID;
            Phone.PrimaryFlg = primaryPhone;

            VolPhoneBll.InsertPhoneContext(Phone);

            return Phone;
        }
Exemplo n.º 3
0
        public void TestVolPhoneCreate()
        {
            sp_Volunteer_BLL vol_bll = new sp_Volunteer_BLL();
            sp_Volunteer_DM vol_dm = new sp_Volunteer_DM();
            vol_dm.VolFirstName = "createFirst";
            vol_dm.VolMiddleName = "createMiddle";
            vol_dm.VolLastName = "createLast";
            vol_dm.ActiveFlg = true;
            System.Guid volID = vol_bll.InsertVolunteerContext(ref vol_dm).VolID;
            vol_dm.VolID = volID;

            string volPhoneNbr = "0123456789";
            bool PrimaryFlg = true;
            bool ActiveFlg = true;
            sp_VolPhone_BLL volPhone_bll = new sp_VolPhone_BLL();
            sp_Phone_DM volPhone_dm = new sp_Phone_DM();
            volPhone_dm.PhoneNbr = volPhoneNbr;
            volPhone_dm.VolID = volID;
            volPhone_dm.ActiveFlg = ActiveFlg;
            volPhone_dm.PrimaryFlg = PrimaryFlg;
            volPhone_bll.InsertPhoneContext(volPhone_dm);
            int volPhoneID = volPhone_dm.PhoneID;

            List<sp_Phone_DM> volPhoneDMs_selected = volPhone_bll.ListPhones(volPhone_dm);
            Assert.IsTrue(PhoneListContains(volPhoneDMs_selected, volPhone_dm));
        }