Beispiel #1
0
        public ActionResult Authenticate(LoginCredentials user)
        {
            token = GetToken(_config["Links:Authorization"], user);
            _log4net.Info("Home:Trying to generate token");

            if (token == null)
            {
                _log4net.Info("Home:Token Generation Failed Unauthorised User");
                ViewBag.Message = String.Format("Invalid Username or Password");
                return(View("Login", user));
            }
            _log4net.Info("Home:Token Successfull Generated for " + user.Role);
            if (user.Role == "Student")
            {
                BasicDetails val = null;
                val = db.BasicDetails.Where(x => x.Email == user.UserName).FirstOrDefault();
                int sid = val.Id;
                return(RedirectToAction("Index", "Student", new{ id = sid }));
            }
            if (user.Role == "Teacher")
            {
                return(RedirectToAction("Index", "Teacher"));
            }
            else
            {
                return(RedirectToAction("Index", "Admin"));
            }
        }
Beispiel #2
0
        public IActionResult UpdateDetail([FromBody] BasicDetails model)
        {
            _log4net.Info(" Http PUT request Started");
            try
            {
                int val = adb.UpdateDetail(model);
                if (val == 1)
                {
                    _log4net.Info(" Http PUT request Completed");
                    return(Ok(val));
                }
                else
                {
                    return(BadRequest());
                }
            }
            catch (Exception ex)
            {
                if (ex.GetType().FullName ==
                    "Microsoft.EntityFrameworkCore.DbUpdateConcurrencyException")
                {
                    return(NotFound());
                }

                return(BadRequest());
            }
        }
Beispiel #3
0
 public IActionResult AddDetail([FromBody] BasicDetails model)
 {
     _log4net.Info(" Http POST request Started");
     if (ModelState.IsValid)
     {
         try
         {
             var Id = adb.AddDetail(model);
             if (Id > 0)
             {
                 _log4net.Info(" Http POST request Completed");
                 return(Ok(Id));
             }
             else
             {
                 return(NotFound());
             }
         }
         catch (Exception)
         {
             return(BadRequest());
         }
     }
     return(BadRequest());
 }
Beispiel #4
0
        public int AddDetail(BasicDetails data)
        {
            if (db != null)
            {
                db.BasicDetails.Add(data);
                db.SaveChanges();
                MarksDetails marks = new MarksDetails()
                {
                    Id   = data.Id, CurrentYear = null, Sem1 = null, Sem2 = null, Sem3 = null, Sem4 = null,
                    Sem5 = null, Sem6 = null, Sem7 = null, Sem8 = null, TotalMaxMarks = null, TotalObtainedMarks = null, Percentage = null
                };
                LoginCredentials newuser = new LoginCredentials()
                {
                    UserName = data.Email,
                    Password = data.Phone,
                    Role     = "Student"
                };
                db.MarksDetails.Add(marks);
                db.LoginCredentials.Add(newuser);
                db.SaveChanges();
                return(data.Id);
            }

            return(0);
        }
Beispiel #5
0
        public async Task <IActionResult> AddDetail(BasicDetails del)
        {
            del.Id = Convert.ToInt32(del.Id);
            BasicDetails newdetail = new BasicDetails();

            using (var httpClient = new HttpClient())
            {
                StringContent content = new StringContent(JsonConvert.SerializeObject(del), Encoding.UTF8, "application/json");

                using (var response = await httpClient.PostAsync("https://localhost:44304/api/Admin/AddDetail", content))
                {
                    if (response.IsSuccessStatusCode)
                    {
                        ViewBag.result = "Record Inserted Successfully!";
                        _log4net.Info("Admin :Added New Student ");
                        return(View());
                    }
                    else
                    {
                        ViewBag.result = "Error in Inserting Records Try Again!";
                        return(View());
                    }
                }
            }
        }
Beispiel #6
0
        public override global::System.Data.DataSet Clone()
        {
            BasicDetails cln = ((BasicDetails)(base.Clone()));

            cln.InitVars();
            cln.SchemaSerializationMode = this.SchemaSerializationMode;
            return(cln);
        }
Beispiel #7
0
 public int UpdateDetail([FromBody] BasicDetails model)
 {
     if (db != null)
     {
         db.BasicDetails.Update(model);
         db.SaveChanges();
         return(1);
     }
     return(0);
 }
