Ejemplo n.º 1
0
        public List <TrainingPartnerDO> SearchTrainingPartner(TrainingPartnerDO objDO)
        {
            List <TrainingPartnerDO> objList = new List <TrainingPartnerDO>();

            var result = db.stp_tblTrainingPartner_Search(objDO.TrainingPartnerName, objDO.TrainingPartnerCode, objDO.StateId, objDO.City).ToList();

            if (result != null)
            {
                foreach (var item in result)
                {
                    TrainingPartnerDO objNew = new TrainingPartnerDO();
                    objNew.TrainingPartnerId   = item.TrainingPartnerId;
                    objNew.TrainingPartnerName = item.TrainingPartnerName;
                    objNew.TrainingPartnerCode = item.TrainingPartnerCode;
                    objNew.POCName             = item.POCName;
                    objNew.TPAddress           = item.TPAddress;
                    objNew.TPDescription       = item.TPDescription;
                    objNew.NoOfCenters         = Convert.ToInt32(item.NoOfCenters);
                    objNew.POCMobileNo         = item.POCMobileNo;
                    objNew.StateId             = Convert.ToInt32(item.StateId);
                    objNew.City = item.City;


                    objList.Add(objNew);
                }
            }
            return(objList);
        }
Ejemplo n.º 2
0
        public int UpdateJobRoleDetailsForTP(TrainingPartnerDO objDO)
        {
            //var result = db.STP_tblOnlinetestDetailsLatest_Update(objDO.OnlineTestDetailsId, objDO.OnlineTestId, objDO.questionBankId, objDO.topicId, objDO.chapterId, null, null, 0, 0, 0, objDO.marks, objDO.createdBy, DateTime.Now);
            var result = 0;

            return(result);
        }
Ejemplo n.º 3
0
        public TrainingPartnerDO GetTPDetailsById(int TrainingPartnerId)
        {
            TrainingPartnerDO objDO = new TrainingPartnerDO();

            objDO = objDAL.GetTPDetailsById(TrainingPartnerId);
            return(objDO);
        }
Ejemplo n.º 4
0
        public List <TrainingPartnerDO> SearchTrainingPartner(TrainingPartnerDO objDO)
        {
            List <TrainingPartnerDO> objList = new List <TrainingPartnerDO>();

            objList = objDAL.SearchTrainingPartner(objDO);
            return(objList);
        }
Ejemplo n.º 5
0
        public int SaveJobRoleDetailsForTP(TrainingPartnerDO objDO)
        {
            var result       = db.stp_tbltpjobroles_Insert(objDO.TrainingPartnerId, objDO.SSCId, Convert.ToInt32(objDO.JobRole), "", objDO.CreatedBy, DateTime.Now, null, null);
            int resultstatus = 0;

            if (result > 0)
            {
                resultstatus = 1;
            }
            else
            {
                resultstatus = result;
            }

            return(resultstatus);
        }
Ejemplo n.º 6
0
        public int UpdateTPDetails(TrainingPartnerDO objDO)
        {
            var result = db.stp_tblTrainingPartner_Update(objDO.TrainingPartnerId, objDO.TrainingPartnerName, objDO.TrainingPartnerCode,
                                                          objDO.POCName, objDO.TPAddress, objDO.TPDescription, objDO.NoOfCenters, objDO.POCMobileNo, objDO.StateId,
                                                          objDO.City, objDO.Createddate, objDO.CreatedBy, objDO.Updatedate, objDO.Updatedby);
            var returnStatus = 0;

            if (result != null)
            {
                foreach (var item in result)
                {
                    returnStatus = item.Value;
                }
            }

            return(returnStatus);
        }
