Tuesday 12 March 2013

IGNOU MCA, Masters in Computer Application

IGNOU MCA, Masters in Computer Application

IGNOU's Master of Computer Applications Programme is a 3-year programme. The broad objective of the MCA programme is to prepare graduate students for productive careers in software industry and academia by providing an outstanding environment for teaching and research in the core and emerging areas of the discipline. The programme's thrust is on giving the students a thorough and sound background in theoretical and application-oriented courses relevant to the latest computer software development. The programme emphasizes the application of software technology to solve mathematical, computing, communications / networking and commercial problems. MCA programme consists of 31 courses worth 108 credits.
IGNOU MCA Eligibility Criteria
The eligibility criteria for the MCA programme (as on Jan, 2005) are:
Bachelor of Computer Science / Applications / Information Sciences / Information Technology from Recognized / Deemed University.
OR
Other Graduates / Non-Computer Science B.Tech / M.Sc (such applicants are required to pursue CIC concurrently with MCA 1st semester)
OR
Graduates with PGDCA from a Recogniaed / Deemed University or its equivalent course not less than one year from a State Board of Technical Education, or its equivalent body established by the Central / State Government.
IGNOU MCA Programme Structure
The programme structure for MCA is:
I Semeter
Course Code Course Title
MCS-011 Problem Solving and Programming
MCS-012 Computer Organization and Assembly language Programming
MCS-013 Discrete Mathematics
MCS-014 Systems Analysis and Design
MCS-015 Communication Skills
MCSL-016 Internet Concepts and Web Design
MCSL-017 C and Assembly Language Programming Lab
II Semester
Course Code Course Title
MCS-021 Data and File Structures
MCS-022 Operating System Concepts and Networking Management
MCS-023 Introduction to Database Management Systems
MCS-024 Object Oriented Technologies and Java Programming
MCS-025 MCSL-025 Lab (based on MCS-021, 022, 023 & 024)
III Semester
Course Code Course Title
MS-031 Design and Analysis of Algorithms
MCS-032 Object Oriented Analysis and Design
MCS-033 Advanced Discrete Mathematics
MCS-034 Software Engineering
MCS-035 Accountancy and Financial Management
MCSL-036 Lab(based on MCS-032, 034 and 035) 3
IV Semester
Course Code Course Title
MCS-041 Operating Systems
MCS-042 Data Communication and Computer Networks
MCS-043 Advanced Database Management Systems
MCS-044 Mini Project
MCSL-045 Lab(UNIX & Oracle)
V Semester
Course Code Course Title
MCS-051 Advanced Internet Technologies
MCS-052 Principles of Management and Information Systems
MCS-053 Computer Graphics and Multimedia
MCSL-054 Lab( based on MCS-051 & 053)
MCSE-01 to 12 3 Stream* Courses

VI Semester
Course Code Course Title
MCSP-060 Project

Monday 17 September 2012

Upload multiple product in mvc3 using xsl file

     Controller
 [HttpPost]
        public ActionResult Digitalproduct(AddProduct model)
        {
            DiGIFUNTION();
            return View();
        }


  public void DiGIFUNTION()
        {
            string filePath = null;
            foreach (string inputTagName in Request.Files)
            {
                HttpPostedFileBase Infile = Request.Files[inputTagName];
                if (Infile.ContentLength > 0 && (Path.GetExtension(Infile.FileName) == ".xls" || Path.GetExtension(Infile.FileName) == ".xlsx" || Path.GetExtension(Infile.FileName) == ".xlsm"))
                {
                    filePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory,
                                  Path.GetFileName(Infile.FileName));
                    try
                    {
                        if (System.IO.File.Exists(filePath))
                        {
                            System.IO.File.Delete(filePath);
                        }
                        Infile.SaveAs(filePath);
                    }
                    catch (Exception ee)
                    {
                    }

                    //Infile.SaveAs(filePath);
                }
                else
                {
                    ModelState.AddModelError("Error", "Only Excel Format Allowed..");
               
                }

                if (filePath != null)
                {
                    System.Data.OleDb.OleDbConnection oconn = new System.Data.OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + filePath.ToString() + ";Extended Properties=\"Excel 12.0 Xml;HDR=YES\";");
                    oconn.Open();

                    try
                    {
                        if (oconn.State == System.Data.ConnectionState.Closed)
                            oconn.Open();
                    }
                    catch (Exception ex)
                    {
                        // MessageBox.Show(ex.Message);
                    }

                    dynamic myTableName = oconn.GetSchema("Tables").Rows[0]["TABLE_NAME"];
                    OleDbCommand ocmd = new OleDbCommand("select * from [" + myTableName + "]", oconn);
                    OleDbDataReader odr = ocmd.ExecuteReader();
                    if (odr.HasRows)
                    {
                        while (odr.Read())
                        {

                            AddProduct Varproduct=new AddProduct (); 
                            var RemoveDupProduct = CheckProductName(odr[1].ToString().Trim());
                         //   Varproduct.ProductTitle = odr[1].ToString().Trim();
                            Varproduct.Image = odr[2].ToString().Trim();
                            Varproduct.Description = odr[3].ToString().Trim();
                            Varproduct.featured = Convert.ToInt32(odr[4]);
                            Varproduct.Expert= odr[5].ToString().Trim();
                            try
                            {
                                if (RemoveDupProduct == true)
                                {
                                    ModelState.AddModelError("Error", "Your product will be Added Soon..");
                                   
                                }
                                else
                                {
                                    ModelState.AddModelError("Error", "Product Already Exists");
                                   // Response.Write(" <br/>Product Name " + odr[1].ToString().Trim() + " Already exists <br/>");
                                   
                                }
                              
                            }
                            catch (Exception ee)
                            {
                                Response.Write("Error While uploading==:" + ee.ToString());
                            }
                        }
                    }

                }
            }
        }