Beispiel #8
0
        public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedDataSetSchema(global::System.Xml.Schema.XmlSchemaSet xs)
        {
            BasicDetails ds = new BasicDetails();

            global::System.Xml.Schema.XmlSchemaComplexType type     = new global::System.Xml.Schema.XmlSchemaComplexType();
            global::System.Xml.Schema.XmlSchemaSequence    sequence = new global::System.Xml.Schema.XmlSchemaSequence();
            global::System.Xml.Schema.XmlSchemaAny         any      = new global::System.Xml.Schema.XmlSchemaAny();
            any.Namespace = ds.Namespace;
            sequence.Items.Add(any);
            type.Particle = sequence;
            global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
            if (xs.Contains(dsSchema.TargetNamespace))
            {
                global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
                global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
                try {
                    global::System.Xml.Schema.XmlSchema schema = null;
                    dsSchema.Write(s1);
                    for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext();)
                    {
                        schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
                        s2.SetLength(0);
                        schema.Write(s2);
                        if ((s1.Length == s2.Length))
                        {
                            s1.Position = 0;
                            s2.Position = 0;
                            for (; ((s1.Position != s1.Length) &&
                                    (s1.ReadByte() == s2.ReadByte()));)
                            {
                                ;
                            }
                            if ((s1.Position == s1.Length))
                            {
                                return(type);
                            }
                        }
                    }
                }
                finally {
                    if ((s1 != null))
                    {
                        s1.Close();
                    }
                    if ((s2 != null))
                    {
                        s2.Close();
                    }
                }
            }
            xs.Add(dsSchema);
            return(type);
        }
Beispiel #9
0
 public ActionResult BasicDetails(BasicDetails data, string prevBtn, string nextBtn)
 {
     if (nextBtn != null)
     {
         if (ModelState.IsValid)
         {
             Customer obj = GetCustomer();
             obj.CustomerID  = data.CustomerID;
             obj.CompanyName = data.CompanyName;
             return(View("AddressDetails"));
         }
     }
     return(View("BasicDetails"));
 }
Beispiel #10
0
        public async Task <IActionResult> UpdateDetail(int id)
        {
            BasicDetails detail = new BasicDetails();

            using (var httpClient = new HttpClient())
            {
                using (var response = await httpClient.GetAsync("https://localhost:44307/api/Student/GetDetail/" + id))
                {
                    string apiResponse = await response.Content.ReadAsStringAsync();

                    detail = JsonConvert.DeserializeObject <BasicDetails>(apiResponse);
                }
            }
            return(View(detail));
        }
Beispiel #11
0
        public async Task <IActionResult> Index(int id)
        {
            BasicDetails list = new BasicDetails();

            using (var httpClient = new HttpClient())
            {
                using (var response = await httpClient.GetAsync("https://localhost:44307/api/Student/GetDetail/" + id))
                {
                    string apiResponse = await response.Content.ReadAsStringAsync();

                    list = JsonConvert.DeserializeObject <BasicDetails>(apiResponse);
                }
            }
            _log4net.Info("Student:Homepage");
            return(View(list));
        }
Beispiel #12
0
        public async Task <IActionResult> Search(int id)
        {
            BasicDetails bdetail = new BasicDetails();

            using (var httpClient = new HttpClient())
            {
                using (var response = await httpClient.GetAsync("https://localhost:44304/api/Admin/GetDetail/" + id))
                {
                    string apiResponse = await response.Content.ReadAsStringAsync();

                    bdetail = JsonConvert.DeserializeObject <BasicDetails>(apiResponse);
                }
            }
            _log4net.Info("Admin: Search Request Completed");
            return(View(bdetail));
        }
        private void add_data(object sender, EventArgs e)
        {
            Service1Client client1 = new Service1Client();
            client1.AddPatientDataCompleted += new EventHandler<System.ComponentModel.AsyncCompletedEventArgs>(client1_AddPatientDataCompleted);

            BasicDetails o = new BasicDetails();

            o.Name = Name.Text;
            o.SSN = SSN.Text;
            o.DOB = (DateTime)DOB.Value;
            o.Gender = Gender.Text;
            o.Address = Address.Text;
            o.Nationality = Nationality.Text;
            o.PhoneNumber = PhoneNumber.Text;
            o.LegalStatus = LegalStatus.Text;
            o.MedicalInsurance = Insurance.Text;
            o.NextOfKin = NextOfKin.Text;

            client1.AddPatientDataAsync(o);
        }
