Beispiel #1
0
 protected void BtnUploadClick(object sender, EventArgs e)
 {
     _objCommon = new Common();
     try
     {
         _objFaqDetailsProperty = new FAQDetailsProperty();
         var objClsOledbdatalayer = new ClsOleDBDataWrapper();
         var path = MapPath(fileUploadExcel.FileName);
         fileUploadExcel.SaveAs(path);
         var excelSheets = objClsOledbdatalayer.CountTotalSheets(path);
         if (excelSheets.Length > 0)
         {
             foreach (var t in excelSheets)
             {
                 var ds = objClsOledbdatalayer.getdata(path, t);
                 if (ds.Tables[0].Rows.Count <= 0)
                 {
                     continue;
                 }
                 for (var j = 0; j <= ds.Tables[0].Rows.Count - 1; j++)
                 {
                     _objFaqDetailsProperty = new FAQDetailsProperty
                     {
                         FAQCategoryId      = Convert.ToInt16(ds.Tables[0].Rows[j]["FAQCategoryId"]),
                         FAQDetailsQuestion = ds.Tables[0].Rows[j]["FAQDetailsQuestion"].ToString(),
                         FAQDetailsAnswer   = ds.Tables[0].Rows[j]["FAQDetailsAnswer"].ToString(),
                         FAQDetailsStatus   = Convert.ToBoolean(ds.Tables[0].Rows[j]["FAQDetailsStatus"].ToString())
                     };
                     string errMsg;
                     var    result = FAQProvider.Instance.InsertFAQDetails(_objFaqDetailsProperty, LoggedInUserId, out errMsg);
                     if (result <= 0)
                     {
                         continue;
                     }
                     lblRecordsInserted.Text = "";
                     lblRecordsInserted.Text = j + " row inserted out of " + ds.Tables[0].Rows.Count;
                 }
                 lblSuccess.Text    = _objCommon.GetErrorMessage("lblSucessMsg");
                 lblSuccess.Visible = true;
                 Response.Redirect("FAQDetails.aspx");
             }
         }
         else
         {
             lblError.Text = _objCommon.GetErrorMessage("lblErrMsg");
         }
     }
     catch (Exception ex)
     {
         var err = ex.Message;
         if (ex.InnerException != null)
         {
             err = err + " :: Inner Exception :- " + ex.InnerException.Message;
         }
         const string addInfo = "Error while executing BtnUploadClick in AddFAQDetails.aspx  :: -> ";
         var          objPub  = new ClsExceptionPublisher();
         objPub.Publish(err, addInfo);
     }
 }
Beispiel #2
0
 protected void BtnUploadExcel(object sender, EventArgs e)
 {
     _objCommon = new Common();
     try
     {
         var objClsOledbdatalayer = new ClsOleDBDataWrapper();
         var path = MapPath(fulUploadExcel.FileName);
         fulUploadExcel.SaveAs(path);
         var excelSheets = objClsOledbdatalayer.CountTotalSheets(path);
         if (excelSheets.Length <= 0)
         {
             return;
         }
         foreach (string t in excelSheets)
         {
             DataSet ds = objClsOledbdatalayer.getdata(path, t);
             if (ds.Tables[0].Rows.Count > 0)
             {
                 for (var j = 0; j <= ds.Tables[0].Rows.Count - 1; j++)
                 {
                     var errMsg = "";
                     _objNoticeDetails = new NoticeDetails
                     {
                         NoticeUrl       = ds.Tables[0].Rows[j]["NoticeUrl"].ToString(),
                         NoticeTitle     = ds.Tables[0].Rows[j]["NoticeTitle"].ToString(),
                         NoticeSubject   = ds.Tables[0].Rows[j]["NoticeSubject"].ToString(),
                         NoticeMetaTag   = ds.Tables[0].Rows[j]["NoticeMetaTag"].ToString(),
                         NoticeShortDesc = ds.Tables[0].Rows[j]["NoticeShortDesc"].ToString(),
                         NoticeMetaDesc  = ds.Tables[0].Rows[j]["NoticeMetaDesc"].ToString(),
                         NoticeDesc      = ds.Tables[0].Rows[j]["NoticeDesc"].ToString(),
                         NoticeStatus    =
                             ds.Tables[0].Rows[j]["NoticeStatus"].ToString() == "True"
                                                         ? true
                                                         : false,
                         RealtedCollegeId =
                             Convert.ToInt16(
                                 ds.Tables[0].Rows[j]["RealtedCollegeId"].ToString()),
                         NoticeImage  = ds.Tables[0].Rows[j]["NoticeImage"].ToString(),
                         NoticeTypeId =
                             Convert.ToInt16(ds.Tables[0].Rows[j]["NoticeTypeId"].ToString())
                     };
                     var result = NewsArticleNoticeProvider.Instance.InsertNoticeDetails(_objNoticeDetails, LoggedInUserId,
                                                                                         out errMsg);
                 }
             }
         }
     }
     catch (Exception ex)
     {
         var err = ex.Message;
         if (ex.InnerException != null)
         {
             err = err + " :: Inner Exception :- " + ex.ToString();
         }
         const string addInfo = "Error while executing  in BtnUploadExcel at page AddNoticeDetails.aspx.cs  :: -> ";
         var          objPub  = new ClsExceptionPublisher();
         objPub.Publish(err, addInfo);
     }
 }
