Ejemplo n.º 1
0
        /// <summary>
        /// Inserts FileUpload data into database
        /// FileId will be updated with the database identity
        /// </summary>
        /// <param name="requirementId">Internship RequirementId</param>
        /// <param name="tnx">Transcation crerated from  student object</param>
        public void Insert(int requirementId, IDbTransaction tnx)
        {
            try
            {
                StudentContentDataService dataService = new StudentContentDataService(tnx);

                dataService.Insert(ref _fileId, requirementId, _transcript, _resume);
            }
            catch
            {
                throw;
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Creates a FileUpload object with data Loaded from the database
        /// </summary>
        /// <param name="requirementId"> Internship RequirementId</param>
        /// <returns></returns>
        public static StudentContent Load(int requirementId)
        {
            try
            {
                StudentContentDataService dataService = new StudentContentDataService();

                DataSet        ds      = dataService.Load(requirementId);
                StudentContent objFile = new StudentContent();

                return((objFile.MapData(ds)) ? objFile : null);
            }
            catch
            {
                throw;
            }
        }
Ejemplo n.º 3
0
 public StudentContent MapDataOtherSkillsContent(string requirementId)
 {
     try
     {
         StudentContent            objSC         = new StudentContent();
         StudentContentDataService myDataService = new StudentContentDataService();
         DataTable MyDatatable = myDataService.LoadOtherSkillContent(requirementId);
         foreach (DataRow row in MyDatatable.Rows)
         {
             string temp = row.ItemArray[0] as string;
             this.OtherSkillContent  = temp;
             objSC.OtherSkillContent = temp;
         }
         return(objSC);
     }
     catch
     {
         throw;
     }
 }
Ejemplo n.º 4
0
        private void OtherSkillContentInsert(string requirementId, IDbTransaction tnx)
        {
            StudentContentDataService dataService = new StudentContentDataService(tnx);

            try
            {
                //Resume Content
                if (_OtherSkillContent != "")                           //this checks before if ResumeConent property has data.
                {
                    dataService.OtherSkillContentDelete(requirementId); //Deletes before inserting(subtituing update methods.
                    dataService.OtherSkillContentInsert(requirementId, _OtherSkillContent);
                }
                dataService.Txn.Commit();
            }
            catch
            {
                dataService.Txn.Rollback();
                throw;
            }
        }
Ejemplo n.º 5
0
        public StudentContent MadDataSkills(string requirementId)
        {
            try
            {
                StudentContent            objSC         = new StudentContent();
                StudentContentDataService myDataService = new StudentContentDataService();
                DataTable MyDatatable = myDataService.LoadSkillReport(requirementId);
                foreach (DataRow row in MyDatatable.Rows)
                {
                    string temp = row.ItemArray[0] as string;
                    switch (temp)
                    {
                    case "1":
                        this.CiscoRouter  = temp;
                        objSC.CiscoRouter = temp;
                        break;

                    case "2":
                        this.WAN  = temp;
                        objSC.WAN = temp;
                        break;

                    case "3":
                        this.TCPIP  = temp;
                        objSC.TCPIP = temp;
                        break;

                    case "4":
                        this.Data  = temp;
                        objSC.Data = temp;
                        break;

                    case "5":
                        this.Network  = temp;
                        objSC.Network = temp;
                        break;

                    case "6":
                        this.Java  = temp;
                        objSC.Java = temp;
                        break;

                    case "7":
                        this.Csharp  = temp;
                        objSC.Csharp = temp;
                        break;

                    case "8":
                        this.VBNET  = temp;
                        objSC.VBNET = temp;
                        break;

                    case "9":
                        this.CplusPlus  = temp;
                        objSC.CplusPlus = temp;
                        break;

                    case "10":
                        this.PHP  = temp;
                        objSC.PHP = temp;
                        break;

                    case "11":
                        this.ASPNET  = temp;
                        objSC.ASPNET = temp;
                        break;

                    case "12":
                        this.SQL  = temp;
                        objSC.SQL = temp;
                        break;

                    case "13":
                        this.Oracle  = temp;
                        objSC.Oracle = temp;
                        break;

                    case "14":
                        this.PMySQL  = temp;
                        objSC.PMySQL = temp;
                        break;
                    }
                }
                return(objSC);
            }
            catch
            {
                throw;
            }
        }
Ejemplo n.º 6
0
        private void SkillInsert(string requirementId, IDbTransaction tnx)
        {
            StudentContentDataService dataService = new StudentContentDataService(tnx);

            try
            {
                dataService.Delete_Res_reference(requirementId); //Deletes before inserting(subtituing update methods.

                //Networking
                if (_CiscoRouter != "")
                {
                    dataService.SkillInsert(requirementId, _CiscoRouter);
                }
                if (_WAN != "")
                {
                    dataService.SkillInsert(requirementId, _WAN);
                }
                if (_TCPIP != "")
                {
                    dataService.SkillInsert(requirementId, _TCPIP);
                }

                //Security
                if (_Data != "")
                {
                    dataService.SkillInsert(requirementId, _Data);
                }
                if (_Network != "")
                {
                    dataService.SkillInsert(requirementId, _Network);
                }

                //programming
                if (_Java != "")
                {
                    dataService.SkillInsert(requirementId, _Java);
                }
                if (_Csharp != "")
                {
                    dataService.SkillInsert(requirementId, _Csharp);
                }
                if (_VBnet != "")
                {
                    dataService.SkillInsert(requirementId, _VBnet);
                }
                if (_CplusPlus != "")
                {
                    dataService.SkillInsert(requirementId, _CplusPlus);
                }
                if (_PHP != "")
                {
                    dataService.SkillInsert(requirementId, _PHP);
                }

                if (_ASPNET != "")
                {
                    dataService.SkillInsert(requirementId, _ASPNET);
                }
                //Database
                if (_SQL != "")
                {
                    dataService.SkillInsert(requirementId, _SQL);
                }

                if (_Oracle != "")
                {
                    dataService.SkillInsert(requirementId, _Oracle);
                }
                if (_PMySQL != "")
                {
                    dataService.SkillInsert(requirementId, _PMySQL);
                }

                dataService.Txn.Commit();
                // tnx.Dispose();
            }
            catch
            {
                dataService.Txn.Rollback();
                throw;
            }
        }
Ejemplo n.º 7
0
 public void proOtherSkillContentInsert(string ID)
 {//start new transaction
     using (IDbTransaction Trans = StudentContentDataService.BeginTransaction()) { OtherSkillContentInsert(ID, Trans); };
 }