Beispiel #14
0
        public void Add_Valid_Detail()
        {
            Admin           admindata = new Admin(db);
            AdminController obj       = new AdminController(admindata);
            BasicDetails    dummydata = new BasicDetails()
            {
                Name           = "Dummy5",
                Gender         = "Female",
                Address        = "Dummy Address 5",
                DateOfBirth    = DateTime.Parse("11/23/2010"),
                Phone          = "1122334400",
                Email          = "*****@*****.**",
                Course         = "course1",
                CourseDuration = 4,
                FeeStatus      = "Paid"
            };
            var data     = obj.AddDetail(dummydata);
            var okResult = data as OkObjectResult;

            Assert.AreEqual(200, okResult.StatusCode);
        }
Beispiel #15
0
        public void update_Valid_Detail()
        {
            Student           studentndata = new Student(db);
            StudentController obj          = new StudentController(studentndata);
            BasicDetails      dummydata    = new BasicDetails()
            {
                Id             = 1,
                Name           = "Dummy1",
                Gender         = "Male",
                Address        = "Dummy Address 5",
                DateOfBirth    = DateTime.Parse("11/23/2010"),
                Phone          = "1122334455",
                Email          = "*****@*****.**",
                Course         = "course1",
                CourseDuration = 4,
                FeeStatus      = "due"
            };
            var data     = obj.UpdateDetail(dummydata);
            var okResult = data as OkObjectResult;

            Assert.AreEqual(200, okResult.StatusCode);
        }
Beispiel #16
0
        public async Task <IActionResult> UpdateMarks(MarksDetails data)
        {
            BasicDetails receivedDetail = new BasicDetails();

            using (var httpClient = new HttpClient())
            {
                var newcontent = new StringContent(JsonConvert.SerializeObject(data), Encoding.UTF8, MediaTypeNames.Application.Json);

                using (var response = await httpClient.PutAsync("https://localhost:44328/api/Teacher/UpdateDetail/", newcontent))
                {
                    if (response.IsSuccessStatusCode)
                    {
                        ViewBag.result = "Record Updated Successfully!";
                        _log4net.Info("Teacher:Marks Updated of ID: " + data.Id);
                        return(View());
                    }
                    else
                    {
                        ViewBag.result = "Error in Updating Records Try Again!";
                        return(View());
                    }
                }
            }
        }