Beispiel #3
0
        protected void btnUpload_Click(object sender, EventArgs e)
        {
            var errMsg = "";

            _objCommon = new Common();
            try
            {
                var     _objUniversityCategoryProperty = new UniversityCategoryProperty();
                DataSet _ds = new DataSet();
                var     _objClsOledbdatalayer = new ClsOleDBDataWrapper();
                var     excelSheets           = new String[0];
                string  path = MapPath(fileUploadExcel.FileName);
                fileUploadExcel.SaveAs(path);
                excelSheets = _objClsOledbdatalayer.CountTotalSheets(path);
                if (excelSheets.Length > 0)
                {
                    foreach (string t in excelSheets)
                    {
                        _ds = _objClsOledbdatalayer.getdata(path, t);
                        if (_ds.Tables[0].Rows.Count > 0)
                        {
                            for (int j = 0; j <= _ds.Tables[0].Rows.Count - 1; j++)
                            {
                                _objUniversityCategoryProperty = new UniversityCategoryProperty
                                {
                                    UniversityCategoryName = _ds.Tables[0].Rows[j]["UniversityCategoryName"].ToString(),
                                };

                                int result = UniversityProvider.Instance.InsertUniversityCategoryDetails(_objUniversityCategoryProperty, LoggedInUserId, out errMsg);
                                if (result > 0)
                                {
                                    lblRecordsInserted.Text = "";
                                    lblRecordsInserted.Text = j + " row inserted out of " + _ds.Tables[0].Rows.Count;
                                }
                            }
                            lblSuccess.Text    = _objCommon.GetErrorMessage("lblSucessMsg");
                            lblSuccess.Visible = true;
                            BindGetAllUniversityCategoryList();
                        }
                    }
                }
                else
                {
                    lblError.Text = _objCommon.GetErrorMessage("lblErrMsg");
                }
            }
            catch (Exception ex)
            {
                var err = ex.Message;
                if (ex.InnerException != null)
                {
                    err = err + " :: Inner Exception :- " + ex.ToString();
                }
                const string addInfo = "Error while executing btnUpload_Click in Exam.cs  :: -> ";
                var          objPub  = new ClsExceptionPublisher();
                objPub.Publish(err, addInfo);
            }
        }
        protected void btnUpload_Click1(object sender, EventArgs e)
        {
            var errMsg = "";

            _objCommon = new Common();
            try
            {
                _objCollegeAssociationCategoryProperty = new CollegeAssociationCategoryProperty();
                DataSet _ds = new DataSet();
                var     _objClsOledbdatalayer = new ClsOleDBDataWrapper();
                var     excelSheets           = new String[0];
                string  path = MapPath(fileUploadExcel.FileName);
                fileUploadExcel.SaveAs(path);
                excelSheets = _objClsOledbdatalayer.CountTotalSheets(path);
                if (excelSheets.Length > 0)
                {
                    foreach (string t in excelSheets)
                    {
                        _ds = _objClsOledbdatalayer.getdata(path, t);
                        if (_ds.Tables[0].Rows.Count > 0)
                        {
                            for (int j = 0; j <= _ds.Tables[0].Rows.Count - 1; j++)
                            {
                                _objCollegeAssociationCategoryProperty = new CollegeAssociationCategoryProperty
                                {
                                    AssociationCategoryType   = _ds.Tables[0].Rows[j]["AssociationCategoryType"].ToString(),
                                    AssociationCategoryStatus = Convert.ToBoolean(_ds.Tables[0].Rows[j]["AssociationCategoryStatus"].ToString())
                                };
                                int result = CollegeProvider.Instance.UpdateCollegeAssociationCategoryType(_objCollegeAssociationCategoryProperty, LoggedInUserId, out errMsg);

                                if (result > 0)
                                {
                                    lblRecordsInserted.Text = "";
                                    lblRecordsInserted.Text = j + " row inserted out of " + _ds.Tables[0].Rows.Count;
                                }
                            }
                            lblSeccessMsg.Text = _objCommon.GetErrorMessage("lblSucessMsg");
                            Response.Redirect("CollegeGroupMaster.aspx");
                        }
                    }
                }
                else
                {
                    lblSeccessMsg.Text = _objCommon.GetErrorMessage("lblErrMsg");
                }
            }
            catch (Exception ex)
            { var err = ex.Message;
              if (ex.InnerException != null)
              {
                  err = err + " :: Inner Exception :- " + ex.ToString();
              }
              const string addInfo = "Error while executing btnUpload_Click1 in AdminPanel/College/CollegeAssociationGroupMaster.aspx  :: -> ";
              var          objPub  = new ClsExceptionPublisher();
              objPub.Publish(err, addInfo); }
        }
Beispiel #5
0
 protected void btnUpload_Click(object sender, EventArgs e)
 {
     _objCommon = new Common();
     try
     {
         _objFaqCategoryProperty = new FAQCategoryProperty();
         var      objClsOledbdatalayer = new ClsOleDBDataWrapper();
         string[] excelSheets;
         var      path = MapPath(fileUploadExcel.FileName);
         fileUploadExcel.SaveAs(path);
         excelSheets = objClsOledbdatalayer.CountTotalSheets(path);
         if (excelSheets.Length > 0)
         {
             foreach (var t in excelSheets)
             {
                 var _ds = objClsOledbdatalayer.getdata(path, t);
                 if (_ds.Tables[0].Rows.Count <= 0)
                 {
                     continue;
                 }
                 for (int j = 0; j <= _ds.Tables[0].Rows.Count - 1; j++)
                 {
                     _objFaqCategoryProperty = new FAQCategoryProperty
                     {
                         FAQCategoryName   = _ds.Tables[0].Rows[j]["FAQCategoryName"].ToString(),
                         FAQCategoryStatus = Convert.ToBoolean(_ds.Tables[0].Rows[j]["FAQCategoryStatus"].ToString())
                     };
                     var errMsg = "";
                     int result = FAQProvider.Instance.InsertFAQCategory(_objFaqCategoryProperty, LoggedInUserId, out errMsg);
                     if (result > 0)
                     {
                         lblRecordsInserted.Text = "";
                         lblRecordsInserted.Text = j + " row inserted out of " + _ds.Tables[0].Rows.Count;
                     }
                 }
                 lblSuccess.Text    = _objCommon.GetErrorMessage("lblSucessMsg");
                 lblSuccess.Visible = true;
             }
         }
         else
         {
             lblError.Text = _objCommon.GetErrorMessage("lblErrMsg");
         }
     }
     catch (Exception ex)
     {
         var err = ex.Message;
         if (ex.InnerException != null)
         {
             err = err + " :: Inner Exception :- " + ex.InnerException.Message;
         }
         const string addInfo = "Error while executing btnUpload_Click in FAQCategoryMaster.aspx  :: -> ";
         var          objPub  = new ClsExceptionPublisher();
         objPub.Publish(err, addInfo);
     }
 }
