示例#1
0
        private void InsertCourse(int collegeId)
        {
            try
            {
                var objCollegeBranchCourseProperty = new CollegeBranchCourseProperty
                {
                    CollegeBranchId =
                        collegeId,
                    CourseId     = Convert.ToInt16(ddlCourse.SelectedValue),
                    UniversityId =
                        Convert.ToInt16(ddlUniversity.SelectedValue),
                    HasHostel = chkHasHostel.Checked,
                    CollegeBranchCourseDesc =
                        txtCourseDesc.Value != "" ? txtCourseDesc.Value : "N/A",
                    CollegeBranchCourseEst =
                        txtCourseEst.Value != ""
                                                                     ? txtCourseEst.Value
                                                                     : "N/A",
                    CollegeBranchCourseTitle = txtCourseTitle.Value != ""
                                                                                            ? txtCourseTitle.Value
                                                                                            : "N/A",
                    CollegeBranchCourseMetaDesc =
                        txtCourseMetaDesc.Value != ""
                                                                     ? txtCourseMetaDesc.Value
                                                                     : "N/A",
                    CollegeBranchCourseMetaTag =
                        txtCourseMetaTag.Value != ""
                                                                     ? txtCourseMetaTag.Value
                                                                     : "N/A",
                    CollegeBranchCourseUrl =
                        txtCourseUrl.Value != "" ? txtCourseUrl.Value : "N/A",

                    CollegeBranchCourseStatus        = chkCollegeCourse.Checked,
                    CollegeBranchCourseSponserStatus = chkSponserStatus.Checked
                };
                var errMsg = "";
                var collegeCourseBranchId = 0;
                var result = CollegeProvider.Instance.UpdateCollegeBranchCourseInfo(objCollegeBranchCourseProperty, 1,
                                                                                    out errMsg,
                                                                                    out collegeCourseBranchId);
                if (result > 0)
                {
                    BindCollegeListByQuery("");
                    lblResult.Visible  = true;
                    lblResult.Text     = errMsg;
                    lblResult.CssClass = "success";
                }
            }
            catch (Exception ex)
            {
                var err = ex.Message;
                if (ex.InnerException != null)
                {
                    err = err + " :: Inner Exception :- " + ex.ToString();
                }
                const string addInfo = "Error while executing CourseUpdate_Click in UpdateCollegeDetails  :: -> ";
                var          objPub  = new ClsExceptionPublisher();
                objPub.Publish(err, addInfo);
            }
        }
示例#2
0
        //method to college register in collegemaster by indu kumar pandey
        private void DoCollegeRegister(int userId, int countryId)
        {
            try
            {
                var errMsg    = "";
                var collegeId = 0;
                var objCommon = new Common();
                var objCollegeBranchProperty = new CollegeBranchProperty()
                {
                    CollegeBranchName      = txtCollegeName.Text,
                    CollegeBranchMobileNo  = txtCollegePhone.Text.Trim(),
                    CollegeBranchCountryId = countryId,
                    CollegeBranchStateId   = Convert.ToInt32(ddlState.SelectedValue),
                    CollegeBranchCityId    = Convert.ToInt32(hndCityId.Value),
                };
                CollegeProvider.Instance.InsertCollegeBranchInfo(objCollegeBranchProperty, userId,
                                                                 out errMsg, out collegeId);

                var data = hndCollegeCourse.Value.Split(',');
                for (var i = 0; i < data.Count(); i++)
                {
                    var collegebranchCourseId = 0;

                    CollegeBranchCourseProperty objCollegeBranchCourseProperty = new CollegeBranchCourseProperty();
                    objCollegeBranchCourseProperty.CollegeBranchCourseId     = 0;
                    objCollegeBranchCourseProperty.CollegeBranchId           = collegeId;
                    objCollegeBranchCourseProperty.CollegeBranchCourseStatus = true;
                    objCollegeBranchCourseProperty.CourseId = Convert.ToInt32(data[i]);
                    CollegeProvider.Instance.InsertCollegeBranchCourseInfo(objCollegeBranchCourseProperty, userId, out errMsg, out collegebranchCourseId);
                }
                objCommon.InsertCollegeContactPersonDetails(userId, txtCollegeContactPersonName.Text, txtContactDesignation.Text,
                                                            txtMobile.Text, txtEmailId.Text, collegeId);
                if (collegeId > 0)
                {
                    InsertUserIdAndCollegeId(userId, collegeId);
                }
                else
                {
                    var collegeData =
                        CollegeProvider.Instance.GetCollegeCourseListByCollegeName(txtCollegeName.Text.Trim());
                    InsertUserIdAndCollegeId(userId, collegeData.First().CollegeIdBranchId);
                }
            }
            catch (Exception ex)
            {
                var err = ex.Message;
                if (ex.InnerException != null)
                {
                    err = err + " :: Inner Exception :- " + ex.InnerException.Message;
                }
                const string addInfo = "Error while executing DoCollegeRegister in CollegeRegisteration.aspx  :: -> ";
                var          objPub  = new ClsExceptionPublisher();
                objPub.Publish(err, addInfo);
            }
        }
示例#3
0
 public abstract int UpdateCollegeBranchCourseInfo(CollegeBranchCourseProperty objCollegeBranchCourseProperty, int modifiedBy, out string errmsg,
                                                   out int collegeBranchCourseId);
示例#4
0
 public abstract int InsertCollegeBranchCourseInfo(CollegeBranchCourseProperty objCollegeBranchCourseProperty, int createdBy, out string errmsg,
                                                   out int collegeBranchCourseId);