Beispiel #17
0
        public ActionResult AddressDetails(AddressDetails data, string prevBtn, string nextBtn)
        {
            Customer obj = GetCustomer();

            if (prevBtn != null)
            {
                BasicDetails bd = new BasicDetails();
                bd.CustomerID  = obj.CustomerID;
                bd.CompanyName = obj.CompanyName;
                return(View("BasicDetails", bd));
            }
            if (nextBtn != null)
            {
                if (ModelState.IsValid)
                {
                    obj.Address    = data.Address;
                    obj.City       = data.City;
                    obj.Country    = data.Country;
                    obj.PostalCode = data.PostalCode;
                    return(View("ContactDetails"));
                }
            }
            return(View("AddressDetails"));
        }
 public Customer()
 {
     BasicDetails   = new BasicDetails();
     AddressDetails = new AddressDetails();
     ContactDetails = new ContactDetails();
 }
    protected void btn_save_Click(object sender, EventArgs e)
    {
        BasicDetails BasicInfo = new BasicDetails();

        BasicInfo.basicid = TextBoxId.Text;

        BasicInfo.name = TextBoxName.Text;

        BasicInfo.description = TextBoxDescription.Text;

        BasicInfo.expire_t = TextBoxTime.Text;

        BasicInfo.expire_s = TextBoxSize.Text;

        int rowIndex = 0;
        StringCollection sc = new StringCollection();
        string rs = "";

        if (ViewState["CurrentTable"] != null)
        {
            DataTable dtCurrentTable = (DataTable)ViewState["CurrentTable"];
            //DataRow drCurrentRow = null;
            if (dtCurrentTable.Rows.Count > 0)
            {
                for (int i = 1; i <= dtCurrentTable.Rows.Count; i++)
                {
                    //extract the TextBox values

                    TextBox box1 = (TextBox)gv_read.Rows[rowIndex].Cells[0].FindControl("TextBox1");

                    sc.Add(box1.Text);

                    ////////////////////////////////////////////////////////////////////////////////
                    rs = rs + "," + box1.Text;

                    rowIndex++;

                }

               //cnt=dtCurrentTable.Rows.Count;

            }
        }
        rs = rs.TrimStart(',');
        if (rs == "")
        {
            lbl_rd.Text = "Please enter Read";
            goto endPrg;
        }
        else
        {
            lbl_rd.Text = "";
        }
        int rowIndex1 = 0;
        StringCollection sc1 = new StringCollection();
        string wrt = "";
        if (ViewState["CurrentTable1"] != null)
        {
            DataTable dtCurrentTable1 = (DataTable)ViewState["CurrentTable1"];
            //DataRow drCurrentRow1 = null;
            if (dtCurrentTable1.Rows.Count > 0)
            {
                for (int i = 1; i <= dtCurrentTable1.Rows.Count; i++)
                {
                    //extract the TextBox values

                    TextBox box2 = (TextBox)gv_write.Rows[rowIndex1].Cells[0].FindControl("TextBox2");

                    sc1.Add(box2.Text);

                    ////////////////////////////////////////////////////////////////////////////////
                    wrt = wrt + "," + box2.Text;

                    rowIndex1++;

                }

                //cnt=dtCurrentTable.Rows.Count;

            }
        }
        wrt = wrt.TrimStart(',');
        if (wrt == "")
        {
            lbl_wr.Text = "Please enter Write";
            goto endPrg;
        }
        else
        {
            lbl_wr.Text = "";
        }
        string result = objServiceClientobjService.InsertBasicDetails(BasicInfo,rs,wrt);

           LabelMessage.Text = result;
           TextBoxId.Text = "";
           TextBoxDescription.Text="";
           TextBoxSize.Text = "";
           TextBoxName.Text = "";
           TextBoxTime.Text = "";
           SetInitialRow();
           SetInitialRow1();
           endPrg:
           clrTree();
           bindtreeview();
    }
    protected void btn_update_Click(object sender, EventArgs e)
    {
        BasicDetails BasicInfo = new BasicDetails();

        BasicInfo.basicid = TextBoxId.Text;

        BasicInfo.name = TextBoxName.Text;

        BasicInfo.description = TextBoxDescription.Text;

        BasicInfo.expire_t = TextBoxTime.Text;

        BasicInfo.expire_s = TextBoxSize.Text;

        int rowIndex = 0;
        StringCollection sc = new StringCollection();
        string Editrd = "";

        if (ViewState["CurrentTable"] != null)
        {
            DataTable dtCurrentTable = (DataTable)ViewState["CurrentTable"];
            //DataRow drCurrentRow = null;
            if (dtCurrentTable.Rows.Count > 0)
            {
                for (int i = 1; i <= dtCurrentTable.Rows.Count; i++)
                {
                    //extract the TextBox values

                    TextBox box1 = (TextBox)gv_read.Rows[rowIndex].Cells[0].FindControl("TextBox1");

                    sc.Add(box1.Text);

                    ////////////////////////////////////////////////////////////////////////////////
                    Editrd = Editrd + "," + box1.Text;

                    rowIndex++;

                }

            }
        }
        Editrd = Editrd.TrimStart(',');
        int rowIndex1 = 0;
        StringCollection sc1 = new StringCollection();
        string Editwrt = "";
        if (ViewState["CurrentTable1"] != null)
        {
            DataTable dtCurrentTable1 = (DataTable)ViewState["CurrentTable1"];
            //DataRow drCurrentRow1 = null;
            if (dtCurrentTable1.Rows.Count > 0)
            {
                for (int i = 1; i <= dtCurrentTable1.Rows.Count; i++)
                {
                    //extract the TextBox values

                    TextBox box2 = (TextBox)gv_write.Rows[rowIndex1].Cells[0].FindControl("TextBox2");

                    sc1.Add(box2.Text);

                    ////////////////////////////////////////////////////////////////////////////////
                    Editwrt = Editwrt + "," + box2.Text;

                    rowIndex1++;

                }

            }
        }
        Editwrt = Editwrt.TrimStart(',');

        string result = objServiceClientobjService.GetUpdatedBasic(BasicInfo, Editrd, Editwrt);

        LabelMessage.Text = result;
        TextBoxId.Text = "";
        TextBoxDescription.Text = "";
        TextBoxSize.Text = "";
        TextBoxName.Text = "";
        TextBoxTime.Text = "";
        SetInitialRow();
        SetInitialRow1();
        bindtreeview();
        btn_save.Enabled = true;
        btn_update.Enabled = false;
    }