Beispiel #6
0
        protected void BtnUploadClick(object sender, EventArgs e)
        {
            _objCommon = new Common();
            try
            {
                _objExamProperty = new ExamProperty();

                var _ds = new DataSet();
                var objClsOledbdatalayer = new ClsOleDBDataWrapper();
                var path = MapPath(fileUploadExcel.FileName);
                fileUploadExcel.SaveAs(path);
                var excelSheets = objClsOledbdatalayer.CountTotalSheets(path);
                if (excelSheets.Length > 0)
                {
                    foreach (var t in excelSheets)
                    {
                        _ds = objClsOledbdatalayer.getdata(path, t);
                        if (_ds != null && _ds.Tables.Count > 0)
                        {
                            for (int j = 0; j <= _ds.Tables[0].Rows.Count - 1; j++)
                            {
                                _objExamProperty.CourseId               = Convert.ToInt32(_ds.Tables[0].Rows[j]["CourseId"]);
                                _objExamProperty.ExamName               = Convert.ToString(_ds.Tables[0].Rows[j]["ExamName"]);
                                _objExamProperty.ExamFullName           = Convert.ToString(_ds.Tables[0].Rows[j]["ExamFullName"]);
                                _objExamProperty.ExamLogo               = Convert.ToString(_ds.Tables[0].Rows[j]["ExamLogo"]);
                                _objExamProperty.ExamDesc               = Convert.ToString(_ds.Tables[0].Rows[j]["ExamDesc"]);
                                _objExamProperty.ExamWebSite            = Convert.ToString(_ds.Tables[0].Rows[j]["ExamWebsite"]);
                                _objExamProperty.ExamPopularName        = Convert.ToString(_ds.Tables[0].Rows[j]["ExamPopularName"]);
                                _objExamProperty.ExamEligiblityCriteria = Convert.ToString(_ds.Tables[0].Rows[j]["ExamEligiblityCriteria"]);
                                _objExamProperty.ExamStatus             = Convert.ToBoolean(_ds.Tables[0].Rows[j]["ExamStatus"]);
                                var errMsg = "";
                                var insert = ExamProvider.Instance.InsertExamDetails(_objExamProperty, 1, out errMsg);
                                if (insert <= 0)
                                {
                                    continue;
                                }
                                lblRecordsInserted.Text = "";
                                lblRecordsInserted.Text = j + " row inserted out of " + _ds.Tables[0].Rows.Count;
                            }
                        }
                    }
                    lblSeccessMsg.Text    = _objCommon.GetErrorMessage("lblSucessMsg");
                    lblSeccessMsg.Visible = true;
                    BindAllCourseList();
                }
                else
                {
                    lblErorrMsg.Text = _objCommon.GetErrorMessage("lblErrMsg");
                }
            }
            catch (Exception ex)
            { }
        }
