-
+
diff --git a/VRS/Management/ComAbout_Edit.aspx.cs b/VRS/Management/ComAbout_Edit.aspx.cs
index 60bfdc4..f032a84 100644
--- a/VRS/Management/ComAbout_Edit.aspx.cs
+++ b/VRS/Management/ComAbout_Edit.aspx.cs
@@ -92,7 +92,7 @@ namespace VRS.Management
if (upload_type == "0") //图片
{
- var arrray = new string[] { ".jpg", ".png", ".bmp", ".jpeg" };
+ var arrray = Util.ConfigInfo.list_pic_type;
var extension = uploadFile.GetExtension();
if (!arrray.Contains(extension))
{
@@ -102,7 +102,7 @@ namespace VRS.Management
}
else if (upload_type == "1") //视频,.mp4,.avi,.dat,.3gp,.mov,.rmvb
{
- var arrray = new string[] { ".mp4", ".avi", ".dat", ".3gp", ".mov", ".rmvb" };
+ var arrray = Util.ConfigInfo.list_video_type;
var extension = uploadFile.GetExtension();
if (!arrray.Contains(extension))
{
diff --git a/VRS/Management/ComCertif_Add.aspx b/VRS/Management/ComCertif_Add.aspx
index 5d18960..a7a1ea2 100644
--- a/VRS/Management/ComCertif_Add.aspx
+++ b/VRS/Management/ComCertif_Add.aspx
@@ -85,7 +85,7 @@
-
+
diff --git a/VRS/Management/ComCertif_Add.aspx.cs b/VRS/Management/ComCertif_Add.aspx.cs
index 6aba3d6..765e0fd 100644
--- a/VRS/Management/ComCertif_Add.aspx.cs
+++ b/VRS/Management/ComCertif_Add.aspx.cs
@@ -90,7 +90,7 @@ namespace VRS.Management
if (upload_type == "0") //图片
{
- var arrray = new string[] { ".jpg", ".png", ".bmp", ".jpeg" };
+ var arrray = Util.ConfigInfo.list_pic_type;
var extension = uploadFile.GetExtension();
if (!arrray.Contains(extension))
{
@@ -100,7 +100,7 @@ namespace VRS.Management
}
else if (upload_type == "1") //视频,.mp4,.avi,.dat,.3gp,.mov,.rmvb
{
- var arrray = new string[] { ".mp4", ".avi", ".dat", ".3gp", ".mov", ".rmvb" };
+ var arrray = Util.ConfigInfo.list_video_type;
var extension = uploadFile.GetExtension();
if (!arrray.Contains(extension))
{
diff --git a/VRS/Management/ComCertif_Edit.aspx b/VRS/Management/ComCertif_Edit.aspx
index af14f1c..969f0d5 100644
--- a/VRS/Management/ComCertif_Edit.aspx
+++ b/VRS/Management/ComCertif_Edit.aspx
@@ -85,7 +85,7 @@
-
+
diff --git a/VRS/Management/ComCertif_Edit.aspx.cs b/VRS/Management/ComCertif_Edit.aspx.cs
index 97b0314..a67bb59 100644
--- a/VRS/Management/ComCertif_Edit.aspx.cs
+++ b/VRS/Management/ComCertif_Edit.aspx.cs
@@ -92,7 +92,7 @@ namespace VRS.Management
if (upload_type == "0") //图片
{
- var arrray = new string[] { ".jpg", ".png", ".bmp", ".jpeg" };
+ var arrray = Util.ConfigInfo.list_pic_type;
var extension = uploadFile.GetExtension();
if (!arrray.Contains(extension))
{
@@ -102,7 +102,7 @@ namespace VRS.Management
}
else if (upload_type == "1") //视频,.mp4,.avi,.dat,.3gp,.mov,.rmvb
{
- var arrray = new string[] { ".mp4", ".avi", ".dat", ".3gp", ".mov", ".rmvb" };
+ var arrray = Util.ConfigInfo.list_video_type;
var extension = uploadFile.GetExtension();
if (!arrray.Contains(extension))
{
diff --git a/VRS/Management/Course_Add.aspx b/VRS/Management/Course_Add.aspx
index 1fdf1df..3bf5b06 100644
--- a/VRS/Management/Course_Add.aspx
+++ b/VRS/Management/Course_Add.aspx
@@ -118,7 +118,7 @@
|
-
+
diff --git a/VRS/Management/Course_Add.aspx.cs b/VRS/Management/Course_Add.aspx.cs
index 6515bf0..8bd218f 100644
--- a/VRS/Management/Course_Add.aspx.cs
+++ b/VRS/Management/Course_Add.aspx.cs
@@ -106,7 +106,7 @@ namespace VRS.Management
if (upload_type == "0") //图片
{
- var arrray = new string[] { ".jpg", ".png", ".bmp", ".jpeg" };
+ var arrray = Util.ConfigInfo.list_pic_type;
var extension = uploadFile.GetExtension();
if (!arrray.Contains(extension))
{
@@ -116,7 +116,7 @@ namespace VRS.Management
}
else if (upload_type == "1") //视频,.mp4,.avi,.dat,.3gp,.mov,.rmvb
{
- var arrray = new string[] { ".mp4", ".avi", ".dat", ".3gp", ".mov", ".rmvb" };
+ var arrray = Util.ConfigInfo.list_video_type;
var extension = uploadFile.GetExtension();
if (!arrray.Contains(extension))
{
diff --git a/VRS/Management/Course_Edit.aspx b/VRS/Management/Course_Edit.aspx
index a536356..4e1d5fa 100644
--- a/VRS/Management/Course_Edit.aspx
+++ b/VRS/Management/Course_Edit.aspx
@@ -101,7 +101,7 @@
|
-
+
diff --git a/VRS/Management/Course_Edit.aspx.cs b/VRS/Management/Course_Edit.aspx.cs
index ee64fbf..9fca416 100644
--- a/VRS/Management/Course_Edit.aspx.cs
+++ b/VRS/Management/Course_Edit.aspx.cs
@@ -125,7 +125,7 @@ namespace VRS.Management
if (upload_type == "0") //图片
{
- var arrray = new string[] { ".jpg", ".png", ".bmp", ".jpeg" };
+ var arrray = Util.ConfigInfo.list_pic_type;
var extension = uploadFile.GetExtension();
if (!arrray.Contains(extension))
{
@@ -135,7 +135,7 @@ namespace VRS.Management
}
else if (upload_type == "1") //视频,.mp4,.avi,.dat,.3gp,.mov,.rmvb
{
- var arrray = new string[] { ".mp4", ".avi", ".dat", ".3gp", ".mov", ".rmvb" };
+ var arrray = Util.ConfigInfo.list_video_type;
var extension = uploadFile.GetExtension();
if (!arrray.Contains(extension))
{
diff --git a/VRS/Management/FirstCooper.aspx b/VRS/Management/FirstCooper.aspx
new file mode 100644
index 0000000..ca7ed0c
--- /dev/null
+++ b/VRS/Management/FirstCooper.aspx
@@ -0,0 +1,240 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="FirstCooper.aspx.cs" Inherits="VRS.Management.FirstCooper" %>
+
+<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
+
+
+
+
+
+ 首页合作厂商
+
+
+
+
+
+
+
+
+
+
diff --git a/VRS/Management/FirstCooper.aspx.cs b/VRS/Management/FirstCooper.aspx.cs
new file mode 100644
index 0000000..7ebe279
--- /dev/null
+++ b/VRS/Management/FirstCooper.aspx.cs
@@ -0,0 +1,107 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Text;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using Telerik.Web.UI;
+
+namespace VRS.Management
+{
+ public partial class FirstCooper : BaseListPage
+ {
+ DataService.BLL.pro_first_cooper bll = new DataService.BLL.pro_first_cooper();
+ DataService.BLL.admin_log log = new DataService.BLL.admin_log();
+
+
+ protected override void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ DataLoad();
+ }
+ }
+
+ protected override void DataLoad()
+ {
+ StringBuilder query = new StringBuilder(" 1 = 1 ");
+ if (!string.IsNullOrWhiteSpace(name.Text.Trim()))
+ {
+ query.AppendFormat(" AND (cooper_name LIKE '%{0}%' ) ", name.Text.Trim());
+ }
+ var sql = query.ToString();
+ var data = bll.GetModelList(sql).OrderBy(s => s.pos).ToList();
+ dataList.DataSource = data;
+ dataList.Rebind();
+ }
+
+ protected override void GridList_PageIndexChanged(object sender, GridPageChangedEventArgs e)
+ {
+ DataLoad();
+ }
+
+ protected override void GridList_PageSizeChanged(object sender, GridPageSizeChangedEventArgs e)
+ {
+ DataLoad();
+ }
+
+ protected override void GridList_SortCommand(object sender, GridSortCommandEventArgs e)
+ {
+ DataLoad();
+ }
+
+ protected override void GrdList_DeleteCommand(object sender, GridCommandEventArgs e)
+ {
+ //string Id = (e.Item as GridDataItem).OwnerTableView.DataKeyValues[e.Item.ItemIndex]["Id"].ToString();
+ //bll.Delete(Id);
+ //DataLoad();
+ }
+
+ protected override void AjaxManager_AjaxRequest(object sender, AjaxRequestEventArgs e)
+ {
+
+ }
+
+ protected void btnSelect_Click(object sender, EventArgs e)
+ {
+ DataLoad();
+
+ }
+
+ protected void btnDelete_Click(object sender, EventArgs e)
+ {
+ var model = bll.GetModel(IdInput.Value);
+ /*
+ var list = bll_app.GetModelList("soft_id='" + soft_id + "' "); // 附件条件,进度未完成:now() < end_time
+ if (list.Count > 0)
+ {
+ RadAjaxManager1.Alert("无法删除,该软件类型已经在使用中!");
+ return;
+ }
+ */
+ if (bll.Delete(IdInput.Value))
+ {
+ if (!string.IsNullOrEmpty(model.cooper_url))
+ {
+ string path = Server.MapPath(model.cooper_url);
+ if (File.Exists(path))
+ {
+ File.SetAttributes(path, FileAttributes.Normal);
+ File.Delete(path);
+ }
+ }
+ log.write_log("删除首页合作厂商成功。" + "名称:" + model.cooper_name + ",ID:" + IdInput.Value);
+ }
+ DataLoad();
+ }
+
+
+
+ protected void dp_type_SelectedIndexChanged(object sender, DropDownListEventArgs e)
+ {
+ DataLoad();
+ }
+ }
+}
\ No newline at end of file
diff --git a/VRS/Management/FirstCooper.aspx.designer.cs b/VRS/Management/FirstCooper.aspx.designer.cs
new file mode 100644
index 0000000..c3caab4
--- /dev/null
+++ b/VRS/Management/FirstCooper.aspx.designer.cs
@@ -0,0 +1,125 @@
+//------------------------------------------------------------------------------
+// <自动生成>
+// 此代码由工具生成。
+//
+// 对此文件的更改可能导致不正确的行为,如果
+// 重新生成代码,则所做更改将丢失。
+// 自动生成>
+//------------------------------------------------------------------------------
+
+namespace VRS.Management
+{
+
+
+ public partial class FirstCooper
+ {
+
+ ///
+ /// form1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+
+ ///
+ /// RadScriptManager1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::Telerik.Web.UI.RadScriptManager RadScriptManager1;
+
+ ///
+ /// IdInput 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.HiddenField IdInput;
+
+ ///
+ /// btnDelete 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Button btnDelete;
+
+ ///
+ /// hd_mainId 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.HiddenField hd_mainId;
+
+ ///
+ /// hd_subId 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.HiddenField hd_subId;
+
+ ///
+ /// hd_taskId 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.HiddenField hd_taskId;
+
+ ///
+ /// name 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::Telerik.Web.UI.RadTextBox name;
+
+ ///
+ /// btnSelect 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Button btnSelect;
+
+ ///
+ /// dataList 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::Telerik.Web.UI.RadGrid dataList;
+
+ ///
+ /// RadWindowManager1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::Telerik.Web.UI.RadWindowManager RadWindowManager1;
+
+ ///
+ /// RadAjaxManager1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::Telerik.Web.UI.RadAjaxManager RadAjaxManager1;
+ }
+}
diff --git a/VRS/Management/FirstCooper_Add.aspx b/VRS/Management/FirstCooper_Add.aspx
new file mode 100644
index 0000000..ba7b2b2
--- /dev/null
+++ b/VRS/Management/FirstCooper_Add.aspx
@@ -0,0 +1,139 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="FirstCooper_Add.aspx.cs" Inherits="VRS.Management.FirstCooper_Add" %>
+
+<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
+
+
+
+
+
+
+ 添加合作厂商
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/VRS/Management/FirstCooper_Add.aspx.cs b/VRS/Management/FirstCooper_Add.aspx.cs
new file mode 100644
index 0000000..12f31d2
--- /dev/null
+++ b/VRS/Management/FirstCooper_Add.aspx.cs
@@ -0,0 +1,160 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using Telerik.Web.UI;
+using System.IO;
+
+namespace VRS.Management
+{
+ public partial class FirstCooper_Add : BasePage
+ {
+ DataService.BLL.pro_first_cooper bll = new DataService.BLL.pro_first_cooper();
+
+ DataService.BLL.admin_log log = new DataService.BLL.admin_log();
+ protected override void Page_Load(object sender, EventArgs e)
+ {
+ base.Page_Load(sender, e);
+ if (!IsPostBack)
+ {
+
+ }
+ }
+
+
+
+ protected void btnSure_Click(object sender, EventArgs e)
+ {
+
+ /*
+ if (string.IsNullOrEmpty(app_name.Text) || string.IsNullOrEmpty(dp_major.SelectedValue) || string.IsNullOrEmpty(dp_subject.SelectedValue) || string.IsNullOrEmpty(dp_soft.SelectedValue))
+ {
+ RadAjaxManager1.Alert("应用名称、专业分类、科目分类、软件分类不能为空!");
+ return;
+ }
+ */
+
+ /*
+ if (bll.GetRecordCount(string.Format(" login_name = '{0}' ", login_name.Text.Trim())) > 0)
+ {
+ RadAjaxManager1.Alert("账号禁止重复!");
+ return;
+ }
+ */
+
+ if (string.IsNullOrEmpty(imgTopic.ImageUrl))
+ {
+ RadAjaxManager1.Alert("图片不能为空!");
+ return;
+ }
+
+ if (string.IsNullOrEmpty(name.Text))
+ {
+ RadAjaxManager1.Alert("厂商名称不能为空!");
+ return;
+ }
+
+ var model = new DataService.Model.pro_first_cooper();
+ model.id = BasePage.GetId();
+ model.cooper_name = name.Text.Trim();
+ model.cooper_url = imgTopic.ImageUrl;
+ model.dsc = dsc.Text;
+ model.pos = int.Parse(position.Text.Trim());
+ model.create_time = DateTime.Now;
+
+ if (bll.Add(model))
+ {
+ //log.write_log("添加应用成功。" + "应用:" + model.app_name + ",ID:" + model.user_id);
+ RadAjaxManager1.ResponseScripts.Add("alert('添加成功!');CloseAndRebind();");
+ }
+ else
+ {
+ RadAjaxManager1.Alert("添加失败!");
+ }
+ }
+
+ protected void btnUpload_Click(object sender, EventArgs e)
+ {
+ if (RadAsyncUpload1.UploadedFiles.Count < 1)
+ {
+ RadAjaxManager1.Alert("未选择图片!");
+ return;
+ }
+
+ var uploadFile = RadAsyncUpload1.UploadedFiles[0];
+
+ //图片
+ var upload_type = "0";// type.SelectedValue;
+
+ if (upload_type == "0") //图片
+ {
+ var arrray = Util.ConfigInfo.list_pic_type;
+ var extension = uploadFile.GetExtension();
+ if (!arrray.Contains(extension))
+ {
+ RadAjaxManager1.Alert("请上传图片!");
+ return;
+ }
+ }
+ else if (upload_type == "1") //视频,.mp4,.avi,.dat,.3gp,.mov,.rmvb
+ {
+ var arrray = Util.ConfigInfo.list_video_type;
+ var extension = uploadFile.GetExtension();
+ if (!arrray.Contains(extension))
+ {
+ RadAjaxManager1.Alert("请上传视频!");
+ return;
+ }
+ }
+
+
+ if (BasePage.SaveFile(uploadFile, Context, out string filePath))
+ {
+ //imgTopic.ImageUrl = "~" + filePath;
+ if (upload_type == "0")
+ {
+ td_pic.Visible = true;
+ td_video.Visible = false;
+ imgTopic.ImageUrl = "~" + filePath;
+ }
+ else
+ {
+ td_pic.Visible = false;
+ td_video.Visible = true;
+ video.Src = "~" + filePath;
+ }
+ }
+ else
+ {
+ RadAjaxManager1.Alert("上传失败!");
+ }
+ }
+
+ protected void btnRemove_Click(object sender, EventArgs e)
+ {
+ if (!string.IsNullOrEmpty(imgTopic.ImageUrl))
+ {
+ string path = Server.MapPath(imgTopic.ImageUrl);
+ if (File.Exists(path))
+ {
+ File.SetAttributes(path, FileAttributes.Normal);
+ File.Delete(path);
+ }
+ imgTopic.ImageUrl = "";
+ }
+
+ if (!string.IsNullOrEmpty(video.Src))
+ {
+ string path = Server.MapPath(video.Src);
+ if (File.Exists(path))
+ {
+ File.SetAttributes(path, FileAttributes.Normal);
+ File.Delete(path);
+ }
+ video.Src = "";
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/VRS/Management/FirstCooper_Add.aspx.designer.cs b/VRS/Management/FirstCooper_Add.aspx.designer.cs
new file mode 100644
index 0000000..c7262e8
--- /dev/null
+++ b/VRS/Management/FirstCooper_Add.aspx.designer.cs
@@ -0,0 +1,170 @@
+//------------------------------------------------------------------------------
+// <自动生成>
+// 此代码由工具生成。
+//
+// 对此文件的更改可能导致不正确的行为,如果
+// 重新生成代码,则所做更改将丢失。
+// 自动生成>
+//------------------------------------------------------------------------------
+
+namespace VRS.Management
+{
+
+
+ public partial class FirstCooper_Add
+ {
+
+ ///
+ /// form1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+
+ ///
+ /// RadScriptManager1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::Telerik.Web.UI.RadScriptManager RadScriptManager1;
+
+ ///
+ /// UseFor 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.HiddenField UseFor;
+
+ ///
+ /// name 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::Telerik.Web.UI.RadTextBox name;
+
+ ///
+ /// td_pic 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlTableCell td_pic;
+
+ ///
+ /// imgTopic 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Image imgTopic;
+
+ ///
+ /// td_video 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlTableCell td_video;
+
+ ///
+ /// video 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlVideo video;
+
+ ///
+ /// RadAsyncUpload1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::Telerik.Web.UI.RadAsyncUpload RadAsyncUpload1;
+
+ ///
+ /// btnUpload 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Button btnUpload;
+
+ ///
+ /// btnRemove 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Button btnRemove;
+
+ ///
+ /// dsc 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::Telerik.Web.UI.RadTextBox dsc;
+
+ ///
+ /// position 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::Telerik.Web.UI.RadNumericTextBox position;
+
+ ///
+ /// RequiredFieldValidator_position 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator_position;
+
+ ///
+ /// btnSure 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::Telerik.Web.UI.RadButton btnSure;
+
+ ///
+ /// btnCancel 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::Telerik.Web.UI.RadButton btnCancel;
+
+ ///
+ /// RadAjaxManager1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::Telerik.Web.UI.RadAjaxManager RadAjaxManager1;
+ }
+}
diff --git a/VRS/Management/FirstCooper_Edit.aspx b/VRS/Management/FirstCooper_Edit.aspx
new file mode 100644
index 0000000..2860b9d
--- /dev/null
+++ b/VRS/Management/FirstCooper_Edit.aspx
@@ -0,0 +1,138 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="FirstCooper_Edit.aspx.cs" Inherits="VRS.Management.FirstCooper_Edit" %>
+
+<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
+
+
+
+
+
+
+ 修改合作厂商
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/VRS/Management/FirstCooper_Edit.aspx.cs b/VRS/Management/FirstCooper_Edit.aspx.cs
new file mode 100644
index 0000000..2880729
--- /dev/null
+++ b/VRS/Management/FirstCooper_Edit.aspx.cs
@@ -0,0 +1,162 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using System.IO;
+
+namespace VRS.Management
+{
+ public partial class FirstCooper_Edit : BasePage
+ {
+ DataService.BLL.pro_first_cooper bll = new DataService.BLL.pro_first_cooper();
+
+ DataService.BLL.admin_log log = new DataService.BLL.admin_log();
+ protected override void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ //VerifyPermissions("10016");
+ //BindSystemRoles(dpRole);
+ DataLoad();
+ }
+ }
+
+
+ protected void DataLoad()
+ {
+ string Id = Request.Params["Id"];
+ if (!string.IsNullOrWhiteSpace(Id))
+ {
+ var model = bll.GetModel(Id);
+ dsc.Text = model.dsc;
+ imgTopic.ImageUrl = model.cooper_url;
+ name.Text = model.cooper_name;
+ position.Text = model.pos.ToString();
+ }
+ else
+ {
+ OnError(null);
+ }
+ }
+
+ protected void btnSure_Click(object sender, EventArgs e)
+ {
+ string Id = Request.Params["Id"];
+
+ /*
+ if (string.IsNullOrEmpty(real_name.Text))
+ {
+ RadAjaxManager1.Alert("姓名不能为空!");
+ return;
+ }
+ */
+ if (string.IsNullOrEmpty(imgTopic.ImageUrl))
+ {
+ RadAjaxManager1.Alert("图片不能为空!");
+ return;
+ }
+
+ if (string.IsNullOrEmpty(name.Text))
+ {
+ RadAjaxManager1.Alert("厂商名称不能为空!");
+ return;
+ }
+
+ var model = bll.GetModel(Id);
+ model.cooper_name = name.Text.Trim();
+ model.cooper_url = imgTopic.ImageUrl;
+ model.dsc = dsc.Text;
+ model.pos = int.Parse(position.Text.Trim());
+
+ if (bll.Update(model))
+ {
+ log.write_log("修改合作厂商成功。" + "内容:" + dsc.Text.Trim() + ",ID:" + model.id);
+ RadAjaxManager1.ResponseScripts.Add("alert('修改成功!');CloseAndRebind();");
+ }
+ else
+ RadAjaxManager1.Alert("修改失败!");
+ }
+
+ protected void btnUpload_Click(object sender, EventArgs e)
+ {
+ if (RadAsyncUpload1.UploadedFiles.Count < 1)
+ {
+ RadAjaxManager1.Alert("未选择图片!");
+ return;
+ }
+
+ var uploadFile = RadAsyncUpload1.UploadedFiles[0];
+
+ var upload_type = "0";// type.SelectedValue;
+
+ if (upload_type == "0") //图片
+ {
+ var arrray = Util.ConfigInfo.list_pic_type;
+ var extension = uploadFile.GetExtension();
+ if (!arrray.Contains(extension))
+ {
+ RadAjaxManager1.Alert("请上传图片!");
+ return;
+ }
+ }
+ else if (upload_type == "1") //视频,.mp4,.avi,.dat,.3gp,.mov,.rmvb
+ {
+ var arrray = Util.ConfigInfo.list_video_type;
+ var extension = uploadFile.GetExtension();
+ if (!arrray.Contains(extension))
+ {
+ RadAjaxManager1.Alert("请上传视频!");
+ return;
+ }
+ }
+
+
+ if (BasePage.SaveFile(uploadFile, Context, out string filePath))
+ {
+ //imgTopic.ImageUrl = "~" + filePath;
+ if (upload_type == "0")
+ {
+ td_pic.Visible = true;
+ td_video.Visible = false;
+ imgTopic.ImageUrl = "~" + filePath;
+ }
+ else
+ {
+ td_pic.Visible = false;
+ td_video.Visible = true;
+ video.Src = "~" + filePath;
+ }
+ }
+ else
+ {
+ RadAjaxManager1.Alert("上传失败!");
+ }
+ }
+
+ protected void btnRemove_Click(object sender, EventArgs e)
+ {
+ if (!string.IsNullOrEmpty(imgTopic.ImageUrl))
+ {
+ string path = Server.MapPath(imgTopic.ImageUrl);
+ if (File.Exists(path))
+ {
+ File.SetAttributes(path, FileAttributes.Normal);
+ File.Delete(path);
+ }
+ imgTopic.ImageUrl = "";
+ }
+ if (!string.IsNullOrEmpty(video.Src))
+ {
+ string path = Server.MapPath(video.Src);
+ if (File.Exists(path))
+ {
+ File.SetAttributes(path, FileAttributes.Normal);
+ File.Delete(path);
+ }
+ video.Src = "";
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/VRS/Management/FirstCooper_Edit.aspx.designer.cs b/VRS/Management/FirstCooper_Edit.aspx.designer.cs
new file mode 100644
index 0000000..5ca54b8
--- /dev/null
+++ b/VRS/Management/FirstCooper_Edit.aspx.designer.cs
@@ -0,0 +1,170 @@
+//------------------------------------------------------------------------------
+// <自动生成>
+// 此代码由工具生成。
+//
+// 对此文件的更改可能导致不正确的行为,如果
+// 重新生成代码,则所做更改将丢失。
+// 自动生成>
+//------------------------------------------------------------------------------
+
+namespace VRS.Management
+{
+
+
+ public partial class FirstCooper_Edit
+ {
+
+ ///
+ /// form1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+
+ ///
+ /// RadScriptManager1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::Telerik.Web.UI.RadScriptManager RadScriptManager1;
+
+ ///
+ /// UseFor 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.HiddenField UseFor;
+
+ ///
+ /// name 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::Telerik.Web.UI.RadTextBox name;
+
+ ///
+ /// td_pic 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlTableCell td_pic;
+
+ ///
+ /// imgTopic 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Image imgTopic;
+
+ ///
+ /// td_video 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlTableCell td_video;
+
+ ///
+ /// video 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlVideo video;
+
+ ///
+ /// RadAsyncUpload1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::Telerik.Web.UI.RadAsyncUpload RadAsyncUpload1;
+
+ ///
+ /// btnUpload 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Button btnUpload;
+
+ ///
+ /// btnRemove 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Button btnRemove;
+
+ ///
+ /// dsc 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::Telerik.Web.UI.RadTextBox dsc;
+
+ ///
+ /// position 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::Telerik.Web.UI.RadNumericTextBox position;
+
+ ///
+ /// RequiredFieldValidator_position 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator_position;
+
+ ///
+ /// btnSure 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::Telerik.Web.UI.RadButton btnSure;
+
+ ///
+ /// btnCancel 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::Telerik.Web.UI.RadButton btnCancel;
+
+ ///
+ /// RadAjaxManager1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::Telerik.Web.UI.RadAjaxManager RadAjaxManager1;
+ }
+}
diff --git a/VRS/Management/Home.aspx b/VRS/Management/Home.aspx
index 9c7584a..7072ead 100644
--- a/VRS/Management/Home.aspx
+++ b/VRS/Management/Home.aspx
@@ -98,7 +98,7 @@
台风实时数据
两高行业用电量按区县汇总 --%>
- <%-- ">统计分析 --%>
+ <%-- --%>
<%--">巡检编排 --%>
<%--
@@ -125,16 +125,15 @@
关于我们
+ 合作厂商
+ <%-- 轮播内容 --%>
+
<%--
设备巡检要素管理
-
-
- 巡检场景管理
-
巡检地点管理
-
巡检地点设备管理
- 巡检地点场景管理 --%>
+ 巡检地点场景管理
+ --%>
diff --git a/VRS/Management/Loop.aspx b/VRS/Management/Loop.aspx
new file mode 100644
index 0000000..c4adeb3
--- /dev/null
+++ b/VRS/Management/Loop.aspx
@@ -0,0 +1,244 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Loop.aspx.cs" Inherits="VRS.Management.Loop" %>
+
+<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
+
+
+
+
+
+ 首页轮播素材
+
+
+
+
+
+
+
+
+
+
diff --git a/VRS/Management/Loop.aspx.cs b/VRS/Management/Loop.aspx.cs
new file mode 100644
index 0000000..8eff557
--- /dev/null
+++ b/VRS/Management/Loop.aspx.cs
@@ -0,0 +1,119 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Text;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using Telerik.Web.UI;
+
+namespace VRS.Management
+{
+ public partial class Loop : BaseListPage
+ {
+ DataService.BLL.pro_loop bll = new DataService.BLL.pro_loop();
+ DataService.BLL.admin_log log = new DataService.BLL.admin_log();
+
+
+ protected override void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ DataLoad();
+ }
+ }
+
+ protected override void DataLoad()
+ {
+ StringBuilder query = new StringBuilder(" 1 = 1 ");
+ if (!string.IsNullOrWhiteSpace(name.Text.Trim()))
+ {
+ query.AppendFormat(" AND (head LIKE '%{0}%' or dsc LIKE '%{0}%' ) ", name.Text.Trim());
+ }
+ var sql = query.ToString();
+ var data = bll.GetModelList(sql).OrderBy(s => s.id).ToList();
+ dataList.DataSource = data;
+ dataList.Rebind();
+ }
+
+ protected override void GridList_PageIndexChanged(object sender, GridPageChangedEventArgs e)
+ {
+ DataLoad();
+ }
+
+ protected override void GridList_PageSizeChanged(object sender, GridPageSizeChangedEventArgs e)
+ {
+ DataLoad();
+ }
+
+ protected override void GridList_SortCommand(object sender, GridSortCommandEventArgs e)
+ {
+ DataLoad();
+ }
+
+ protected override void GrdList_DeleteCommand(object sender, GridCommandEventArgs e)
+ {
+ //string Id = (e.Item as GridDataItem).OwnerTableView.DataKeyValues[e.Item.ItemIndex]["Id"].ToString();
+ //bll.Delete(Id);
+ //DataLoad();
+ }
+
+ protected override void AjaxManager_AjaxRequest(object sender, AjaxRequestEventArgs e)
+ {
+
+ }
+
+ protected void btnSelect_Click(object sender, EventArgs e)
+ {
+ DataLoad();
+
+ }
+
+ protected void btnDelete_Click(object sender, EventArgs e)
+ {
+ var model = bll.GetModel(IdInput.Value);
+ /*
+ var list = bll_app.GetModelList("soft_id='" + soft_id + "' "); // 附件条件,进度未完成:now() < end_time
+ if (list.Count > 0)
+ {
+ RadAjaxManager1.Alert("无法删除,该软件类型已经在使用中!");
+ return;
+ }
+ */
+ if (bll.Delete(IdInput.Value))
+ {
+ if (!string.IsNullOrEmpty(model.pic_url))
+ {
+ string path = Server.MapPath(model.pic_url);
+ if (File.Exists(path))
+ {
+ File.SetAttributes(path, FileAttributes.Normal);
+ File.Delete(path);
+ }
+ }
+
+ if (!string.IsNullOrEmpty(model.video_url))
+ {
+ string path = Server.MapPath(model.video_url);
+ if (File.Exists(path))
+ {
+ File.SetAttributes(path, FileAttributes.Normal);
+ File.Delete(path);
+ }
+ }
+
+
+ log.write_log("删除轮播素材成功。" + "名称:" + model.head + ",ID:" + IdInput.Value);
+ }
+ DataLoad();
+ }
+
+
+
+ protected void dp_type_SelectedIndexChanged(object sender, DropDownListEventArgs e)
+ {
+ DataLoad();
+ }
+ }
+}
\ No newline at end of file
diff --git a/VRS/Management/Loop.aspx.designer.cs b/VRS/Management/Loop.aspx.designer.cs
new file mode 100644
index 0000000..433b522
--- /dev/null
+++ b/VRS/Management/Loop.aspx.designer.cs
@@ -0,0 +1,125 @@
+//------------------------------------------------------------------------------
+// <自动生成>
+// 此代码由工具生成。
+//
+// 对此文件的更改可能导致不正确的行为,如果
+// 重新生成代码,则所做更改将丢失。
+// 自动生成>
+//------------------------------------------------------------------------------
+
+namespace VRS.Management
+{
+
+
+ public partial class Loop
+ {
+
+ ///
+ /// form1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+
+ ///
+ /// RadScriptManager1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::Telerik.Web.UI.RadScriptManager RadScriptManager1;
+
+ ///
+ /// IdInput 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.HiddenField IdInput;
+
+ ///
+ /// btnDelete 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Button btnDelete;
+
+ ///
+ /// hd_mainId 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.HiddenField hd_mainId;
+
+ ///
+ /// hd_subId 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.HiddenField hd_subId;
+
+ ///
+ /// hd_taskId 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.HiddenField hd_taskId;
+
+ ///
+ /// name 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::Telerik.Web.UI.RadTextBox name;
+
+ ///
+ /// btnSelect 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Button btnSelect;
+
+ ///
+ /// dataList 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::Telerik.Web.UI.RadGrid dataList;
+
+ ///
+ /// RadWindowManager1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::Telerik.Web.UI.RadWindowManager RadWindowManager1;
+
+ ///
+ /// RadAjaxManager1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::Telerik.Web.UI.RadAjaxManager RadAjaxManager1;
+ }
+}
diff --git a/VRS/Management/Loop_Add.aspx b/VRS/Management/Loop_Add.aspx
new file mode 100644
index 0000000..ff5d036
--- /dev/null
+++ b/VRS/Management/Loop_Add.aspx
@@ -0,0 +1,137 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Loop_Add.aspx.cs" Inherits="VRS.Management.Loop_Add" %>
+
+<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
+
+
+
+
+
+
+ 添加轮播素材
+
+
+
+
+
+
+
+
+
+
+
diff --git a/VRS/Management/Loop_Add.aspx.cs b/VRS/Management/Loop_Add.aspx.cs
new file mode 100644
index 0000000..17af479
--- /dev/null
+++ b/VRS/Management/Loop_Add.aspx.cs
@@ -0,0 +1,169 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using System.IO;
+
+namespace VRS.Management
+{
+ public partial class Loop_Add : BasePage
+ {
+ DataService.BLL.admin_log log = new DataService.BLL.admin_log();
+ DataService.BLL.pro_loop bll = new DataService.BLL.pro_loop();
+
+ protected override void Page_Load(object sender, EventArgs e)
+ {
+ base.Page_Load(sender, e);
+ if (!IsPostBack)
+ {
+
+ }
+ }
+ protected void btnSure_Click(object sender, EventArgs e)
+ {
+ if (string.IsNullOrEmpty(name.Text))
+ {
+ RadAjaxManager1.Alert("标题不能为空!");
+ return;
+ }
+
+ /*
+ if (bll.GetRecordCount(string.Format(" device_name = '{0}' ", device_name.Text.Trim())) > 0)
+ {
+ RadAjaxManager1.Alert("设备名称禁止重复!");
+ return;
+ }
+ */
+
+ var model = new DataService.Model.pro_loop();
+ var type_value = type.SelectedValue;
+ if (type_value == "图片" && string.IsNullOrEmpty(imgTopic.ImageUrl))
+ {
+ RadAjaxManager1.Alert("图片内容不能为空!");
+ return;
+ }
+ if (type_value == "视频" && string.IsNullOrEmpty(video.Src))
+ {
+ RadAjaxManager1.Alert("视频内容不能为空!");
+ return;
+ }
+
+ if (type_value == "图片")
+ {
+ model.pic_url = imgTopic.ImageUrl;
+ }
+ else if (type_value == "视频")
+ {
+ model.video_url = video.Src;
+ }
+
+ model.id = BasePage.GetId();
+ model.type =type.SelectedValue;
+ model.head = name.Text.Trim();
+ model.dsc = dsc.Text.Trim();
+
+ if (bll.Add(model))
+ {
+ log.write_log("添加素材成功。" + type.SelectedText + "名称:" + name.Text.Trim() + ",素材ID:" + model.id);
+ RadAjaxManager1.ResponseScripts.Add("alert('添加成功!');CloseAndRebind();");
+ }
+ else
+ {
+ RadAjaxManager1.Alert("添加失败!");
+ }
+ }
+
+
+ protected void btnUpload_Click(object sender, EventArgs e)
+ {
+ if (RadAsyncUpload1.UploadedFiles.Count < 1)
+ {
+ RadAjaxManager1.Alert("未选择文件!");
+ return;
+ }
+
+ var uploadFile = RadAsyncUpload1.UploadedFiles[0];
+ var upload_type = type.SelectedValue;
+ if (upload_type == "图片") //图片
+ {
+ var arrray = Util.ConfigInfo.list_pic_type;
+ var extension = uploadFile.GetExtension();
+ if (!arrray.Contains(extension))
+ {
+ RadAjaxManager1.Alert("请上传图片!");
+ return;
+ }
+ }
+ else if (upload_type == "视频") //视频,.mp4,.avi,.dat,.3gp,.mov,.rmvb
+ {
+ var arrray = Util.ConfigInfo.list_video_type;
+ var extension = uploadFile.GetExtension();
+ if (!arrray.Contains(extension))
+ {
+ RadAjaxManager1.Alert("请上传视频!");
+ return;
+ }
+ }
+
+
+ if (BasePage.SaveFile(uploadFile, Context, out string filePath))
+ {
+ //imgTopic.ImageUrl = "~" + filePath;
+ if (upload_type == "图片")
+ {
+ td_pic.Visible = true;
+ td_video.Visible = false;
+ imgTopic.ImageUrl = "~" + filePath;
+ }
+ else
+ {
+ td_pic.Visible = false;
+ td_video.Visible = true;
+ video.Src = "~" + filePath;
+ }
+ }
+ else
+ {
+ RadAjaxManager1.Alert("上传失败!");
+ }
+ }
+
+ protected void btnRemove_Click(object sender, EventArgs e)
+ {
+ if (!string.IsNullOrEmpty(imgTopic.ImageUrl))
+ {
+ string path = Server.MapPath(imgTopic.ImageUrl);
+ if (File.Exists(path))
+ {
+ File.Delete(path);
+ }
+ imgTopic.ImageUrl = "";
+ }
+ if (!string.IsNullOrEmpty(video.Src))
+ {
+ string path = Server.MapPath(video.Src);
+ if (File.Exists(path))
+ {
+ File.Delete(path);
+ }
+ video.Src = "";
+ }
+ }
+
+ protected void type_SelectedIndexChanged(object sender, Telerik.Web.UI.DropDownListEventArgs e)
+ {
+ if (type.SelectedValue == "图片") //图片
+ {
+ td_video.Visible = false;
+ td_pic.Visible = true;
+ }
+ else //视频
+ {
+ td_video.Visible = true;
+ td_pic.Visible = false;
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/VRS/Management/Loop_Add.aspx.designer.cs b/VRS/Management/Loop_Add.aspx.designer.cs
new file mode 100644
index 0000000..08770c6
--- /dev/null
+++ b/VRS/Management/Loop_Add.aspx.designer.cs
@@ -0,0 +1,161 @@
+//------------------------------------------------------------------------------
+// <自动生成>
+// 此代码由工具生成。
+//
+// 对此文件的更改可能导致不正确的行为,如果
+// 重新生成代码,则所做更改将丢失。
+// 自动生成>
+//------------------------------------------------------------------------------
+
+namespace VRS.Management
+{
+
+
+ public partial class Loop_Add
+ {
+
+ ///
+ /// form1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+
+ ///
+ /// RadScriptManager1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::Telerik.Web.UI.RadScriptManager RadScriptManager1;
+
+ ///
+ /// UseFor 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.HiddenField UseFor;
+
+ ///
+ /// name 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::Telerik.Web.UI.RadTextBox name;
+
+ ///
+ /// type 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::Telerik.Web.UI.RadDropDownList type;
+
+ ///
+ /// dsc 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::Telerik.Web.UI.RadTextBox dsc;
+
+ ///
+ /// td_pic 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlTableCell td_pic;
+
+ ///
+ /// imgTopic 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Image imgTopic;
+
+ ///
+ /// td_video 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlTableCell td_video;
+
+ ///
+ /// video 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlVideo video;
+
+ ///
+ /// RadAsyncUpload1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::Telerik.Web.UI.RadAsyncUpload RadAsyncUpload1;
+
+ ///
+ /// btnUpload 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Button btnUpload;
+
+ ///
+ /// btnRemove 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Button btnRemove;
+
+ ///
+ /// btnSure 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::Telerik.Web.UI.RadButton btnSure;
+
+ ///
+ /// btnCancel 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::Telerik.Web.UI.RadButton btnCancel;
+
+ ///
+ /// RadAjaxManager1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::Telerik.Web.UI.RadAjaxManager RadAjaxManager1;
+ }
+}
diff --git a/VRS/Management/Loop_Edit.aspx b/VRS/Management/Loop_Edit.aspx
new file mode 100644
index 0000000..5c79e72
--- /dev/null
+++ b/VRS/Management/Loop_Edit.aspx
@@ -0,0 +1,140 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Loop_Edit.aspx.cs" Inherits="VRS.Management.Loop_Edit" %>
+
+<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
+
+
+
+
+
+
+ 修改轮播素材
+
+
+
+
+
+
+
+
+
+
+
diff --git a/VRS/Management/Loop_Edit.aspx.cs b/VRS/Management/Loop_Edit.aspx.cs
new file mode 100644
index 0000000..10711f5
--- /dev/null
+++ b/VRS/Management/Loop_Edit.aspx.cs
@@ -0,0 +1,183 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using System.IO;
+
+namespace VRS.Management
+{
+ public partial class Loop_Edit : BasePage
+ {
+ DataService.BLL.pro_loop bll = new DataService.BLL.pro_loop();
+ DataService.BLL.admin_log log = new DataService.BLL.admin_log();
+ protected override void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ DataLoad();
+ }
+ }
+ protected void DataLoad()
+ {
+ string Id = Request.Params["Id"];
+ if (!string.IsNullOrWhiteSpace(Id))
+ {
+ var model = bll.GetModel(Id);
+ type.SelectedValue = model.type;
+ if (model.type == "图片")
+ {
+ td_video.Visible = false;
+ td_pic.Visible = true;
+ imgTopic.ImageUrl = model.pic_url;
+ }
+ else
+ {
+ td_video.Visible = true;
+ td_pic.Visible = false;
+ video.Src = model.video_url;
+ }
+ name.Text = model.head;
+ dsc.Text = model.dsc;
+ }
+ else
+ {
+ OnError(null);
+ }
+ }
+
+ protected void btnSure_Click(object sender, EventArgs e)
+ {
+ string Id = Request.Params["Id"];
+ var model = bll.GetModel(Id);
+ var type_value = type.SelectedValue;
+ if (type_value == "图片" && string.IsNullOrEmpty(imgTopic.ImageUrl))
+ {
+ RadAjaxManager1.Alert("图片内容不能为空!");
+ return;
+ }
+ if (type_value == "视频" && string.IsNullOrEmpty(video.Src))
+ {
+ RadAjaxManager1.Alert("视频内容不能为空!");
+ return;
+ }
+ if (type_value == "图片")
+ {
+ model.pic_url = imgTopic.ImageUrl;
+ }
+ else if (type_value == "视频")
+ {
+ model.video_url = video.Src;
+ }
+
+ if (string.IsNullOrEmpty(name.Text))
+ {
+ RadAjaxManager1.Alert("标题不能为空!");
+ return;
+ }
+ model.type = type.SelectedValue;
+ model.head = name.Text.Trim();
+ model.dsc = dsc.Text.Trim();
+ if (bll.Update(model))
+ {
+ log.write_log("修改素材成功。" + "内容:" + dsc.Text.Trim() + ",ID:" + model.id);
+ RadAjaxManager1.ResponseScripts.Add("alert('修改成功!');CloseAndRebind();");
+ }
+ else
+ RadAjaxManager1.Alert("修改失败!");
+ }
+
+ protected void btnUpload_Click(object sender, EventArgs e)
+ {
+ if (RadAsyncUpload1.UploadedFiles.Count < 1)
+ {
+ RadAjaxManager1.Alert("未选择文件!");
+ return;
+ }
+
+ var uploadFile = RadAsyncUpload1.UploadedFiles[0];
+
+ var upload_type = type.SelectedValue;
+
+ if (upload_type == "图片") //图片
+ {
+ var arrray = Util.ConfigInfo.list_pic_type;
+ var extension = uploadFile.GetExtension();
+ if (!arrray.Contains(extension))
+ {
+ RadAjaxManager1.Alert("请上传图片!");
+ return;
+ }
+ }
+ else if (upload_type == "视频") //视频,.mp4,.avi,.dat,.3gp,.mov,.rmvb
+ {
+ var arrray = Util.ConfigInfo.list_video_type;
+ var extension = uploadFile.GetExtension();
+ if (!arrray.Contains(extension))
+ {
+ RadAjaxManager1.Alert("请上传视频!");
+ return;
+ }
+ }
+ if (BasePage.SaveFile(uploadFile, Context, out string filePath))
+ {
+ //imgTopic.ImageUrl = "~" + filePath;
+ if (upload_type == "图片")
+ {
+ td_pic.Visible = true;
+ td_video.Visible = false;
+ imgTopic.ImageUrl = "~" + filePath;
+ }
+ else
+ {
+ td_pic.Visible = false;
+ td_video.Visible = true;
+ video.Src = "~" + filePath;
+ }
+ }
+ else
+ {
+ RadAjaxManager1.Alert("上传失败!");
+ }
+ }
+
+ protected void btnRemove_Click(object sender, EventArgs e)
+ {
+ if (!string.IsNullOrEmpty(imgTopic.ImageUrl))
+ {
+ string path = Server.MapPath(imgTopic.ImageUrl);
+ if (File.Exists(path))
+ {
+ File.SetAttributes(path, FileAttributes.Normal);
+ File.Delete(path);
+ }
+ imgTopic.ImageUrl = "";
+ }
+ if (!string.IsNullOrEmpty(video.Src))
+ {
+ string path = Server.MapPath(video.Src);
+ if (File.Exists(path))
+ {
+ File.SetAttributes(path, FileAttributes.Normal);
+ File.Delete(path);
+ }
+ video.Src = "";
+ }
+ }
+
+ protected void type_SelectedIndexChanged(object sender, Telerik.Web.UI.DropDownListEventArgs e)
+ {
+ if (type.SelectedValue == "图片") //图片
+ {
+ td_video.Visible = false;
+ td_pic.Visible = true;
+ }
+ else //视频
+ {
+ td_video.Visible = true;
+ td_pic.Visible = false;
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/VRS/Management/Loop_Edit.aspx.designer.cs b/VRS/Management/Loop_Edit.aspx.designer.cs
new file mode 100644
index 0000000..adc61ee
--- /dev/null
+++ b/VRS/Management/Loop_Edit.aspx.designer.cs
@@ -0,0 +1,161 @@
+//------------------------------------------------------------------------------
+// <自动生成>
+// 此代码由工具生成。
+//
+// 对此文件的更改可能导致不正确的行为,如果
+// 重新生成代码,则所做更改将丢失。
+// 自动生成>
+//------------------------------------------------------------------------------
+
+namespace VRS.Management
+{
+
+
+ public partial class Loop_Edit
+ {
+
+ ///
+ /// form1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+
+ ///
+ /// RadScriptManager1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::Telerik.Web.UI.RadScriptManager RadScriptManager1;
+
+ ///
+ /// UseFor 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.HiddenField UseFor;
+
+ ///
+ /// name 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::Telerik.Web.UI.RadTextBox name;
+
+ ///
+ /// type 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::Telerik.Web.UI.RadDropDownList type;
+
+ ///
+ /// dsc 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::Telerik.Web.UI.RadTextBox dsc;
+
+ ///
+ /// td_pic 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlTableCell td_pic;
+
+ ///
+ /// imgTopic 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Image imgTopic;
+
+ ///
+ /// td_video 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlTableCell td_video;
+
+ ///
+ /// video 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlVideo video;
+
+ ///
+ /// RadAsyncUpload1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::Telerik.Web.UI.RadAsyncUpload RadAsyncUpload1;
+
+ ///
+ /// btnUpload 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Button btnUpload;
+
+ ///
+ /// btnRemove 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Button btnRemove;
+
+ ///
+ /// btnSure 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::Telerik.Web.UI.RadButton btnSure;
+
+ ///
+ /// btnCancel 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::Telerik.Web.UI.RadButton btnCancel;
+
+ ///
+ /// RadAjaxManager1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::Telerik.Web.UI.RadAjaxManager RadAjaxManager1;
+ }
+}
diff --git a/VRS/Management/Step.aspx b/VRS/Management/Step.aspx
new file mode 100644
index 0000000..1069c93
--- /dev/null
+++ b/VRS/Management/Step.aspx
@@ -0,0 +1,118 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Step.aspx.cs" Inherits="VRS.Management.Step" %>
+
+<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
+
+
+
+
+
+ 排序
+
+
+
+
+
+
+
+
+
+
+
diff --git a/VRS/Management/Step.aspx.cs b/VRS/Management/Step.aspx.cs
new file mode 100644
index 0000000..c044dce
--- /dev/null
+++ b/VRS/Management/Step.aspx.cs
@@ -0,0 +1,84 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using Telerik.Web.UI;
+
+namespace VRS.Management
+{
+ public partial class Step : BasePage
+ {
+
+ DataService.BLL.admin_log log = new DataService.BLL.admin_log();
+ DataService.BLL.pro_first_cooper bll_cooper = new DataService.BLL.pro_first_cooper();
+
+
+ protected override void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ DataLoad();
+ }
+ }
+
+ protected void DataLoad()
+ {
+ string Id = Request.Params["Id"];
+
+ if (Id == "first_cooper")
+ {
+ object list = bll_cooper.GetModelList("").OrderBy(s => s.pos).ToList();
+ RadListBoxDestination.DataSource = list;
+ RadListBoxDestination.DataValueField = "id";
+ RadListBoxDestination.DataTextField = "cooper_name";
+ RadListBoxDestination.DataBind();
+ }
+ }
+
+
+
+ protected void btnSure_Click(object sender, EventArgs e)
+ {
+ string Id = Request.Params["Id"];
+ var items = RadListBoxDestination.Items;
+
+ var list_text = new List();
+ var list_value = new List();
+ foreach (var item in items)
+ {
+ var obj = item as Telerik.Web.UI.ControlItem;
+ list_text.Add(obj.Text);
+ list_value.Add(obj.Value);
+ }
+ var table = "";
+ var key = "";
+ var postion = "pos";
+ if (Id == "first_cooper")
+ {
+ table = "pro_first_cooper";
+ key = "id";
+ }
+
+ if (!string.IsNullOrEmpty(table))
+ {
+ var flag = log.update_position(table, key, postion, list_value);
+ if (flag)
+ {
+ RadAjaxManager1.ResponseScripts.Add("alert('保存成功!');CloseAndRebind();");
+ }
+ else
+ {
+ RadAjaxManager1.ResponseScripts.Add("alert('保存失败!');");
+ }
+ }
+ }
+
+
+ protected void RadListBoxDestination_Reordered(object sender, RadListBoxEventArgs e)
+ {
+ RadListBoxDestination.DataBind();
+ }
+ }
+}
\ No newline at end of file
diff --git a/VRS/Management/Step.aspx.designer.cs b/VRS/Management/Step.aspx.designer.cs
new file mode 100644
index 0000000..692b3b7
--- /dev/null
+++ b/VRS/Management/Step.aspx.designer.cs
@@ -0,0 +1,107 @@
+//------------------------------------------------------------------------------
+// <自动生成>
+// 此代码由工具生成。
+//
+// 对此文件的更改可能导致不正确的行为,如果
+// 重新生成代码,则所做更改将丢失。
+// 自动生成>
+//------------------------------------------------------------------------------
+
+namespace VRS.Management
+{
+
+
+ public partial class Step
+ {
+
+ ///
+ /// form1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+
+ ///
+ /// RadScriptManager1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::Telerik.Web.UI.RadScriptManager RadScriptManager1;
+
+ ///
+ /// RadAjaxLoadingPanel1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::Telerik.Web.UI.RadAjaxLoadingPanel RadAjaxLoadingPanel1;
+
+ ///
+ /// DemoContainer1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlGenericControl DemoContainer1;
+
+ ///
+ /// div_title 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlGenericControl div_title;
+
+ ///
+ /// RadListBoxDestination 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::Telerik.Web.UI.RadListBox RadListBoxDestination;
+
+ ///
+ /// UseFor 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.HiddenField UseFor;
+
+ ///
+ /// btnSure 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::Telerik.Web.UI.RadButton btnSure;
+
+ ///
+ /// btnCancel 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::Telerik.Web.UI.RadButton btnCancel;
+
+ ///
+ /// RadAjaxManager1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::Telerik.Web.UI.RadAjaxManager RadAjaxManager1;
+ }
+}
diff --git a/VRS/Management/UserManage_Add.aspx b/VRS/Management/UserManage_Add.aspx
index 153e048..7ed2331 100644
--- a/VRS/Management/UserManage_Add.aspx
+++ b/VRS/Management/UserManage_Add.aspx
@@ -146,7 +146,7 @@
|
-
+
diff --git a/VRS/Management/UserManage_Add.aspx.cs b/VRS/Management/UserManage_Add.aspx.cs
index 62c20b0..324e25a 100644
--- a/VRS/Management/UserManage_Add.aspx.cs
+++ b/VRS/Management/UserManage_Add.aspx.cs
@@ -90,7 +90,7 @@ namespace VRS.Management
var upload_type = "0";// type.SelectedValue;
if (upload_type == "0") //图片
{
- var arrray = new string[] { ".jpg", ".png", ".bmp", ".jpeg" };
+ var arrray = Util.ConfigInfo.list_pic_type;
var extension = uploadFile.GetExtension();
if (!arrray.Contains(extension))
{
@@ -100,7 +100,7 @@ namespace VRS.Management
}
else if (upload_type == "1") //视频,.mp4,.avi,.dat,.3gp,.mov,.rmvb
{
- var arrray = new string[] { ".mp4", ".avi", ".dat", ".3gp", ".mov", ".rmvb" };
+ var arrray = Util.ConfigInfo.list_video_type;
var extension = uploadFile.GetExtension();
if (!arrray.Contains(extension))
{
diff --git a/VRS/Management/UserManage_Edit.aspx b/VRS/Management/UserManage_Edit.aspx
index 2ae4ac1..b85f5cc 100644
--- a/VRS/Management/UserManage_Edit.aspx
+++ b/VRS/Management/UserManage_Edit.aspx
@@ -130,7 +130,7 @@
|
-
+
diff --git a/VRS/Management/UserManage_Edit.aspx.cs b/VRS/Management/UserManage_Edit.aspx.cs
index 0217815..a3b2653 100644
--- a/VRS/Management/UserManage_Edit.aspx.cs
+++ b/VRS/Management/UserManage_Edit.aspx.cs
@@ -113,7 +113,7 @@ namespace VRS.Management
var upload_type = "0";// type.SelectedValue;
if (upload_type == "0") //图片
{
- var arrray = new string[] { ".jpg", ".png", ".bmp", ".jpeg" };
+ var arrray = Util.ConfigInfo.list_pic_type;
var extension = uploadFile.GetExtension();
if (!arrray.Contains(extension))
{
@@ -123,7 +123,7 @@ namespace VRS.Management
}
else if (upload_type == "1") //视频,.mp4,.avi,.dat,.3gp,.mov,.rmvb
{
- var arrray = new string[] { ".mp4", ".avi", ".dat", ".3gp", ".mov", ".rmvb" };
+ var arrray = Util.ConfigInfo.list_video_type;
var extension = uploadFile.GetExtension();
if (!arrray.Contains(extension))
{
diff --git a/VRS/Util/ConfigInfo.cs b/VRS/Util/ConfigInfo.cs
index b7185b8..df823b8 100644
--- a/VRS/Util/ConfigInfo.cs
+++ b/VRS/Util/ConfigInfo.cs
@@ -8,6 +8,22 @@ namespace VRS.Util
public static class ConfigInfo
{
+ ///
+ /// 图片类型
+ ///
+ public static List list_pic_type = new List()
+ {
+ ".jpg", ".png", ".bmp", ".jpeg", ".gif", ".tiff", ".tif", ".svg", ".webp", ".heif", ".heic"
+ };
+
+ ///
+ /// 视频类型
+ ///
+ public static List list_video_type = new List()
+ {
+ ".mp4", ".avi", ".dat", ".3gp", ".mov", ".rmvb", ".mkv", ".flv", ".wmv", ".webm", ".mpeg", ".mpg", ".ts", ".ogv"
+ };
+
///
/// 实践模式
///
@@ -47,7 +63,7 @@ namespace VRS.Util
///
public static Dictionary DicRole = new Dictionary()
{
-
+
{"0","超级管理员"} , {"1","老师"} , {"2","学生"} , {"3","学校管理员"}
};
diff --git a/VRS/VRS.csproj b/VRS/VRS.csproj
index a916f2e..347270a 100644
--- a/VRS/VRS.csproj
+++ b/VRS/VRS.csproj
@@ -646,6 +646,12 @@
+
+
+
+
+
+
@@ -654,6 +660,7 @@
+
@@ -1114,6 +1121,27 @@
Course_Edit.aspx
+
+ FirstCooper.aspx
+ ASPXCodeBehind
+
+
+ FirstCooper.aspx
+
+
+ FirstCooper_Add.aspx
+ ASPXCodeBehind
+
+
+ FirstCooper_Add.aspx
+
+
+ FirstCooper_Edit.aspx
+ ASPXCodeBehind
+
+
+ FirstCooper_Edit.aspx
+
Home.aspx
ASPXCodeBehind
@@ -1121,6 +1149,27 @@
Home.aspx
+
+ Loop.aspx
+ ASPXCodeBehind
+
+
+ Loop.aspx
+
+
+ Loop_Add.aspx
+ ASPXCodeBehind
+
+
+ Loop_Add.aspx
+
+
+ Loop_Edit.aspx
+ ASPXCodeBehind
+
+
+ Loop_Edit.aspx
+
Main.aspx
ASPXCodeBehind
@@ -1184,6 +1233,13 @@
Soft_Edit.aspx
+
+ Step.aspx
+ ASPXCodeBehind
+
+
+ Step.aspx
+
UserManage.aspx
ASPXCodeBehind
diff --git a/VRS/Web.config b/VRS/Web.config
index 7ec8bc9..c922a02 100644
--- a/VRS/Web.config
+++ b/VRS/Web.config
@@ -19,9 +19,9 @@
-
-
+
+
| | |