Beispiel #21
0
        public static MedicareResponse GetExpectedMedicate()
        {
            #region Contacts
            Collection <Contact> contacts = new Collection <Contact>();
            contacts.Add(new Contact()
            {
                ContactType  = "telephone",
                ContactValue = "AAABBBCCCC"
            });
            contacts.Add(new Contact()
            {
                ContactType  = "url",
                ContactValue = "www.website.com"
            });
            #endregion

            #region address
            Address address = new Address()
            {
                StreetLine1 = "ADDRESSLINE1",
                StreetLine2 = "ADDRESSLINE2",
                City        = "CITY",
                State       = "ST",
                Zip         = "920543314"
            };
            #endregion

            #region Requested service types
            Collection <MedicareService> medicareServices = new Collection <MedicareService>();
            medicareServices.Add(new MedicareService()
            {
                Type                = "30",
                TypeLabel           = "Health Benefit Plan Coverage",
                PlanType            = "MA",
                Active              = true,
                StartDate           = "2005-04-01",
                EndDate             = null,
                Deductible          = 1184,
                DeductibleRemaining = 1184,
                CoinsurancePercent  = null,
                Copayment           = null,
                InfoValidTill       = "2013-12-31"
            });
            medicareServices.Add(new MedicareService()
            {
                Type                = "30",
                TypeLabel           = "Health Benefit Plan Coverage",
                PlanType            = "MB",
                Active              = true,
                StartDate           = "2005-04-01",
                EndDate             = null,
                Deductible          = 147,
                DeductibleRemaining = 0,
                CoinsurancePercent  = 20,
                Copayment           = null,
                InfoValidTill       = "2013-12-31"
            });
            medicareServices.Add(new MedicareService()
            {
                Type                = "30",
                TypeLabel           = "Health Benefit Plan Coverage",
                PlanType            = "MC",
                Active              = true,
                StartDate           = "2009-01-01",
                EndDate             = null,
                Deductible          = null,
                DeductibleRemaining = null,
                CoinsurancePercent  = null,
                Copayment           = null,
                InfoValidTill       = "2013-12-31"
            });
            medicareServices.Add(new MedicareService()
            {
                Type                = "30",
                TypeLabel           = "Health Benefit Plan Coverage",
                PlanType            = "PR",
                Active              = true,
                StartDate           = "2011-06-01",
                EndDate             = null,
                Deductible          = null,
                DeductibleRemaining = null,
                CoinsurancePercent  = null,
                Copayment           = null,
                InfoValidTill       = "2013-12-31"
            });

            #endregion

            #region requested_procedure_codes
            Collection <ProcedureCodes> procedureCodes = new Collection <ProcedureCodes>();
            procedureCodes.Add(new ProcedureCodes()
            {
                ProcedureCode       = "G0106",
                ProcedureLabel      = "Colorectal Cancer Screening (COLO)",
                PlanType            = "MB",
                Active              = true,
                Deductible          = 0,
                DeductibleRemaining = null,
                CoinsurancePercent  = 20,
                Copayment           = null,
                InfoValidTill       = "2013-12-31",
                NextEligibleDate    = new EligibleDate()
                {
                    Professional = "2012-07-01",
                    Technical    = "2012-06-01"
                }
            });
            #endregion

            BasicDetails basicDetails = new BasicDetails()
            {
                Active          = true,
                PayerName       = "ORGNAME",
                PolicyNumber    = "POLICYNUMBER",
                EffectiveDate   = "2011-06-01",
                TerminationDate = "2012-06-01",
                Contacts        = contacts,
                Address         = new Address()
                {
                    StreetLine1 = "ADDRESSLINE1",
                    StreetLine2 = "ADDRESSLINE2",
                    City        = "CITY",
                    State       = "ST",
                    Zip         = "ZIPCODE"
                },
            };

            return(new MedicareResponse()
            {
                CreatedAt = Convert.ToDateTime("2013-07-17T18:11:01Z"),
                EligibleId = "87RU2GTQ882ILC",
                LastName = "LNAME",
                FirstName = "FNAME",
                MiddleName = "J",
                MemberId = "123456789A",
                GroupId = "070607801700001",
                GroupName = "SOME GROUP COMPANIES",
                Dob = "1940-04-01",
                Gender = "F",
                Address = address,
                PayerName = "CMS",
                PayerId = null,
                PlanNumber = "0706078",
                EligibiltyDates = new DatesPeriod()
                {
                    Start = "2012-02-01",
                    End = "2013-03-31"
                },
                InactivityDates = new DatesPeriod()
                {
                    Start = "2012-03-01",
                    End = "2012-05-03"
                },
                PlanTypes = new PlanType()
                {
                    MA = "Medicare Part A (Hospital)",
                    MB = "Medicare Part B (Professional Services)",
                    MC = "Medicare Part C (Advantage)",
                    MD = "Medicare Part D (Prescription drugs)",
                    PR = "Primary insurance (Medicare Secondary, Other Insurance is Primary)"
                },
                PlanDetails = new PlanDetails()
                {
                    MA = new HospitalAndProfessionalDetails()
                    {
                        Active = true,
                        StartDate = "2005-04-01",
                        EndDate = null,
                        Deductible = 1184,
                        DeductibleRemaining = 1184,
                        CoinsurancePercent = null,
                        Copayment = null,
                        InfoValidTill = "2013-12-31"
                    },
                    MB = new HospitalAndProfessionalDetails()
                    {
                        Active = true,
                        StartDate = "2005-04-01",
                        EndDate = null,
                        Deductible = 147,
                        DeductibleRemaining = 0,
                        CoinsurancePercent = 20,
                        Copayment = null,
                        InfoValidTill = "2013-12-31"
                    },
                    MC = new MCDetails()
                    {
                        Active = true,
                        PayerName = "ORGNAME",
                        InsuranceType = "IN",
                        InsuranceTypeLabel = "Indemnity",
                        McoBillOptionCode = "C",
                        McoBillOptionLabel = "MCO should process all claims",
                        Locked = true,
                        PolicyNumber = "H0000 999",
                        EffectiveDate = "2009-01-01",
                        TerminationDate = null,
                        Contacts = contacts,
                        Address = new Address()
                        {
                            StreetLine1 = "ADDRESSLINE1",
                            StreetLine2 = "ADDRESSLINE2",
                            City = "CITY",
                            State = "ST",
                            Zip = "ZIPCODE"
                        },
                    },
                    MD = new BasicDetails()
                    {
                        Active = true,
                        PayerName = "ORGNAME",
                        PolicyNumber = "S0000 999",
                        EffectiveDate = "2012-01-01",
                        TerminationDate = null,
                        Contacts = contacts,
                        Address = new Address()
                        {
                            StreetLine1 = "ADDRESSLINE1",
                            StreetLine2 = "ADDRESSLINE2",
                            City = "CITY",
                            State = "ST",
                            Zip = "123456"
                        },
                    },
                    PR = new Collection <BasicDetails>()
                    {
                        basicDetails
                    }
                },
                RequestedServiceTypes = medicareServices,
                RequestedProcedureCodes = procedureCodes
            });
        }