Beispiel #7
0
 //BtnUploadClick1 event  to upload course data from excel  .. by Indu Kumar Pandey
 protected void BtnUploadClick1(object sender, EventArgs e)
 {
     _objCommon = new Common();
     try
     {
         var objClsOledbdatalayer = new ClsOleDBDataWrapper();
         var path = MapPath(fulUploadExcel.FileName);
         fulUploadExcel.SaveAs(path);
         var excelSheets = objClsOledbdatalayer.CountTotalSheets(path);
         if (excelSheets.Length > 0)
         {
             foreach (string t in excelSheets)
             {
                 DataSet ds = objClsOledbdatalayer.getdata(path, t);
                 if (ds != null && ds.Tables.Count > 0)
                 {
                     for (int j = 0; j <= ds.Tables[0].Rows.Count - 1; j++)
                     {
                         var errMsg = "";
                         var result =
                             CourseProvider.Instance.InsertCourseMasterDetails(ds.Tables[0].Rows[j]["CourseName"].ToString(),
                                                                               ds.Tables[0].Rows[j]["CourseUrl"].ToString(),
                                                                               ds.Tables[0].Rows[j]["CourseTitle"].ToString(),
                                                                               ds.Tables[0].Rows[j]["CourseMetaTag"].ToString(),
                                                                               ds.Tables[0].Rows[j]["CourseMetaDesc"].ToString(),
                                                                               ds.Tables[0].Rows[j]["CourseDesc"].ToString(),
                                                                               ds.Tables[0].Rows[j]["CourseShortName"].ToString(),
                                                                               ds.Tables[0].Rows[j]["CoursePopularName"].ToString(),
                                                                               Convert.ToInt16(
                                                                                   ds.Tables[0].Rows[j]["CourseCategoryId"].ToString
                                                                                       ()),
                                                                               Convert.ToInt16(
                                                                                   ds.Tables[0].Rows[j]["CourseEligibiltyId"].ToString
                                                                                       ()), LoggedInUserId, out errMsg,
                                                                               ds.Tables[0].Rows[j]["AjCourseImage"].ToString(),
                                                                               ds.Tables[0].Rows[j]["HelpLineNo"].ToString(),
                                                                               ds.Tables[0].Rows[j]["CourseStatus"].ToString() ==
                                                                               "True" ? true
                                                                                   : false);
                     }
                 }
             }
             lblExcelSuccess.Text    = _objCommon.GetErrorMessage("lblSucessMsg");
             lblExcelSuccess.Visible = true;
         }
         else
         {
             lblError.Text = _objCommon.GetErrorMessage("lblErrMsg");
         }
     }
     catch (Exception ex)
     { }
 }
        //code for Excel upload
        protected void btnUpload_Click(object sender, EventArgs e)
        {
            lblSuccess.Visible = false;
            var errMsg = "";

            try
            {
                _objCollegeGroupProperty = new CollegeGroupProperty();
                _objCommon = new Common();
                DataSet _ds = new DataSet();
                var     _objClsOledbdatalayer = new ClsOleDBDataWrapper();
                var     excelSheets           = new String[0];
                string  path = MapPath(fileUploadExcel.FileName);
                fileUploadExcel.SaveAs(path);
                excelSheets = _objClsOledbdatalayer.CountTotalSheets(path);
                if (excelSheets.Length > 0)
                {
                    foreach (string t in excelSheets)
                    {
                        _ds = _objClsOledbdatalayer.getdata(path, t);
                        if (_ds.Tables[0].Rows.Count > 0)
                        {
                            for (int j = 0; j <= _ds.Tables[0].Rows.Count - 1; j++)
                            {
                                _objCollegeGroupProperty = new CollegeGroupProperty
                                {
                                    CollegeGroupName   = _ds.Tables[0].Rows[j]["CollegeGroupName"].ToString(),
                                    CollegeGropuStatus = Convert.ToBoolean(_ds.Tables[0].Rows[j]["CollegeGropuStatus"].ToString())
                                };
                                int result = CollegeProvider.Instance.InsertCollegeGroupDetails(_objCollegeGroupProperty, LoggedInUserId, out errMsg);

                                if (result > 0)
                                {
                                    lblRecordsInserted.Text = "";
                                    lblRecordsInserted.Text = j + " row inserted out of " + _ds.Tables[0].Rows.Count;
                                }
                            }
                            lblSuccess.Text = _objCommon.GetErrorMessage("lblSucessMsg");
                            Response.Redirect("CollegeGroupMaster.aspx");
                        }
                    }
                }
                else
                {
                    lblError.Text = _objCommon.GetErrorMessage("lblErrMsg");
                }
            }
            catch (Exception ex)
            { }
        }
Beispiel #9
0
        protected void btnUpload_Click(object sender, EventArgs e)
        {
            _objCommon = new Common();
            try
            {
                var objClsOledbdatalayer = new ClsOleDBDataWrapper();
                var path = MapPath(fileUploadExcel.FileName);
                fileUploadExcel.SaveAs(path);
                var excelSheets = objClsOledbdatalayer.CountTotalSheets(path);
                if (excelSheets.Length > 0)
                {
                    foreach (string t in excelSheets)
                    {
                        DataSet _ds = objClsOledbdatalayer.getdata(path, t);
                        if (_ds.Tables[0].Rows.Count > 0)
                        {
                            for (var j = 0; j <= _ds.Tables[0].Rows.Count - 1; j++)
                            {
                                var errMsg = "";
                                _objStateProperty = new StateProperty
                                {
                                    CountryId = Convert.ToInt16(_ds.Tables[0].Rows[j]["CountryId"]),
                                    ZoneId    = Convert.ToInt16(_ds.Tables[0].Rows[j]["ZoneId"]),
                                    StateName = _ds.Tables[0].Rows[j]["StateName"].ToString()
                                };
                                int _insert = StateProvider.Instance.InsertStateDetails(Convert.ToString(_ds.Tables[0].Rows[j]["StateName"]),
                                                                                        Convert.ToInt32(_ds.Tables[0].Rows[j]["ZoneId"]),
                                                                                        Convert.ToInt32(_ds.Tables[0].Rows[j]["CountryId"]), LoggedInUserId, out errMsg);
                            }
                            lblMsg.Focus();
                            lblMsg.Text    = _objCommon.GetErrorMessage("lblSucessMsg");
                            lblMsg.Visible = true;
                            BindAllState();
                        }
                    }
                }

                else
                {
                    lblErrorMsg.Text = _objCommon.GetErrorMessage("lblErrMsg");
                }
            }
            catch (Exception ex)
            {
            };
        }