Ejemplo n.º 7
0
        public int SaveTPDetails(TrainingPartnerDO od)
        {
            int resultstatus = 0;
            var partner      = db.stp_tblTrainingPartner_Insert(od.TrainingPartnerName, od.TrainingPartnerCode, od.POCName, od.TPAddress, od.TPDescription,
                                                                od.NoOfCenters, od.POCMobileNo, od.StateId, od.City, od.Createddate, od.CreatedBy, od.Updatedate, od.Updatedby);

            if (partner > 0)
            {
                resultstatus = 1;
            }
            else
            {
                resultstatus = partner;
            }

            return(resultstatus);
        }
        public ActionResult UpdateTrainingPartner(int TrainingPartnerId)
        {
            GetStateList();

            var instanceId = Session["InstanceId"];


            if (instanceId != null)

            {
                GetSSCList(instanceId.ToString());
            }
            else
            {
            }

            if (TrainingPartnerId == 0)
            {
                ViewData["UpdateTrainingPartner"] = null;
            }
            else
            {
                TrainingPartnerBL objBl = new TrainingPartnerBL();
                TrainingPartnerDO objDO = new TrainingPartnerDO();
                objDO = objBl.GetTPDetailsById(TrainingPartnerId);
                if (objDO != null)
                {
                    ViewData["TPDetails"] = objDO;
                }
                else
                {
                    ViewData["TPDetails"]             = null;
                    ViewData["UpdateTrainingPartner"] = null;
                }
            }



            return(View());
        }
        public int SaveTrainingPartner(TrainingPartnerDO od)
        {
            int returnstatus = 0;
            int InstanceId   = Convert.ToInt32(Session["InstanceId"].ToString());

            TrainingPartnerDO ob = new TrainingPartnerDO();

            ob.TrainingPartnerId   = od.TrainingPartnerId;
            ob.TrainingPartnerName = od.TrainingPartnerName;
            ob.TrainingPartnerCode = od.TrainingPartnerCode;
            ob.POCName             = od.POCName;
            ob.TPAddress           = od.TPAddress;
            ob.TPDescription       = od.TPDescription;
            ob.NoOfCenters         = od.NoOfCenters;
            ob.POCMobileNo         = od.POCMobileNo;
            ob.StateId             = od.StateId;
            ob.City        = od.City;
            ob.Createddate = od.Createddate;
            ob.CreatedBy   = 1194;
            ob.Updatedate  = od.Updatedate;
            ob.Updatedby   = 1195;
            int result = 0;
            TrainingPartnerBL objBL = new TrainingPartnerBL();

            result = objBL.SaveTPDetails(ob);

            if (result == 1)
            {
                returnstatus = 1;
            }

            else
            {
                returnstatus = -1;
            }
            return(returnstatus);
        }
Ejemplo n.º 10
0
        public TrainingPartnerDO GetTPDetailsById(int TrainingPartnerId)
        {
            TrainingPartnerDO objDO = new TrainingPartnerDO();
            var result = db.stp_tblTrainingPartnerDetails_SELById(TrainingPartnerId);

            if (result != null)
            {
                foreach (var item in result)
                {
                    objDO.TrainingPartnerId   = item.TrainingPartnerId;
                    objDO.TrainingPartnerName = item.TrainingPartnerName;
                    objDO.TrainingPartnerCode = item.TrainingPartnerCode;
                    objDO.POCName             = item.POCName;
                    objDO.TPAddress           = item.TPAddress;
                    objDO.TPDescription       = item.TPDescription;
                    objDO.NoOfCenters         = Convert.ToInt32(item.NoOfCenters);
                    objDO.POCMobileNo         = item.POCMobileNo;
                    objDO.StateId             = Convert.ToInt32(item.StateId);
                    objDO.City = item.City;
                }
            }

            return(objDO);
        }
Ejemplo n.º 11
0
        public List <TrainingPartnerDO> GetJobRoleDetailsByTpId(int InstanceId, int TrainingPartnerId)
        {
            List <TrainingPartnerDO> objList = new List <TrainingPartnerDO>();

            var result = db.stp_GetJobRoleDetails(InstanceId, TrainingPartnerId).ToList();

            if (result != null)
            {
                if (result.Count > 0)
                {
                    foreach (var item in result)
                    {
                        TrainingPartnerDO objNewDO = new TrainingPartnerDO();
                        objNewDO.ClassificationName    = item.ClassificationName;
                        objNewDO.SubClassificationName = item.SubClassificationName;
                        objNewDO.Description           = item.Description;


                        objList.Add(objNewDO);
                    }
                }
            }
            return(objList);
        }
Ejemplo n.º 12
0
 public int SaveJobRoleDetailsForTP(TrainingPartnerDO objDO)
 {
     return(objDAL.SaveJobRoleDetailsForTP(objDO));
 }
Ejemplo n.º 13
0
 public int UpdateTPDetails(TrainingPartnerDO objDO)
 {
     return(objDAL.UpdateTPDetails(objDO));
 }
Ejemplo n.º 14
0
 public int SaveTPDetails(TrainingPartnerDO od)
 {
     return(objDAL.SaveTPDetails(od));
 }