Beispiel #22
0
            public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs)
            {
                global::System.Xml.Schema.XmlSchemaComplexType type     = new global::System.Xml.Schema.XmlSchemaComplexType();
                global::System.Xml.Schema.XmlSchemaSequence    sequence = new global::System.Xml.Schema.XmlSchemaSequence();
                BasicDetails ds = new BasicDetails();

                global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny();
                any1.Namespace       = "http://www.w3.org/2001/XMLSchema";
                any1.MinOccurs       = new decimal(0);
                any1.MaxOccurs       = decimal.MaxValue;
                any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
                sequence.Items.Add(any1);
                global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny();
                any2.Namespace       = "urn:schemas-microsoft-com:xml-diffgram-v1";
                any2.MinOccurs       = new decimal(1);
                any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
                sequence.Items.Add(any2);
                global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute();
                attribute1.Name       = "namespace";
                attribute1.FixedValue = ds.Namespace;
                type.Attributes.Add(attribute1);
                global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute();
                attribute2.Name       = "tableTypeName";
                attribute2.FixedValue = "BasicDetailDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
                if (xs.Contains(dsSchema.TargetNamespace))
                {
                    global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
                    global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
                    try {
                        global::System.Xml.Schema.XmlSchema schema = null;
                        dsSchema.Write(s1);
                        for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext();)
                        {
                            schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
                            s2.SetLength(0);
                            schema.Write(s2);
                            if ((s1.Length == s2.Length))
                            {
                                s1.Position = 0;
                                s2.Position = 0;
                                for (; ((s1.Position != s1.Length) &&
                                        (s1.ReadByte() == s2.ReadByte()));)
                                {
                                    ;
                                }
                                if ((s1.Position == s1.Length))
                                {
                                    return(type);
                                }
                            }
                        }
                    }
                    finally {
                        if ((s1 != null))
                        {
                            s1.Close();
                        }
                        if ((s2 != null))
                        {
                            s2.Close();
                        }
                    }
                }
                xs.Add(dsSchema);
                return(type);
            }