Beispiel #10
0
        //event  BtnUploadClick to upload stream detials  by indu kumar pandey...
        protected void BtnUploadClick(object sender, EventArgs e)
        {
            _objCommon = new Common();
            try
            {
                var objClsOledbdatalayer = new ClsOleDBDataWrapper();
                var path = MapPath(fulUploadExcel.FileName);
                fulUploadExcel.SaveAs(path);
                var excelSheets = objClsOledbdatalayer.CountTotalSheets(path);
                if (excelSheets.Length > 0)
                {
                    foreach (string t in excelSheets)
                    {
                        DataSet ds = objClsOledbdatalayer.getdata(path, t);
                        if (ds.Tables[0].Rows.Count > 0)
                        {
                            for (var j = 0; j <= ds.Tables[0].Rows.Count - 1; j++)
                            {
                                var errMsg = "";
                                _objCourseStreamProperty = new CourseStreamProperty
                                {
                                    CourseStreamName            = Convert.ToString(ds.Tables[0].Rows[j]["AjCourseStreamName"]),
                                    CourseId                    = Convert.ToInt16(ds.Tables[0].Rows[j]["CourseId"]),
                                    CourseStreamHistory         = Convert.ToString(ds.Tables[0].Rows[j]["AjCourseStreamHistory"]),
                                    CourseSteamFuture           = Convert.ToString(ds.Tables[0].Rows[j]["AjCourseStreamFuture"]),
                                    CourseStreamRelatedIndustry = Convert.ToString(ds.Tables[0].Rows[j]["AjCourseStreamRelatedIndustry"]),
                                    CourseStreamStatus          = ds.Tables[0].Rows[j]["AjCourseStreamStatus"].ToString() == "True" ? true : false,
                                    CourseStreamDesc            = Convert.ToString(ds.Tables[0].Rows[j]["AjCourseStreamDesc"]),
                                    CourseStreamCoreCompanies   = Convert.ToString(ds.Tables[0].Rows[j]["AjCourseStreamCoreCompanies"])
                                };
                                var result = StreamProvider.Instance.InsertCourseStreamDetails(_objCourseStreamProperty, LoggedInUserId, out errMsg);
                            }
                            lblSuccess.Text = _objCommon.GetErrorMessage("lblSucessMsg");

                            Response.Redirect("CourseStreamMaster.aspx");
                        }
                    }
                }
                else
                {
                    lblError.Text = _objCommon.GetErrorMessage("lblErrMsg");
                }
            }
            catch (Exception ex)
            { }
        }
Beispiel #11
0
        protected void btnUpload_Click(object sender, EventArgs e)
        {
            var errMsg = "";

            _objCommon = new Common();
            try
            {
                _objCountryProperty = new CountryProperty();
                DataSet _ds = new DataSet();
                var     _objClsOledbdatalayer = new ClsOleDBDataWrapper();
                var     excelSheets           = new String[0];
                string  path = MapPath(fileUploadExcel.FileName);
                fileUploadExcel.SaveAs(path);
                excelSheets = _objClsOledbdatalayer.CountTotalSheets(path);
                if (excelSheets.Length > 0)
                {
                    foreach (string t in excelSheets)
                    {
                        _ds = _objClsOledbdatalayer.getdata(path, t);
                        if (_ds.Tables[0].Rows.Count > 0)
                        {
                            for (int j = 0; j <= _ds.Tables[0].Rows.Count - 1; j++)
                            {
                                int result = CountryProvider.Instance.InsertCountry(_ds.Tables[0].Rows[j]["CountryName"].ToString(),
                                                                                    LoggedInUserId, out errMsg, _ds.Tables[0].Rows[j]["CountryCode"].ToString());
                                if (result > 0)
                                {
                                    lblRecordsInserted.Text = "";
                                    lblRecordsInserted.Text = j + " row inserted out of " + _ds.Tables[0].Rows.Count;
                                }
                            }
                            lblSuccess.Text    = _objCommon.GetErrorMessage("lblSucessMsg");
                            lblSuccess.Visible = true;
                            //CountryMasterBind();
                        }
                    }
                }
                else
                {
                    lblError.Text = _objCommon.GetErrorMessage("lblErrMsg");
                }
            }
            catch (Exception ex)
            { }
        }
Beispiel #12
0
 protected void BtnUploadClick(object sender, EventArgs e)
 {
     _objCommon = new Common();
     try
     {
         var objClsOledbdatalayer = new ClsOleDBDataWrapper();
         var path = MapPath(fulUploadExcel.FileName);
         fulUploadExcel.SaveAs(path);
         var excelSheets = objClsOledbdatalayer.CountTotalSheets(path);
         if (excelSheets.Length > 0)
         {
             foreach (var t in excelSheets)
             {
                 var ds = objClsOledbdatalayer.getdata(path, t);
                 if (ds.Tables[0].Rows.Count <= 0)
                 {
                     continue;
                 }
                 for (var j = 0; j <= ds.Tables[0].Rows.Count - 1; j++)
                 {
                     string errMsg;
                     NewsArticleNoticeProvider.Instance.InsertNoticeCategory(Convert.ToString(ds.Tables[0].Rows[j]["NoticeCategory"]),
                                                                             ds.Tables[0].Rows[j]["NoticeCategoryStatus"].ToString() == "True", LoggedInUserId, out errMsg);
                 }
                 lblSuccess.Text = _objCommon.GetErrorMessage("lblSucessMsg");
                 BindNoticeCategory();
             }
         }
         else
         {
             lblError.Text = _objCommon.GetErrorMessage("lblErrMsg");
         }
     }
     catch (Exception ex)
     {
         var err = ex.Message;
         if (ex.InnerException != null)
         {
             err = err + " :: Inner Exception :- " + ex.InnerException.Message;
         }
         const string addInfo = "Error while executing BtnUploadClick in CommonWebServices.asmx  :: -> ";
         var          objPub  = new ClsExceptionPublisher();
         objPub.Publish(err, addInfo);
     }
 }
 protected void BtnUploadClick1(object sender, EventArgs e)
 {
     _objCommon = new Common();
     try
     {
         var objClsOledbdatalayer = new ClsOleDBDataWrapper();
         var path = MapPath(fulUploadExcel.FileName);
         fulUploadExcel.SaveAs(path);
         var excelSheets = objClsOledbdatalayer.CountTotalSheets(path);
         if (excelSheets.Length <= 0)
         {
             return;
         }
         foreach (string t in excelSheets)
         {
             DataSet ds = objClsOledbdatalayer.getdata(path, t);
             if (ds != null && ds.Tables.Count > 0)
             {
                 for (int j = 0; j <= ds.Tables[0].Rows.Count - 1; j++)
                 {
                     var errMsg = "";
                     _objNewsDetails = new NewsArticleProperty
                     {
                         NewsSubject   = ds.Tables[0].Rows[j]["NewsSubject"].ToString(),
                         NewsUrl       = ds.Tables[0].Rows[j]["NewsUrl"].ToString(),
                         NewsTitle     = ds.Tables[0].Rows[j]["NewsTitle"].ToString(),
                         NewsTag       = ds.Tables[0].Rows[j]["NewsTag"].ToString(),
                         NewsMetaDesc  = ds.Tables[0].Rows[j]["NewsMetaDesc"].ToString(),
                         NewsDesc      = ds.Tables[0].Rows[j]["NewsDesc"].ToString(),
                         NewsImage     = ds.Tables[0].Rows[j]["NewsImage"].ToString(),
                         NewsShortDesc = ds.Tables[0].Rows[j]["NewsShortDesc"].ToString(),
                         NewsStatus    = ds.Tables[0].Rows[j]["NewsStatus"].ToString() == "True" ? true : false,
                         NewsBy        = ds.Tables[0].Rows[j]["NewsBy"].ToString(),
                         NewsDate      = ds.Tables[0].Rows[j]["NewsDate"].ToString() == "" ? DateTime.Now : Convert.ToDateTime(ds.Tables[0].Rows[j]["NewsDate"].ToString()),
                     };
                     var result = NewsArticleNoticeProvider.Instance.InsertNewsDetails(_objNewsDetails, LoggedInUserId, out errMsg);
                 }
             }
         }
     }
     catch (Exception EX)
     { }
 }