Thursday 13 September 2012

Dropdown list in Mvc3

Dropdown list in asp.net Mvc 3  using Razor

1)Create Model   
    public class AddCatagory
    {       
        public List<SelectListItem> ParentList { get; set; }      
        [DisplayName("Parent")]
        public int parent { get; set; }
     }

2) Controller
        public ActionResult AddCatagory(AddCatagory AddModel)
        {
            AddModel.ParentList = parentListFu("VS");
            //AddModel.parent =0 ;
            return View(AddModel);// dont pass to forgot model in view
    }
      

// hardcoded function in controller

      private List<SelectListItem> parentListFu(string defaultValue)
        {
             List<SelectListItem> items = new List<SelectListItem>();
              items.Add(new SelectListItem { Text = "Nagaur", Value = "Na", Selected = (defaultValue == "na") });
         items.Add(new SelectListItem { Text = "Thalanju", Value = "Th", Selected = (defaultValue == "th") });     
           
            return items;
    }

3)View

@model Constellation.Models.BusinessLogic.AddCatagory // include model name view

for Dropdownlist
 
 @Html.DropDownListFor(x => x.parent, Model.ParentList, new { @class = "full-width" })

Tuesday 11 September 2012

Form Tag in Mvc3 Razor


Form tag in Asp.net mvc3 Razor
 @using (Html.BeginForm("About","Home", FormMethod.Post, new { @class = "form with-margin", @name = "login-form", @id = "login-form" }))
 {

  //Code here

 }

Render like

<form name="login-form" method="post" id="login-form" class="form with-margin" action="/Home/About">

</form> 

Monday 3 September 2012

Asp.net MVC 3 Database Connectivity using Entity framework.



Asp.net MVC 3 Database Connectivity using Entity framework.

First open the VS 2010.

After this
 
Database Structure???  Create registration table in database.



Now add the New Entity Model.


Next Step


Next Step


Now click on new connection now choose Microsoft Sql Server.

 
Continue.  Select the database that you have created in Database.





After this
Select the Table name.


Now click on finish button.


Now create the new controller.. Right click on controller and add new controller and type the controller testcontroller. While creating controller choose controllerwithempyt read/write mode.
[Note:-if we will create the test controller then in views test folder automatically will be generated.]
 

Now first build the solution….. For refreshing the model
Click on testcontroller look likes 



Right click on index >>Add view >> choose strong type view >> Choose Model class >> LIST


Then in Views folder >> Test folder >> index.chtml will be created.
List  ::

Coding:
     private mvcEntities _db = new mvcEntities();

       public ActionResult Index()
        {
            return View(_db.registations.ToList());
        }

Output:



Same as for create new view ,edit view ,delete view.
Create new:
  // GET: /work/Create

        public ActionResult Create()
        {
            return View();
        }

        //
        // POST: /work/Create

        [HttpPost]
        public ActionResult Create(registation model)
        {
            try
            {
                if (!ModelState.IsValid)

                    return View();

                _db.AddToregistation(model);
              

                _db.SaveChanges();

                return RedirectToAction("Index");

                // TODO: Add insert logic here

             
            }
            catch
            {
                return View();
            }
        }
       
Output screen


Edit View: Right click on edit View >> ADD View >> strong type >>Edit

        public ActionResult Edit(int id)
        {
            var RecordToEdit = (from m in _db.registation

                               where m.id == id

                               select m).First();

            return View(RecordToEdit);

           
        }

        //
        // POST: /work/Edit/5

        [HttpPost]
        public ActionResult Edit(int id,registation regtoedit)
        {
            try
            {
                // TODO: Add update logic here

                var originalMovie = (from m in _db.registation

                                     where m.id == regtoedit.id

                                     //select m).First();
                                     select m).First();

                if (!ModelState.IsValid)

                    return View(originalMovie);

                _db.ApplyPropertyChanges(originalMovie.EntityKey.EntitySetName, regtoedit);

                _db.SaveChanges();

                return RedirectToAction("Index");

            }
            catch
            {
                return View();
            }
        }

        //
     

Delete View: Right click on edit View >> ADD View >> Partial View >>Delete


  // GET: /work/Delete/5

        public ActionResult Delete(int id)
        {
             var originalMovie = (from m in _db.registation

                                 where m.id == id

                                 select m).First();

            _db.DeleteObject(originalMovie);
            _db.SaveChanges();

            return RedirectToAction("Index");
        }

        //
        // POST: /work/Delete/5

        [HttpPost]
        public ActionResult Delete(int id,registation model)
        {
            try
            {
                var originalMovie = (from m in _db.registation

                                     where m.id == id

                                     select m).First();
               
                _db.DeleteObject(originalMovie);
                _db.SaveChanges();

                return RedirectToAction("Index");
            }
            catch
            {
                return View();
            }
        }
    }

Now build the solution …
Thanks Happy Coding.