protected void btnSubmit_Click(object sender, EventArgs e)
        {
            AddDoc bl = new AddDoc();

            bl.DocName        = txtDoctorName.Text;
            bl.Qualification  = txtQualification.Text;
            bl.Specialization = dlSpecialization.SelectedItem.ToString();
            bl.MobileNumber   = txtMobileNumber.Text;
            bl.UserName       = txtusername.Text;
            bl.Password       = txtpassword.Text;
            foreach (ListItem item in rblGender.Items)
            {
                if (item.Selected)
                {
                    bl.Gender = rblGender.SelectedValue;
                }
            }
            //bl.doc_dal(bl.DocName,bl.Qualification,bl.Specialization,bl.MobileNumber);


            b.doc_dal(bl.DocName, bl.Qualification, bl.Specialization, bl.MobileNumber, bl.Gender, bl.UserName, bl.Password);

            MessageBox.Show("Insertion of Doctor is successful");
            Response.Redirect("~/Admin/AdminHomePage.aspx");
        }
Ejemplo n.º 2
0
        public void AddDoc_3() // Verifies the added doc is created in a specific collection (by objectid)
                               // Flow : Add Doc--> Get its id and save it in a variable
                               // Perform  Assert.Notnull(saved after created) ...
        {
            appConnection.ConnectServer("mongodb://127.0.0.1:27017", null);

            AddDoc addDoc = new AddDoc();
            var    result = addDoc.AddDocs
                            (
                "stasdb55",
                "StasUnitTCreateColl6",
                "Brand",
                "Mitsubishi4",
                "Model",
                "A3",
                "Price",
                250000,
                appConnection
                            );

            Assert.NotNull(result);
        }