关键事项、邮件管理、任务管理
This commit is contained in:
@@ -0,0 +1,140 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="GJSXType.aspx.cs"
|
||||
Inherits="FineUIPro.Web.BaseInfo.GJSXType" %>
|
||||
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<title>事项类别</title>
|
||||
<link href="../res/css/common.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
|
||||
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" Title="事项类别" Layout="HBox" ShowHeader="false">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" Title="事项类别" ShowHeader="false" EnableCollapse="true" PageSize="10" ForceFit="true"
|
||||
ShowBorder="true" AllowPaging="true" IsDatabasePaging="true" runat="server" Width="750px" EnableColumnLines="true"
|
||||
DataKeyNames="GJSXTypeID" DataIDField="GJSXTypeID" OnPageIndexChange="Grid1_PageIndexChange"
|
||||
AllowFilters="true" OnFilterChange="Grid1_FilterChange" EnableTextSelection="True">
|
||||
<Columns>
|
||||
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="50px" HeaderTextAlign="Center" TextAlign="Center"/>
|
||||
<f:RenderField Width="100px" ColumnID="GJSXTypeCode" DataField="GJSXTypeCode"
|
||||
FieldType="String" HeaderText="事项类别编号" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="300px" ColumnID="GJSXTypeName" DataField="GJSXTypeName"
|
||||
FieldType="String" HeaderText="事项类别名称" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
<Listeners>
|
||||
<f:Listener Event="rowselect" Handler="onGridRowSelect" />
|
||||
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
|
||||
</Listeners>
|
||||
<PageItems>
|
||||
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
|
||||
</f:ToolbarSeparator>
|
||||
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
|
||||
</f:ToolbarText>
|
||||
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
|
||||
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
|
||||
</f:DropDownList>
|
||||
</PageItems>
|
||||
</f:Grid>
|
||||
<f:SimpleForm ID="SimpleForm1" runat="server" ShowBorder="true" ShowHeader="false"
|
||||
LabelWidth="80px" BodyPadding="5px" Width="350px">
|
||||
<Items>
|
||||
<f:TextBox ID="hfFormID" runat="server" Hidden="true"></f:TextBox>
|
||||
<f:TextBox ID="txtGJSXTypeCode" Label="编号" ShowRedStar="true" Required="true" MaxLength="50"
|
||||
runat="server" LabelAlign="right" AutoPostBack="true" OnTextChanged="TextBox_TextChanged">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtGJSXTypeName" Label="名称" ShowRedStar="true" Required="true" MaxLength="500"
|
||||
runat="server" LabelAlign="right" AutoPostBack="true" OnTextChanged="TextBox_TextChanged">
|
||||
</f:TextBox>
|
||||
|
||||
</Items>
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Bottom" runat="server">
|
||||
<Items>
|
||||
<f:Button ID="btnNew" Icon="Add" ToolTip="新增" EnablePostBack="false" runat="server" Hidden="true">
|
||||
<Listeners>
|
||||
<f:Listener Event="click" Handler="onNewButtonClick" />
|
||||
</Listeners>
|
||||
</f:Button>
|
||||
<f:Button ID="btnDelete" Enabled="false" ToolTip="删除" Icon="Delete" ConfirmText="确定删除当前数据?" Hidden="true"
|
||||
OnClick="btnDelete_Click" runat="server">
|
||||
</f:Button>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
||||
</f:ToolbarFill>
|
||||
<f:Button ID="btnSave" Icon="SystemSave" runat="server" ValidateForms="SimpleForm1" Hidden="true"
|
||||
OnClick="btnSave_Click">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
</f:SimpleForm>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
<f:Menu ID="Menu1" runat="server">
|
||||
<f:MenuButton ID="btnMenuEdit" OnClick="btnMenuEdit_Click" EnablePostBack="true" Hidden="true"
|
||||
runat="server" Text="编辑" Icon="Pencil">
|
||||
</f:MenuButton>
|
||||
<f:MenuButton ID="btnMenuDelete" OnClick="btnMenuDelete_Click" EnablePostBack="true" Hidden="true"
|
||||
ConfirmText="删除选中行?" ConfirmTarget="Parent" runat="server" Text="删除" Icon="Delete">
|
||||
</f:MenuButton>
|
||||
</f:Menu>
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
var menuID = '<%= Menu1.ClientID %>';
|
||||
// 返回false,来阻止浏览器右键菜单
|
||||
function onRowContextMenu(event, rowId) {
|
||||
F(menuID).show(); //showAt(event.pageX, event.pageY);
|
||||
return false;
|
||||
}
|
||||
|
||||
function reloadGrid() {
|
||||
__doPostBack(null, 'reloadGrid');
|
||||
}
|
||||
var gridClientID = '<%= Grid1.ClientID %>';
|
||||
var btnDeleteClientID = '<%= btnDelete.ClientID %>';
|
||||
var btnSaveClientID = '<%= btnSave.ClientID %>';
|
||||
|
||||
var formClientID = '<%= SimpleForm1.ClientID %>';
|
||||
var hfFormIDClientID = '<%= hfFormID.ClientID %>';
|
||||
var txtCodeClientID = '<%= txtGJSXTypeCode.ClientID %>';
|
||||
var txtNameClientID = '<%= txtGJSXTypeName.ClientID %>';
|
||||
<%--var txtRemarkClientID = '<%=txtRemark.ClientID %>';--%>
|
||||
<%--var txtSolutionTempleteType = '<%=drpSolutionTempleteType.ClientID%>';--%>
|
||||
function onGridRowSelect(event, rowId) {
|
||||
var grid = F(gridClientID);
|
||||
|
||||
// 启用删除按钮
|
||||
F(btnDeleteClientID).enable();
|
||||
|
||||
// 当前行数据
|
||||
var rowValue = grid.getRowValue(rowId);
|
||||
|
||||
// 使用当前行数据填充表单字段
|
||||
F(hfFormIDClientID).setValue(rowId);
|
||||
F(txtCodeClientID).setValue(rowValue['GJSXTypeCode']);
|
||||
F(txtNameClientID).setValue(rowValue['GJSXTypeName']);
|
||||
// F(txtRemarkClientID).setValue(rowValue['Remark']);
|
||||
//F(txtSolutionTempleteType).setValue(rowValue['SolutionTempleteTypeCode']);
|
||||
// 更新保存按钮文本
|
||||
// F(btnSaveClientID).setText('保存数据(编辑)');
|
||||
}
|
||||
|
||||
function onNewButtonClick() {
|
||||
// 重置表单字段
|
||||
F(formClientID).reset();
|
||||
F(hfFormIDClientID).reset();
|
||||
// 清空表格选中行
|
||||
F(gridClientID).clearSelections();
|
||||
// 禁用删除按钮
|
||||
F(btnDeleteClientID).disable();
|
||||
|
||||
// 更新保存按钮文本
|
||||
// F(btnSaveClientID).setText('保存数据(新增)');
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,283 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Web.UI.WebControls;
|
||||
using BLL;
|
||||
|
||||
namespace FineUIPro.Web.BaseInfo
|
||||
{
|
||||
public partial class GJSXType : PageBase
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
////权限按钮方法
|
||||
this.GetButtonPower();
|
||||
Funs.DropDownPageSize(this.ddlPageSize);
|
||||
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
// 绑定表格
|
||||
BindGrid();
|
||||
//SolutionTempleteTypeService.InitSolutionTempleteDropDownList(drpSolutionTempleteType, true);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 绑定数据
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
string strSql = @" select GJSXTypeID ,GJSXTypeCode ,GJSXTypeName,ProjectId from Base_GJSXType order by GJSXTypeCode ";
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, null);
|
||||
Grid1.RecordCount = tb.Rows.Count;
|
||||
tb = GetFilteredTable(Grid1.FilteredData, tb);
|
||||
var table = this.GetPagedDataTable(Grid1, tb);
|
||||
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 分页
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private List<Model.Base_GJSXType> GetPagedDataTable(int pageIndex, int pageSize)
|
||||
{
|
||||
List<Model.Base_GJSXType> source = (from x in Funs.DB.Base_GJSXType orderby x.GJSXTypeCode select x).ToList();
|
||||
List<Model.Base_GJSXType> paged = new List<Model.Base_GJSXType>();
|
||||
|
||||
int rowbegin = pageIndex * pageSize;
|
||||
int rowend = (pageIndex + 1) * pageSize;
|
||||
if (rowend > source.Count())
|
||||
{
|
||||
rowend = source.Count();
|
||||
}
|
||||
|
||||
for (int i = rowbegin; i < rowend; i++)
|
||||
{
|
||||
paged.Add(source[i]);
|
||||
}
|
||||
|
||||
return paged;
|
||||
}
|
||||
|
||||
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
|
||||
{
|
||||
Grid1.PageIndex = e.NewPageIndex;
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 分页下拉选择
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnDelete_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (judgementDelete(hfFormID.Text, true))
|
||||
{
|
||||
var getGJSXType = BLL.GJSXTypeService. GetGJSXTypeById(hfFormID.Text);
|
||||
if (getGJSXType != null)
|
||||
{
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, getGJSXType.GJSXTypeCode, getGJSXType.GJSXTypeID, BLL.Const.GJSXTypeMenuId, BLL.Const.BtnDelete);
|
||||
BLL.GJSXTypeService.DeleteGJSXTypeById(hfFormID.Text);
|
||||
|
||||
// 重新绑定表格,并模拟点击[新增按钮]
|
||||
BindGrid();
|
||||
PageContext.RegisterStartupScript("onNewButtonClick();");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 右键删除事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnMenuDelete_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length > 0)
|
||||
{
|
||||
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
|
||||
{
|
||||
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
|
||||
if (judgementDelete(rowID, true))
|
||||
{
|
||||
var getGJSXType = BLL.GJSXTypeService.GetGJSXTypeById(rowID);
|
||||
if (getGJSXType != null)
|
||||
{
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, getGJSXType.GJSXTypeCode, getGJSXType.GJSXTypeID, BLL.Const.GJSXTypeMenuId, BLL.Const.BtnDelete);
|
||||
BLL.GJSXTypeService.DeleteGJSXTypeById(rowID);
|
||||
}
|
||||
}
|
||||
}
|
||||
BindGrid();
|
||||
PageContext.RegisterStartupScript("onNewButtonClick();");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 右键编辑事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnMenuEdit_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
{
|
||||
Alert.ShowInTop("请至少选择一条记录!");
|
||||
return;
|
||||
}
|
||||
string Id = Grid1.SelectedRowID;
|
||||
var GJSXType = BLL.GJSXTypeService.GetGJSXTypeById(Id);
|
||||
if (GJSXType != null)
|
||||
{
|
||||
this.txtGJSXTypeCode.Text = GJSXType.GJSXTypeCode;
|
||||
this.txtGJSXTypeName.Text = GJSXType.GJSXTypeName;
|
||||
// this.txtRemark.Text = GJSXType.Remark;
|
||||
hfFormID.Text = Id;
|
||||
this.btnDelete.Enabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
protected void Grid1_FilterChange(object sender, EventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 保存按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
string strRowID = hfFormID.Text;
|
||||
Model.Base_GJSXType newGJSXType = new Model.Base_GJSXType
|
||||
{
|
||||
GJSXTypeCode = this.txtGJSXTypeCode.Text.Trim(),
|
||||
GJSXTypeName = this.txtGJSXTypeName.Text.Trim(),
|
||||
//Remark = txtRemark.Text.Trim()
|
||||
};
|
||||
//if (drpSolutionTempleteType.SelectedValue != BLL.Const._Null) {
|
||||
// newGJSXType.SolutionTempleteTypeCode = drpSolutionTempleteType.SelectedValue;
|
||||
//}
|
||||
if (string.IsNullOrEmpty(strRowID))
|
||||
{
|
||||
newGJSXType.GJSXTypeID = SQLHelper.GetNewID(typeof(Model.Base_GJSXType));
|
||||
BLL.GJSXTypeService.AddGJSXType(newGJSXType);
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, newGJSXType.GJSXTypeCode, newGJSXType.GJSXTypeID, BLL.Const.GJSXTypeMenuId, BLL.Const.BtnAdd);
|
||||
}
|
||||
else
|
||||
{
|
||||
newGJSXType.GJSXTypeID = strRowID;
|
||||
BLL.GJSXTypeService.UpdateGJSXType(newGJSXType);
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, newGJSXType.GJSXTypeCode, newGJSXType.GJSXTypeID, BLL.Const.GJSXTypeMenuId, BLL.Const.BtnModify);
|
||||
}
|
||||
this.SimpleForm1.Reset();
|
||||
// 重新绑定表格,并点击当前编辑或者新增的行
|
||||
BindGrid();
|
||||
PageContext.RegisterStartupScript(String.Format("F('{0}').selectRow('{1}');", Grid1.ClientID, newGJSXType.GJSXTypeID));
|
||||
}
|
||||
|
||||
private void retText()
|
||||
{
|
||||
this.hfFormID.Text = string.Empty;
|
||||
this.txtGJSXTypeCode.Text = string.Empty;
|
||||
this.txtGJSXTypeName.Text = string.Empty;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 判断是否可删除
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="isShow"></param>
|
||||
/// <returns></returns>
|
||||
private bool judgementDelete(string id, bool isShow)
|
||||
{
|
||||
string content = string.Empty;
|
||||
//if (Funs.DB.Technique_SpecialScheme.FirstOrDefault(x => x.GJSXTypeID == id) != null)
|
||||
//{
|
||||
// content = "该专业方案类别已在【专业方案】中使用,不能删除!";
|
||||
//}
|
||||
if (string.IsNullOrEmpty(content))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (isShow)
|
||||
{
|
||||
Alert.ShowInTop(content);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
#region 获取按钮权限
|
||||
/// <summary>
|
||||
/// 获取按钮权限
|
||||
/// </summary>
|
||||
/// <param name="button"></param>
|
||||
/// <returns></returns>
|
||||
private void GetButtonPower()
|
||||
{
|
||||
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.GJSXTypeMenuId);
|
||||
if (buttonList.Count() > 0)
|
||||
{
|
||||
if (buttonList.Contains(BLL.Const.BtnAdd))
|
||||
{
|
||||
this.btnNew.Hidden = false;
|
||||
}
|
||||
if (buttonList.Contains(BLL.Const.BtnModify))
|
||||
{
|
||||
this.btnMenuEdit.Hidden = false;
|
||||
}
|
||||
if (buttonList.Contains(BLL.Const.BtnDelete))
|
||||
{
|
||||
this.btnDelete.Hidden = false;
|
||||
this.btnMenuDelete.Hidden = false;
|
||||
}
|
||||
if (buttonList.Contains(BLL.Const.BtnSave))
|
||||
{
|
||||
this.btnSave.Hidden = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 验证事项类别名称、编号是否存在
|
||||
/// <summary>
|
||||
/// 验证专项方案类型名称、编号是否存在
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void TextBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
var q = Funs.DB.Base_GJSXType.FirstOrDefault(x => x.GJSXTypeCode == this.txtGJSXTypeCode.Text.Trim() && (x.GJSXTypeID != hfFormID.Text || (hfFormID.Text == null && x.GJSXTypeID != null)));
|
||||
if (q != null)
|
||||
{
|
||||
ShowNotify("输入的事项类别编号已存在!", MessageBoxIcon.Warning);
|
||||
}
|
||||
|
||||
var q2 = Funs.DB.Base_GJSXType.FirstOrDefault(x => x.GJSXTypeName == this.txtGJSXTypeName.Text.Trim() && (x.GJSXTypeID != hfFormID.Text || (hfFormID.Text == null && x.GJSXTypeID != null)));
|
||||
if (q2 != null)
|
||||
{
|
||||
ShowNotify("输入的事项类别名称已存在!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
+188
@@ -0,0 +1,188 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.BaseInfo
|
||||
{
|
||||
|
||||
|
||||
public partial class GJSXType
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
/// <summary>
|
||||
/// Panel1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel1;
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarSeparator1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarText1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarText ToolbarText1;
|
||||
|
||||
/// <summary>
|
||||
/// ddlPageSize 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList ddlPageSize;
|
||||
|
||||
/// <summary>
|
||||
/// SimpleForm1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.SimpleForm SimpleForm1;
|
||||
|
||||
/// <summary>
|
||||
/// hfFormID 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox hfFormID;
|
||||
|
||||
/// <summary>
|
||||
/// txtGJSXTypeCode 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtGJSXTypeCode;
|
||||
|
||||
/// <summary>
|
||||
/// txtGJSXTypeName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtGJSXTypeName;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
/// <summary>
|
||||
/// btnNew 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnNew;
|
||||
|
||||
/// <summary>
|
||||
/// btnDelete 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnDelete;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarFill1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarFill ToolbarFill1;
|
||||
|
||||
/// <summary>
|
||||
/// btnSave 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSave;
|
||||
|
||||
/// <summary>
|
||||
/// Menu1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Menu Menu1;
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuEdit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuEdit;
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuDelete 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuDelete;
|
||||
}
|
||||
}
|
||||
@@ -5,25 +5,25 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<title>问题类别</title>
|
||||
<title>紧急程度</title>
|
||||
<link href="../res/css/common.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
|
||||
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" Title="问题类别" Layout="HBox" ShowHeader="false">
|
||||
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" Title="紧急程度" Layout="HBox" ShowHeader="false">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" Title="问题类别" ShowHeader="false" EnableCollapse="true" PageSize="10" ForceFit="true"
|
||||
<f:Grid ID="Grid1" Title="紧急程度" ShowHeader="false" EnableCollapse="true" PageSize="10" ForceFit="true"
|
||||
ShowBorder="true" AllowPaging="true" IsDatabasePaging="true" runat="server" Width="750px" EnableColumnLines="true"
|
||||
DataKeyNames="QuestionTypeID" DataIDField="QuestionTypeID" OnPageIndexChange="Grid1_PageIndexChange"
|
||||
AllowFilters="true" OnFilterChange="Grid1_FilterChange" EnableTextSelection="True">
|
||||
<Columns>
|
||||
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="50px" HeaderTextAlign="Center" TextAlign="Center"/>
|
||||
<f:RenderField Width="100px" ColumnID="QuestionTypeCode" DataField="QuestionTypeCode"
|
||||
FieldType="String" HeaderText="问题类别编号" HeaderTextAlign="Center" TextAlign="Center">
|
||||
FieldType="String" HeaderText="紧急程度编号" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="300px" ColumnID="QuestionTypeName" DataField="QuestionTypeName"
|
||||
FieldType="String" HeaderText="问题类别名称" HeaderTextAlign="Center" TextAlign="Left">
|
||||
FieldType="String" HeaderText="紧急程度名称" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<%--<f:RenderField Width="300px" ColumnID="SolutionTempleteTypeName" DataField="SolutionTempleteTypeName"
|
||||
FieldType="String" HeaderText="类别" HeaderTextAlign="Center" TextAlign="Left">
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace FineUIPro.Web.BaseInfo
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
string strSql = @" select QuestionTypeID ,QuestionTypeCode ,QuestionTypeName,projectId from Base_QuestionType ";
|
||||
string strSql = @" select QuestionTypeID ,QuestionTypeCode ,QuestionTypeName,projectId from Base_QuestionType order by QuestionTypeCode ";
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, null);
|
||||
Grid1.RecordCount = tb.Rows.Count;
|
||||
tb = GetFilteredTable(Grid1.FilteredData, tb);
|
||||
@@ -260,7 +260,7 @@ namespace FineUIPro.Web.BaseInfo
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 验证问题类别名称、编号是否存在
|
||||
#region 验证紧急程度名称、编号是否存在
|
||||
/// <summary>
|
||||
/// 验证专项方案类型名称、编号是否存在
|
||||
/// </summary>
|
||||
@@ -271,13 +271,13 @@ namespace FineUIPro.Web.BaseInfo
|
||||
var q = Funs.DB.Base_QuestionType.FirstOrDefault(x => x.QuestionTypeCode == this.txtQuestionTypeCode.Text.Trim() && (x.QuestionTypeID != hfFormID.Text || (hfFormID.Text == null && x.QuestionTypeID != null)));
|
||||
if (q != null)
|
||||
{
|
||||
ShowNotify("输入的问题类别编号已存在!", MessageBoxIcon.Warning);
|
||||
ShowNotify("输入的紧急程度编号已存在!", MessageBoxIcon.Warning);
|
||||
}
|
||||
|
||||
var q2 = Funs.DB.Base_QuestionType.FirstOrDefault(x => x.QuestionTypeName == this.txtQuestionTypeName.Text.Trim() && (x.QuestionTypeID != hfFormID.Text || (hfFormID.Text == null && x.QuestionTypeID != null)));
|
||||
if (q2 != null)
|
||||
{
|
||||
ShowNotify("输入的问题类别名称已存在!", MessageBoxIcon.Warning);
|
||||
ShowNotify("输入的紧急程度名称已存在!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
Reference in New Issue
Block a user