Beispiel #14
0
        protected void BtnUploadClick(object sender, EventArgs e)
        {
            _objCommon = new Common();
            try
            {
                var _ds = new DataSet();
                var _objClsOledbdatalayer = new ClsOleDBDataWrapper();
                var excelSheets           = new String[0];
                var path = MapPath(fulUploadExcel.FileName);
                fulUploadExcel.SaveAs(path);
                excelSheets = _objClsOledbdatalayer.CountTotalSheets(path);

                if (excelSheets.Length > 0)
                {
                    foreach (string t in excelSheets)
                    {
                        _ds = _objClsOledbdatalayer.getdata(path, t);
                        if (_ds != null && _ds.Tables.Count > 0)
                        {
                            for (int j = 0; j < _ds.Tables[0].Rows.Count - 1; j++)
                            {
                                System.Threading.Thread.Sleep(500);
                                var errMsg = "";
                                var result = CourseProvider.Instance.InsertCourseCategory(_ds.Tables[0].Rows[j]["CourseCategoryName"].ToString(), out errMsg, LoggedInUserId, _ds.Tables[0].Rows[j]["CourseCategoryStatus"].ToString() == "True" ? true : false);
                                if (result > 0)
                                {
                                    exclSuccessCount.SetProgress(j + 1, _ds.Tables[0].Rows.Count - 1);
                                }
                            }
                            lblSuccess.Text    = _objCommon.GetErrorMessage("lblSucessMsg");
                            lblSuccess.Visible = true;
                            BindCourseCategory();
                        }
                    }
                }
                else
                {
                    lblError.Text = _objCommon.GetErrorMessage("lblErrMsg");
                }
            }
            catch (Exception ex)
            { }
        }
Beispiel #15
0
 protected void btnUpload_Click(object sender, EventArgs e)
 {
     _objCommon = new Common();
     try
     {
         var objClsOledbdatalayer = new ClsOleDBDataWrapper();
         var path = MapPath(fileUploadExcel.FileName);
         fileUploadExcel.SaveAs(path);
         var excelSheets = objClsOledbdatalayer.CountTotalSheets(path);
         if (excelSheets.Length > 0)
         {
             foreach (string t in excelSheets)
             {
                 DataSet ds = objClsOledbdatalayer.getdata(path, t);
                 if (ds.Tables[0].Rows.Count > 0)
                 {
                     for (var j = 0; j <= ds.Tables[0].Rows.Count - 1; j++)
                     {
                         var errMsg = "";
                         _objZoneProperty = new ZoneProperty
                         {
                             ZoneName = ds.Tables[0].Rows[j]["ZoneName"].ToString(),
                         };
                         var result = ZoneProvider.Instance.InsertZoneDetails(ds.Tables[0].Rows[j]["ZoneName"].ToString(), LoggedInUserId, out errMsg);
                     }
                     lblMsg.Text    = _objCommon.GetErrorMessage("lblSucessMsg");
                     lblMsg.Visible = true;
                     BindAllZoneList();
                 }
             }
         }
         else
         {
             lblErrorMsg.Text    = _objCommon.GetErrorMessage("lblErrMsg");
             lblMsg.Visible      = false;
             lblErrorMsg.Visible = true;
         }
     }
     catch (Exception ex)
     {
     }
 }
Beispiel #16
0
        protected void BtnUploadClick(object sender, ImageClickEventArgs e)
        {
            _objCommon = new Common();
            var objClsOledbdatalayer = new ClsOleDBDataWrapper();
            var path = MapPath(fulUploadExcel.FileName);

            fulUploadExcel.SaveAs(path);
            var excelSheets = objClsOledbdatalayer.CountTotalSheets(path);

            if (excelSheets.Length <= 0)
            {
                return;
            }
            foreach (DataSet ds in excelSheets.Select(t => objClsOledbdatalayer.getdata(path, t)).Where(ds => ds.Tables[0].Rows.Count > 0))
            {
                for (var j = 0; j <= ds.Tables[0].Rows.Count - 1; j++)
                {
                    var errMsg = "";
                    _objUniversityPropertyr = new UniversityProperty
                    {
                        UniversityName         = ds.Tables[0].Rows[j]["AjUniversityName"].ToString(),
                        UniversityWebsite      = ds.Tables[0].Rows[j]["AjUniversityWebsite"].ToString(),
                        UniversityshortName    = ds.Tables[0].Rows[j]["AjUniversityShortName"].ToString(),
                        UniversityPopularName  = ds.Tables[0].Rows[j]["AjUniversityPopularName"].ToString(),
                        UniversityPhoneNo      = ds.Tables[0].Rows[j]["AJuniversityPhone"].ToString(),
                        UniversityMobile       = ds.Tables[0].Rows[j]["AjUniversityMobile"].ToString(),
                        UniversityFax          = ds.Tables[0].Rows[j]["AjUniversityFax"].ToString(),
                        UniversityEst          = Convert.ToInt32(ds.Tables[0].Rows[j]["AjUniversityEst"].ToString()),
                        UniversityEmailId      = ds.Tables[0].Rows[j]["AjUniversityEmailId"].ToString(),
                        UniversityDesc         = ds.Tables[0].Rows[j]["AjUniversityDesc"].ToString(),
                        UniversityAddrs        = ds.Tables[0].Rows[j]["AjUniversityAddress"].ToString(),
                        UniversityCategoryName = ds.Tables[0].Rows[j]["AjUniversityCategoryId"].ToString(),
                        UniversityCityName     = ds.Tables[0].Rows[j]["AjUniversityCityId"].ToString(),
                        UniversityCountryName  = ds.Tables[0].Rows[j]["AjUniversityCountryId"].ToString(),
                        UniversityStateName    = ds.Tables[0].Rows[j]["AjUniversityStateId"].ToString()
                    };
                    var result = UniversityProvider.Instance.InsertUniversityDetailsUpload(_objUniversityPropertyr, LoggedInUserId, out errMsg);
                }
                Response.Redirect("UniversityMaster.aspx");
            }
        }
Beispiel #17
0
 protected void BtnUploadClick1(object sender, EventArgs e)
 {
     _objCommon = new Common();
     try
     {
         var objClsOledbdatalayer = new ClsOleDBDataWrapper();
         var path = MapPath(fulUploadExcel.FileName);
         fulUploadExcel.SaveAs(path);
         var excelSheets = objClsOledbdatalayer.CountTotalSheets(path);
         if (excelSheets.Length > 0)
         {
             foreach (string t in excelSheets)
             {
                 DataSet ds = objClsOledbdatalayer.getdata(path, t);
                 if (ds != null && ds.Tables.Count > 0)
                 {
                     for (int j = 0; j <= ds.Tables[0].Rows.Count - 1; j++)
                     {
                         var errMsg = "";
                         _objHostelCategoryProperty = new HostelCategoryProperty
                         {
                             HostelCategoryType   = Convert.ToString(ds.Tables[0].Rows[j]["HostelCategoryType"]),
                             HostelCategoryStatus = ds.Tables[0].Rows[j]["HostelCategoryStatus"].ToString() == "True" ? true : false
                         };
                     }
                     lblSuccess.Text    = _objCommon.GetErrorMessage("lblSucessMsg");
                     lblSuccess.Visible = true;
                     BindHostelTypeDetails();
                 }
             }
         }
         else
         {
             lblError.Text = _objCommon.GetErrorMessage("lblErrMsg");
         }
     }
     catch (Exception ex)
     { }
 }
 protected void BtnUploadClick1(object sender, EventArgs e)
 {
     _objCommon = new Common();
     try
     {
         var objClsOledbdatalayer = new ClsOleDBDataWrapper();
         var path = MapPath(fulUploadExcel.FileName);
         fulUploadExcel.SaveAs(path);
         var excelSheets = objClsOledbdatalayer.CountTotalSheets(path);
         if (excelSheets.Length > 0)
         {
             foreach (var t in excelSheets)
             {
                 DataSet ds = objClsOledbdatalayer.getdata(path, t);
                 if (ds.Tables[0].Rows.Count <= 0)
                 {
                     continue;
                 }
                 for (var j = 0; j <= ds.Tables[0].Rows.Count - 1; j++)
                 {
                     var errMsg = "";
                     _objInstituteTypeProperty = new InstituteTypeProperty {
                         InstituteType = Convert.ToString(ds.Tables[0].Rows[j]["InstituteType"])
                     };
                 }
             }
             lblSuccess.Text    = _objCommon.GetErrorMessage("lblSucessMsg");
             lblSuccess.Visible = true;
             BindInstituteTypeDetails();
         }
         else
         {
             lblError.Text = _objCommon.GetErrorMessage("lblErrMsg");
         }
     }
     catch (Exception ex)
     { }
 }
Beispiel #19
0
        protected void btnUpload_Click(object sender, EventArgs e)
        {
            Common _objCommon = new Common();

            try
            {
                var errMsg = "";


                DataSet _ds = new DataSet();
                var     _objClsOledbdatalayer = new ClsOleDBDataWrapper();
                var     excelSheets           = new String[0];
                string  path = MapPath(fulUploadCollegeImage.FileName);
                fulUploadCollegeImage.SaveAs(path);
                excelSheets = _objClsOledbdatalayer.CountTotalSheets(path);
                if (excelSheets.Length > 0)
                {
                    foreach (string t in excelSheets)
                    {
                        _ds = _objClsOledbdatalayer.getdata(path, t);
                        if (_ds != null && _ds.Tables.Count > 0)
                        {
                            for (int j = 0; j <= _ds.Tables[0].Rows.Count - 1; j++)
                            {
                                var _insert = _objCommon.UploadCollegeImage(Convert.ToString(_ds.Tables[0].Rows[j]["CollegeName"]), Convert.ToString(_ds.Tables[0].Rows[j]["CollegeImage"]));

                                if (_insert > 0)
                                {
                                }
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            { }
        }
Beispiel #20
0
 protected void btnUpload_Click(object sender, EventArgs e)
 {
     _objCommon = new Common();
     try
     {
         var objExamFormProperty = new ExamFormProperty();
         _objClsOledbdatalayer = new ClsOleDBDataWrapper();
         string   path        = MapPath(fileUploadExcel.FileName);
         string[] excelSheets = _objClsOledbdatalayer.CountTotalSheets(path);
         if (excelSheets.Length > 0)
         {
             foreach (var ds in excelSheets.Select(t => _objClsOledbdatalayer.getdata(path, t)).Where(_ds => _ds.Tables[0].Rows.Count > 0))
             {
                 for (int j = 0; j < ds.Tables[0].Rows.Count - 1; j++)
                 {
                     objExamFormProperty.ExamId                      = Convert.ToInt32(ds.Tables[0].Rows[j]["ExamId"]);
                     objExamFormProperty.ExamFormUrl                 = Convert.ToString(ds.Tables[0].Rows[j]["ExamFormUrl"]);
                     objExamFormProperty.ExamFormTitle               = Convert.ToString(ds.Tables[0].Rows[j]["ExamFormTitle"]);
                     objExamFormProperty.ExamFormMetaDesc            = Convert.ToString(ds.Tables[0].Rows[j]["ExamFormMetaDesc"]);
                     objExamFormProperty.ExamFormKeywords            = Convert.ToString(ds.Tables[0].Rows[j]["ExamFormMetaTag"]);
                     objExamFormProperty.ExamFormSubject             = Convert.ToString(ds.Tables[0].Rows[j]["ExamFormSubject"]);
                     objExamFormProperty.ExamFormYear                = Convert.ToString(ds.Tables[0].Rows[j]["ExamFormYear"]);
                     objExamFormProperty.ExamFormWebsite             = Convert.ToString(ds.Tables[0].Rows[j]["ExamFormWebsite"]);
                     objExamFormProperty.ExamFormSaleStartDate       = Convert.ToString(ds.Tables[0].Rows[j]["ExamFormSaleStartDate"]);
                     objExamFormProperty.ExamFromSaleStartDateRemark = Convert.ToString(ds.Tables[0].Rows[j]["ExamFormSaleStartDateRemark"]);
                     objExamFormProperty.ExamFormSaleEndDate         = Convert.ToString(ds.Tables[0].Rows[j]["ExamFormSaleEndDate"]);
                     objExamFormProperty.ExamFormSaleEndDateRemark   = Convert.ToString(ds.Tables[0].Rows[j]["ExamFormSaleEndDateRemark"]);
                     objExamFormProperty.ExamFormSubmitDate          = Convert.ToString(ds.Tables[0].Rows[j]["ExamFormSubmitDate"]);
                     objExamFormProperty.ExamFormSubmitDateRemark    = Convert.ToString(ds.Tables[0].Rows[j]["ExamFormSubmitDateRemark"]);
                     objExamFormProperty.ExamFormResultDate          = Convert.ToString(ds.Tables[0].Rows[j]["ExamFormResultDate"]);
                     objExamFormProperty.ExamFormResultDateReamrk    = Convert.ToString(ds.Tables[0].Rows[j]["ExamFormResultDateRemark"]);
                     objExamFormProperty.ExamFormResultWebsite       = Convert.ToString(ds.Tables[0].Rows[j]["ExamFormResultWebsite"]);
                     objExamFormProperty.ExamFormPrice               = Convert.ToString(ds.Tables[0].Rows[j]["ExamFormPrice"]);
                     objExamFormProperty.ExamFormStore               = Convert.ToString(ds.Tables[0].Rows[j]["ExamFormStore"]);
                     objExamFormProperty.ExamFormCenter              = Convert.ToString(ds.Tables[0].Rows[j]["ExamFormCenter"]);
                     objExamFormProperty.ExamFormDd                  = Convert.ToString(ds.Tables[0].Rows[j]["ExamFormDD"]);
                     objExamFormProperty.ExamFormSyllabus            = Convert.ToString(ds.Tables[0].Rows[j]["ExamFormSyllabus"]);
                     objExamFormProperty.ExamFormStatus              = Convert.ToBoolean(ds.Tables[0].Rows[j]["ExamFormStatus"]);
                     var errMsg  = "";
                     var _insert = ExamProvider.Instance.InsertExamFormDetails(objExamFormProperty, LoggedInUserId, out errMsg);
                 }
                 lblSeccessMsg.Text    = _objCommon.GetErrorMessage("lblSucessMsg");
                 lblSeccessMsg.Visible = true;
                 Response.Redirect("ManageExamFormMaster.aspx", true);
             }
         }
         else
         {
             lblErorrMsg.Visible = true;
             lblErorrMsg.Text    = _objCommon.GetErrorMessage("lblErrMsg");
         }
     }
     catch (Exception ex)
     {
         string err = ex.Message;
         if (ex.InnerException != null)
         {
             err = err + " :: Inner Exception :- " + ex.InnerException.Message;
         }
         string addInfo = "Error  :: -> ";
         ClsExceptionPublisher objPub = new ClsExceptionPublisher();
         objPub.Publish(err, addInfo);
     }
 }