This commit is contained in:
parent
fded5d4485
commit
e12e7ed448
|
|
@ -53,6 +53,43 @@ namespace BLL
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 添加费用类型明细
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="costType"></param>
|
||||||
|
public static void AddCostTypeItem(Model.Base_CostTypeItem costTypeItem)
|
||||||
|
{
|
||||||
|
Model.SGGLDB db = Funs.DB;
|
||||||
|
Model.Base_CostTypeItem newCostType = new Model.Base_CostTypeItem
|
||||||
|
{
|
||||||
|
CostTypeItemId= costTypeItem.CostTypeItemId,
|
||||||
|
CostTypeId = costTypeItem.CostTypeId,
|
||||||
|
SortIndex = costTypeItem.SortIndex,
|
||||||
|
CostTypeItemName = costTypeItem.CostTypeItemName,
|
||||||
|
Remark = costTypeItem.Remark
|
||||||
|
};
|
||||||
|
db.Base_CostTypeItem.InsertOnSubmit(newCostType);
|
||||||
|
db.SubmitChanges();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 修改费用类型明细
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="costType"></param>
|
||||||
|
public static void UpdateCostTypeItem(Model.Base_CostTypeItem costTypeItem)
|
||||||
|
{
|
||||||
|
Model.SGGLDB db = Funs.DB;
|
||||||
|
Model.Base_CostTypeItem newCostType = db.Base_CostTypeItem.FirstOrDefault(e => e.CostTypeId == costTypeItem.CostTypeId);
|
||||||
|
if (newCostType != null)
|
||||||
|
{
|
||||||
|
newCostType.CostTypeId = costTypeItem.CostTypeId;
|
||||||
|
newCostType.SortIndex = costTypeItem.SortIndex;
|
||||||
|
newCostType.CostTypeItemName = costTypeItem.CostTypeItemName;
|
||||||
|
newCostType.Remark = costTypeItem.Remark;
|
||||||
|
db.SubmitChanges();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 根据主键删除费用类型
|
/// 根据主键删除费用类型
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -68,6 +105,21 @@ namespace BLL
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 根据主键删除费用类型
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="costTypeId"></param>
|
||||||
|
public static void DeleteCostTypeItemById(string costTypeItemId)
|
||||||
|
{
|
||||||
|
Model.SGGLDB db = Funs.DB;
|
||||||
|
Model.Base_CostTypeItem costTypeItem = db.Base_CostTypeItem.FirstOrDefault(e => e.CostTypeItemId == costTypeItemId);
|
||||||
|
if (costTypeItem != null)
|
||||||
|
{
|
||||||
|
db.Base_CostTypeItem.DeleteOnSubmit(costTypeItem);
|
||||||
|
db.SubmitChanges();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
|
|
@ -4191,19 +4191,48 @@ namespace BLL
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static List<Model.OfSafetySupervisorsOutput> GetQualityPersonNum()
|
public static List<Model.OfSafetySupervisorsOutput> GetQualityPersonNum()
|
||||||
{
|
{
|
||||||
var result = (from x in Funs.DB.QualityAudit_PersonQuality
|
//var result = (from x in Funs.DB.QualityAudit_PersonQuality
|
||||||
join p in Funs.DB.SitePerson_Person on x.PersonId equals p.PersonId into pGroup
|
// join p in Funs.DB.SitePerson_Person on x.PersonId equals p.PersonId into pGroup
|
||||||
from p in pGroup.DefaultIfEmpty()
|
// from p in pGroup.DefaultIfEmpty()
|
||||||
join pp in Funs.DB.Person_Persons on p.PersonId equals pp.PersonId into ppGroup
|
// join pp in Funs.DB.Person_Persons on p.PersonId equals pp.PersonId into ppGroup
|
||||||
from pp in ppGroup.DefaultIfEmpty()
|
// from pp in ppGroup.DefaultIfEmpty()
|
||||||
|
// join bp in Funs.DB.Base_Project on p.ProjectId equals bp.ProjectId into bpGroup
|
||||||
|
// from bp in bpGroup.DefaultIfEmpty()
|
||||||
|
// join u in Funs.DB.Base_Unit on p.UnitId equals u.UnitId into uGroup
|
||||||
|
// from u in uGroup.DefaultIfEmpty()
|
||||||
|
// join y in Funs.DB.QualityAudit_PersonQuality on x.PersonId equals y.PersonId
|
||||||
|
// join m in Funs.DB.Base_WorkPost on p.WorkPostId equals m.WorkPostId into mGroup
|
||||||
|
// from m in mGroup.DefaultIfEmpty()
|
||||||
|
// where BeUnderConstructionList.Contains(p.ProjectId) && m.PostType == Const.PostType_2 && (x.LimitDate == null || x.LimitDate < DateTime.Now)
|
||||||
|
// select new Model.OfSafetySupervisorsOutput
|
||||||
|
// {
|
||||||
|
// ProjectId = p.ProjectId,
|
||||||
|
// ProjectName = bp.ProjectName,
|
||||||
|
// UnitId = u.UnitId,
|
||||||
|
// UnitName = u.UnitName,
|
||||||
|
// Name = p.PersonName,
|
||||||
|
// Sex = pp.Sex == null ? "" : (pp.Sex == "1" ? "男" : "女"),
|
||||||
|
// IdentityCard = p.IdentityCard,
|
||||||
|
// WorkPostName = m.WorkPostName == null ? "" : m.WorkPostName,
|
||||||
|
// Phone = pp.Telephone
|
||||||
|
// }).ToList();
|
||||||
|
//return result;
|
||||||
|
var result = (from p in Funs.DB.SitePerson_Person
|
||||||
join bp in Funs.DB.Base_Project on p.ProjectId equals bp.ProjectId into bpGroup
|
join bp in Funs.DB.Base_Project on p.ProjectId equals bp.ProjectId into bpGroup
|
||||||
from bp in bpGroup.DefaultIfEmpty()
|
from bp in bpGroup.DefaultIfEmpty()
|
||||||
join u in Funs.DB.Base_Unit on p.UnitId equals u.UnitId into uGroup
|
join u in Funs.DB.Base_Unit on p.UnitId equals u.UnitId into uGroup
|
||||||
from u in uGroup.DefaultIfEmpty()
|
from u in uGroup.DefaultIfEmpty()
|
||||||
join y in Funs.DB.QualityAudit_PersonQuality on x.PersonId equals y.PersonId
|
join q in Funs.DB.QualityAudit_PersonQuality on p.PersonId equals q.PersonId into qGroup
|
||||||
|
from q in qGroup.DefaultIfEmpty()
|
||||||
join m in Funs.DB.Base_WorkPost on p.WorkPostId equals m.WorkPostId into mGroup
|
join m in Funs.DB.Base_WorkPost on p.WorkPostId equals m.WorkPostId into mGroup
|
||||||
from m in mGroup.DefaultIfEmpty()
|
from m in mGroup.DefaultIfEmpty()
|
||||||
where BeUnderConstructionList.Contains(p.ProjectId) && m.PostType == Const.PostType_2 && (x.LimitDate == null || x.LimitDate < DateTime.Now)
|
join su in Funs.DB.Person_Persons on q.CompileMan equals su.PersonId into suGroup
|
||||||
|
from su in suGroup.DefaultIfEmpty()
|
||||||
|
join bc in Funs.DB.Base_Certificate on q.CertificateId equals bc.CertificateId into bcGroup
|
||||||
|
from bc in bcGroup.DefaultIfEmpty()
|
||||||
|
join su1 in Funs.DB.Person_Persons on q.AuditorId equals su1.PersonId into su1Group
|
||||||
|
from su1 in su1Group.DefaultIfEmpty()
|
||||||
|
where BeUnderConstructionList.Contains(p.ProjectId) && m.PostType == Const.PostType_2
|
||||||
select new Model.OfSafetySupervisorsOutput
|
select new Model.OfSafetySupervisorsOutput
|
||||||
{
|
{
|
||||||
ProjectId = p.ProjectId,
|
ProjectId = p.ProjectId,
|
||||||
|
|
@ -4211,12 +4240,13 @@ namespace BLL
|
||||||
UnitId = u.UnitId,
|
UnitId = u.UnitId,
|
||||||
UnitName = u.UnitName,
|
UnitName = u.UnitName,
|
||||||
Name = p.PersonName,
|
Name = p.PersonName,
|
||||||
Sex = pp.Sex == null ? "" : (pp.Sex == "1" ? "男" : "女"),
|
Sex = su.Sex == null ? "" : (su.Sex == "1" ? "男" : "女"),
|
||||||
IdentityCard = p.IdentityCard,
|
IdentityCard = p.IdentityCard,
|
||||||
WorkPostName = m.WorkPostName == null ? "" : m.WorkPostName,
|
WorkPostName = m.WorkPostName == null ? "" : m.WorkPostName,
|
||||||
Phone = pp.Telephone
|
Phone = su.Telephone
|
||||||
}).ToList();
|
}).ToList();
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取在岗特种作业人员数量(异步)
|
/// 获取在岗特种作业人员数量(异步)
|
||||||
|
|
|
||||||
|
|
@ -16,8 +16,20 @@
|
||||||
runat="server" BoxFlex="1" AllowPaging="false" DataKeyNames="ID" EnableTree="true" TreeColumn="Name"
|
runat="server" BoxFlex="1" AllowPaging="false" DataKeyNames="ID" EnableTree="true" TreeColumn="Name"
|
||||||
DataIDField="ID" DataParentIDField="ParentId" IsDatabasePaging="true" PageSize="100" OnPageIndexChange="Grid1_PageIndexChange"
|
DataIDField="ID" DataParentIDField="ParentId" IsDatabasePaging="true" PageSize="100" OnPageIndexChange="Grid1_PageIndexChange"
|
||||||
AllowSorting="true" SortField="Code" OnSort="Grid1_Sort" SortDirection="ASC" EnableColumnLines="true"
|
AllowSorting="true" SortField="Code" OnSort="Grid1_Sort" SortDirection="ASC" EnableColumnLines="true"
|
||||||
EnableTextSelection="True" ExpandAllTreeNodes="true">
|
EnableTextSelection="True" ExpandAllTreeNodes="true" EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick">
|
||||||
<Columns>
|
<Toolbars>
|
||||||
|
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Right">
|
||||||
|
<Items>
|
||||||
|
<f:Button ID="btnNew" Icon="Add" EnablePostBack="true" Hidden="true" Text="增加类别"
|
||||||
|
runat="server">
|
||||||
|
</f:Button>
|
||||||
|
<f:Button ID="btnNewItem" Icon="Add" EnablePostBack="true" Hidden="true" Text="增加明细"
|
||||||
|
runat="server">
|
||||||
|
</f:Button>
|
||||||
|
</Items>
|
||||||
|
</f:Toolbar>
|
||||||
|
</Toolbars>
|
||||||
|
<Columns>
|
||||||
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="60px" HeaderTextAlign="Center" TextAlign="Center"/>
|
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="60px" HeaderTextAlign="Center" TextAlign="Center"/>
|
||||||
<f:RenderField Width="250px" ColumnID="Name" DataField="Name" FieldType="String"
|
<f:RenderField Width="250px" ColumnID="Name" DataField="Name" FieldType="String"
|
||||||
HeaderText="名称" HeaderTextAlign="Center" TextAlign="Left">
|
HeaderText="名称" HeaderTextAlign="Center" TextAlign="Left">
|
||||||
|
|
@ -25,7 +37,10 @@
|
||||||
<f:RenderField Width="400px" ColumnID="Remark" DataField="Remark" FieldType="String"
|
<f:RenderField Width="400px" ColumnID="Remark" DataField="Remark" FieldType="String"
|
||||||
HeaderText="备注" HeaderTextAlign="Center" TextAlign="Left">
|
HeaderText="备注" HeaderTextAlign="Center" TextAlign="Left">
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
</Columns>
|
</Columns>
|
||||||
|
<Listeners>
|
||||||
|
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
|
||||||
|
</Listeners>
|
||||||
<PageItems>
|
<PageItems>
|
||||||
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
|
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
|
||||||
</f:ToolbarSeparator>
|
</f:ToolbarSeparator>
|
||||||
|
|
@ -38,11 +53,32 @@
|
||||||
</f:Grid>
|
</f:Grid>
|
||||||
</Items>
|
</Items>
|
||||||
</f:Panel>
|
</f:Panel>
|
||||||
|
<f:Window ID="Window1" Title="费用类型" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||||
|
Target="Parent" EnableResize="false" runat="server" IsModal="true" OnClose="Window1_Close"
|
||||||
|
Width="600px" Height="460px">
|
||||||
|
</f:Window>
|
||||||
|
<f:Menu ID="Menu1" runat="server">
|
||||||
|
<Items>
|
||||||
|
<f:MenuButton ID="btnMenuModify" EnablePostBack="true" runat="server" Text="修改" Icon="Pencil" OnClick="btnMenuModify_Click" Hidden="true">
|
||||||
|
</f:MenuButton>
|
||||||
|
<f:MenuButton ID="btnMenuDel" EnablePostBack="true" runat="server" Icon="Delete" Text="删除" ConfirmText="确定删除当前数据?"
|
||||||
|
OnClick="btnMenuDel_Click" Hidden="true">
|
||||||
|
</f:MenuButton>
|
||||||
|
</Items>
|
||||||
|
</f:Menu>
|
||||||
</form>
|
</form>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
function reloadGrid() {
|
function reloadGrid() {
|
||||||
__doPostBack(null, 'reloadGrid');
|
__doPostBack(null, 'reloadGrid');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var menuID = '<%= Menu1.ClientID %>';
|
||||||
|
|
||||||
|
// 返回false,来阻止浏览器右键菜单
|
||||||
|
function onRowContextMenu(event, rowId) {
|
||||||
|
F(menuID).show(); //showAt(event.pageX, event.pageY);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,9 @@ namespace FineUIPro.Web.BaseInfo
|
||||||
{
|
{
|
||||||
Funs.DropDownPageSize(this.ddlPageSize);
|
Funs.DropDownPageSize(this.ddlPageSize);
|
||||||
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||||
|
btnNew.OnClientClick = Window1.GetShowReference("CostTypeEdit.aspx") + "return false;";
|
||||||
|
btnNewItem.OnClientClick = Window1.GetShowReference("CostTypeItemEdit.aspx") + "return false;";
|
||||||
|
GetButtonPower();
|
||||||
// 绑定表格
|
// 绑定表格
|
||||||
BindGrid();
|
BindGrid();
|
||||||
}
|
}
|
||||||
|
|
@ -112,6 +115,102 @@ namespace FineUIPro.Web.BaseInfo
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region 获取按钮权限
|
||||||
|
/// <summary>
|
||||||
|
/// 获取按钮权限
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="button"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
private void GetButtonPower()
|
||||||
|
{
|
||||||
|
if (Request.Params["value"] == "0")
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, BLL.Const.CostTypeMenuId);
|
||||||
|
if (buttonList.Count() > 0)
|
||||||
|
{
|
||||||
|
if (buttonList.Contains(BLL.Const.BtnAdd))
|
||||||
|
{
|
||||||
|
this.btnNew.Hidden = false;
|
||||||
|
this.btnNewItem.Hidden = false;
|
||||||
|
}
|
||||||
|
if (buttonList.Contains(BLL.Const.BtnModify))
|
||||||
|
{
|
||||||
|
this.btnMenuModify.Hidden = false;
|
||||||
|
}
|
||||||
|
if (buttonList.Contains(BLL.Const.BtnDelete))
|
||||||
|
{
|
||||||
|
this.btnMenuDel.Hidden = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
//右键编辑
|
||||||
|
protected void btnMenuModify_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
EditData();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
|
||||||
|
{
|
||||||
|
EditData();
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 编辑数据方法
|
||||||
|
/// </summary>
|
||||||
|
private void EditData()
|
||||||
|
{
|
||||||
|
|
||||||
|
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||||
|
{
|
||||||
|
Alert.ShowInTop("请至少选择一条记录", MessageBoxIcon.Warning);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Model.Base_CostType costType = BLL.CostTypeService.GetCostTypeById(Grid1.SelectedRowID);
|
||||||
|
if (costType != null)
|
||||||
|
{
|
||||||
|
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("CostTypeEdit.aspx?CostTypeId={0}", Grid1.SelectedRowID, "编辑 - ")));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("CostTypeItemEdit.aspx?CostTypeItemId={0}", Grid1.SelectedRowID, "编辑 - ")));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//右键删除
|
||||||
|
protected void btnMenuDel_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (Grid1.SelectedRowIndexArray.Length > 0)
|
||||||
|
{
|
||||||
|
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
|
||||||
|
{
|
||||||
|
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
|
||||||
|
var item = BLL.CostTypeService.GetCostTypeById(rowID);
|
||||||
|
if (item != null)
|
||||||
|
{
|
||||||
|
BLL.CostTypeService.DeleteCostTypeById(rowID);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
BLL.CostTypeService.DeleteCostTypeItemById(rowID);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
BindGrid();
|
||||||
|
ShowNotify("删除数据成功!", MessageBoxIcon.Success);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 窗体关闭
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void Window1_Close(object sender, WindowCloseEventArgs e)
|
||||||
|
{
|
||||||
|
BindGrid();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -7,13 +7,11 @@
|
||||||
// </自动生成>
|
// </自动生成>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
namespace FineUIPro.Web.BaseInfo
|
namespace FineUIPro.Web.BaseInfo {
|
||||||
{
|
|
||||||
|
|
||||||
|
public partial class CostType {
|
||||||
public partial class CostType
|
|
||||||
{
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// form1 控件。
|
/// form1 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -22,7 +20,7 @@ namespace FineUIPro.Web.BaseInfo
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// PageManager1 控件。
|
/// PageManager1 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -31,7 +29,7 @@ namespace FineUIPro.Web.BaseInfo
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.PageManager PageManager1;
|
protected global::FineUIPro.PageManager PageManager1;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Panel1 控件。
|
/// Panel1 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -40,7 +38,7 @@ namespace FineUIPro.Web.BaseInfo
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.Panel Panel1;
|
protected global::FineUIPro.Panel Panel1;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Grid1 控件。
|
/// Grid1 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -49,7 +47,34 @@ namespace FineUIPro.Web.BaseInfo
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.Grid Grid1;
|
protected global::FineUIPro.Grid Grid1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Toolbar1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Toolbar Toolbar1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnNew 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Button btnNew;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnNewItem 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Button btnNewItem;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// ToolbarSeparator1 控件。
|
/// ToolbarSeparator1 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -58,7 +83,7 @@ namespace FineUIPro.Web.BaseInfo
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
|
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// ToolbarText1 控件。
|
/// ToolbarText1 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -67,7 +92,7 @@ namespace FineUIPro.Web.BaseInfo
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.ToolbarText ToolbarText1;
|
protected global::FineUIPro.ToolbarText ToolbarText1;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// ddlPageSize 控件。
|
/// ddlPageSize 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -76,5 +101,41 @@ namespace FineUIPro.Web.BaseInfo
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.DropDownList ddlPageSize;
|
protected global::FineUIPro.DropDownList ddlPageSize;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Window1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Window Window1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Menu1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Menu Menu1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnMenuModify 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.MenuButton btnMenuModify;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnMenuDel 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.MenuButton btnMenuDel;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,52 @@
|
||||||
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CostTypeEdit.aspx.cs" Inherits="FineUIPro.Web.BaseInfo.CostTypeEdit" %>
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head runat="server">
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||||
|
<title></title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<form id="form1" runat="server">
|
||||||
|
<f:PageManager ID="PageManager1" AutoSizePanelID="SimpleForm1" runat="server" />
|
||||||
|
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true"
|
||||||
|
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||||
|
<Rows>
|
||||||
|
<f:FormRow>
|
||||||
|
<Items>
|
||||||
|
<f:TextBox ID="txtCostTypeCode" runat="server" Label="编号" MaxLength="50" Readonly="true">
|
||||||
|
|
||||||
|
</f:TextBox>
|
||||||
|
</Items>
|
||||||
|
</f:FormRow>
|
||||||
|
<f:FormRow>
|
||||||
|
<Items>
|
||||||
|
<f:TextBox ID="txtCostTypeName" runat="server" Label="类型名称" Required="true" MaxLength="50"
|
||||||
|
ShowRedStar="true" >
|
||||||
|
</f:TextBox>
|
||||||
|
</Items>
|
||||||
|
</f:FormRow>
|
||||||
|
<f:FormRow>
|
||||||
|
<Items>
|
||||||
|
<f:TextBox ID="txtRemark" runat="server" Label="备注" Required="true" MaxLength="500"
|
||||||
|
ShowRedStar="true" >
|
||||||
|
</f:TextBox>
|
||||||
|
</Items>
|
||||||
|
</f:FormRow>
|
||||||
|
</Rows>
|
||||||
|
<Toolbars>
|
||||||
|
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
|
||||||
|
<Items>
|
||||||
|
<f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="保存" ValidateForms="SimpleForm1"
|
||||||
|
OnClick="btnSave_Click">
|
||||||
|
</f:Button>
|
||||||
|
<f:Button ID="btnClose" EnablePostBack="false" Text="关闭" runat="server" Icon="SystemClose">
|
||||||
|
</f:Button>
|
||||||
|
</Items>
|
||||||
|
</f:Toolbar>
|
||||||
|
</Toolbars>
|
||||||
|
</f:Form>
|
||||||
|
</form>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,99 @@
|
||||||
|
using BLL;
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
namespace FineUIPro.Web.BaseInfo
|
||||||
|
{
|
||||||
|
public partial class CostTypeEdit : PageBase
|
||||||
|
{
|
||||||
|
#region 定义项
|
||||||
|
/// <summary>
|
||||||
|
/// 问题巡检类型主键
|
||||||
|
/// </summary>
|
||||||
|
public string CostTypeId
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return (string)ViewState["CostTypeId"];
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
ViewState["CostTypeId"] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 加载页面
|
||||||
|
/// <summary>
|
||||||
|
/// 加载页面
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (!IsPostBack)
|
||||||
|
{
|
||||||
|
btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||||
|
|
||||||
|
this.CostTypeId = Request.QueryString["CostTypeId"];
|
||||||
|
if (!string.IsNullOrEmpty(this.CostTypeId))
|
||||||
|
{
|
||||||
|
var getTypes = BLL.CostTypeService.GetCostTypeById(this.CostTypeId);
|
||||||
|
if (getTypes != null)
|
||||||
|
{
|
||||||
|
this.txtCostTypeCode.Text = getTypes.CostTypeCode.ToString();
|
||||||
|
this.txtCostTypeName.Text = getTypes.CostTypeName;
|
||||||
|
this.txtRemark.Text = getTypes.Remark;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
int code = 1;
|
||||||
|
var maxCode = (from x in Funs.DB.Base_CostType orderby x.CostTypeCode descending select x.CostTypeCode).FirstOrDefault();
|
||||||
|
if (maxCode != null)
|
||||||
|
{
|
||||||
|
code = maxCode.Value + 1;
|
||||||
|
}
|
||||||
|
this.txtCostTypeCode.Text = code.ToString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 保存数据
|
||||||
|
/// <summary>
|
||||||
|
/// 保存按钮
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void btnSave_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, Const.CostTypeMenuId, Const.BtnSave))
|
||||||
|
{
|
||||||
|
Model.Base_CostType title = new Model.Base_CostType();
|
||||||
|
title.CostTypeCode = Funs.GetNewIntOrZero(this.txtCostTypeCode.Text.Trim());
|
||||||
|
title.CostTypeName = this.txtCostTypeName.Text.Trim();
|
||||||
|
title.Remark = this.txtRemark.Text.Trim();
|
||||||
|
if (string.IsNullOrEmpty(this.CostTypeId))
|
||||||
|
{
|
||||||
|
this.CostTypeId = SQLHelper.GetNewID(typeof(Model.Base_CostType));
|
||||||
|
title.CostTypeId = this.CostTypeId;
|
||||||
|
BLL.CostTypeService.AddCostType(title);
|
||||||
|
BLL.LogService.AddSys_Log(this.CurrUser, title.CostTypeCode.ToString(), title.CostTypeId, BLL.Const.CostTypeMenuId, BLL.Const.BtnAdd);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
title.CostTypeId = this.CostTypeId;
|
||||||
|
BLL.CostTypeService.UpdateCostType(title);
|
||||||
|
BLL.LogService.AddSys_Log(this.CurrUser, title.CostTypeCode.ToString(), title.CostTypeId, BLL.Const.CostTypeMenuId, BLL.Const.BtnModify);
|
||||||
|
}
|
||||||
|
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ShowNotify("您没有这个权限,请与管理员联系!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,96 @@
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <自动生成>
|
||||||
|
// 此代码由工具生成。
|
||||||
|
//
|
||||||
|
// 对此文件的更改可能导致不正确的行为,如果
|
||||||
|
// 重新生成代码,则所做更改将丢失。
|
||||||
|
// </自动生成>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace FineUIPro.Web.BaseInfo {
|
||||||
|
|
||||||
|
|
||||||
|
public partial class CostTypeEdit {
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// form1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// PageManager1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.PageManager PageManager1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// SimpleForm1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Form SimpleForm1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// txtCostTypeCode 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.TextBox txtCostTypeCode;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// txtCostTypeName 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.TextBox txtCostTypeName;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// txtRemark 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.TextBox txtRemark;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Toolbar1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Toolbar Toolbar1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnSave 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Button btnSave;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnClose 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Button btnClose;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,56 @@
|
||||||
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CostTypeItemEdit.aspx.cs" Inherits="FineUIPro.Web.BaseInfo.CostTypeItemEdit" %>
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head runat="server">
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||||
|
<title></title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<form id="form1" runat="server">
|
||||||
|
<f:PageManager ID="PageManager1" AutoSizePanelID="SimpleForm1" runat="server" />
|
||||||
|
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true"
|
||||||
|
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||||
|
<Rows>
|
||||||
|
<f:FormRow>
|
||||||
|
<Items>
|
||||||
|
<f:DropDownList ID="drpCostType" ShowRedStar="true" Required="true" runat="server" Label="费用类型" LabelAlign="Right" EnableEdit="true">
|
||||||
|
</f:DropDownList>
|
||||||
|
</Items>
|
||||||
|
</f:FormRow>
|
||||||
|
<f:FormRow>
|
||||||
|
<Items>
|
||||||
|
<f:NumberBox runat="server" ID="txtSortIndex" Required="true" ShowRedStar="true" NoDecimal="true" NoNegative="true" Label="编号" LabelAlign="Right"></f:NumberBox>
|
||||||
|
</Items>
|
||||||
|
</f:FormRow>
|
||||||
|
<f:FormRow>
|
||||||
|
<Items>
|
||||||
|
<f:TextBox ID="txtCostTypeItemName" runat="server" Label="名称" Required="true" MaxLength="50"
|
||||||
|
ShowRedStar="true" >
|
||||||
|
</f:TextBox>
|
||||||
|
</Items>
|
||||||
|
</f:FormRow>
|
||||||
|
<f:FormRow>
|
||||||
|
<Items>
|
||||||
|
<f:TextBox ID="txtRemark" runat="server" Label="备注" MaxLength="500"
|
||||||
|
>
|
||||||
|
</f:TextBox>
|
||||||
|
</Items>
|
||||||
|
</f:FormRow>
|
||||||
|
</Rows>
|
||||||
|
<Toolbars>
|
||||||
|
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
|
||||||
|
<Items>
|
||||||
|
<f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="保存" ValidateForms="SimpleForm1"
|
||||||
|
OnClick="btnSave_Click">
|
||||||
|
</f:Button>
|
||||||
|
<f:Button ID="btnClose" EnablePostBack="false" Text="关闭" runat="server" Icon="SystemClose">
|
||||||
|
</f:Button>
|
||||||
|
</Items>
|
||||||
|
</f:Toolbar>
|
||||||
|
</Toolbars>
|
||||||
|
</f:Form>
|
||||||
|
</form>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,100 @@
|
||||||
|
using BLL;
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
namespace FineUIPro.Web.BaseInfo
|
||||||
|
{
|
||||||
|
public partial class CostTypeItemEdit : PageBase
|
||||||
|
{
|
||||||
|
#region 定义项
|
||||||
|
/// <summary>
|
||||||
|
/// 问题巡检类型主键
|
||||||
|
/// </summary>
|
||||||
|
public string CostTypeItemId
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return (string)ViewState["CostTypeItemId"];
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
ViewState["CostTypeItemId"] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 加载页面
|
||||||
|
/// <summary>
|
||||||
|
/// 加载页面
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (!IsPostBack)
|
||||||
|
{
|
||||||
|
btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||||
|
CostTypeService.InitCostTypeDropDownList(drpCostType, true);
|
||||||
|
this.CostTypeItemId = Request.QueryString["CostTypeItemId"];
|
||||||
|
if (!string.IsNullOrEmpty(this.CostTypeItemId))
|
||||||
|
{
|
||||||
|
var getTypes = BLL.CostTypeService.GetCostTypeItemById(this.CostTypeItemId);
|
||||||
|
if (getTypes != null)
|
||||||
|
{
|
||||||
|
this.drpCostType.SelectedValue = getTypes.CostTypeId;
|
||||||
|
this.txtSortIndex.Text = getTypes.SortIndex.ToString();
|
||||||
|
this.txtCostTypeItemName.Text = getTypes.CostTypeItemName;
|
||||||
|
this.txtRemark.Text = getTypes.Remark;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 保存数据
|
||||||
|
/// <summary>
|
||||||
|
/// 保存按钮
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void btnSave_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, Const.CostTypeMenuId, Const.BtnSave))
|
||||||
|
{
|
||||||
|
if (this.drpCostType.SelectedValue == BLL.Const._Null)
|
||||||
|
{
|
||||||
|
ShowNotify("请选择费用类型!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Model.Base_CostTypeItem title = new Model.Base_CostTypeItem();
|
||||||
|
title.CostTypeId = this.drpCostType.SelectedValue;
|
||||||
|
title.SortIndex = Funs.GetNewIntOrZero(this.txtSortIndex.Text.Trim());
|
||||||
|
title.CostTypeItemName = this.txtCostTypeItemName.Text.Trim();
|
||||||
|
title.Remark = this.txtRemark.Text.Trim();
|
||||||
|
if (string.IsNullOrEmpty(this.CostTypeItemId))
|
||||||
|
{
|
||||||
|
this.CostTypeItemId = SQLHelper.GetNewID(typeof(Model.Base_CostType));
|
||||||
|
title.CostTypeItemId = this.CostTypeItemId;
|
||||||
|
BLL.CostTypeService.AddCostTypeItem(title);
|
||||||
|
BLL.LogService.AddSys_Log(this.CurrUser, title.CostTypeItemId, title.CostTypeItemId, BLL.Const.CostTypeMenuId, BLL.Const.BtnAdd);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
title.CostTypeItemId = this.CostTypeItemId;
|
||||||
|
BLL.CostTypeService.UpdateCostTypeItem(title);
|
||||||
|
BLL.LogService.AddSys_Log(this.CurrUser, title.CostTypeItemId, title.CostTypeItemId, BLL.Const.CostTypeMenuId, BLL.Const.BtnModify);
|
||||||
|
}
|
||||||
|
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ShowNotify("您没有这个权限,请与管理员联系!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,105 @@
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <自动生成>
|
||||||
|
// 此代码由工具生成。
|
||||||
|
//
|
||||||
|
// 对此文件的更改可能导致不正确的行为,如果
|
||||||
|
// 重新生成代码,则所做更改将丢失。
|
||||||
|
// </自动生成>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace FineUIPro.Web.BaseInfo {
|
||||||
|
|
||||||
|
|
||||||
|
public partial class CostTypeItemEdit {
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// form1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// PageManager1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.PageManager PageManager1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// SimpleForm1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Form SimpleForm1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// drpCostType 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.DropDownList drpCostType;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// txtSortIndex 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.NumberBox txtSortIndex;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// txtCostTypeItemName 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.TextBox txtCostTypeItemName;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// txtRemark 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.TextBox txtRemark;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Toolbar1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Toolbar Toolbar1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnSave 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Button btnSave;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnClose 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Button btnClose;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -269,6 +269,8 @@
|
||||||
<Content Include="BaseInfo\CompanytemplateEdit.aspx" />
|
<Content Include="BaseInfo\CompanytemplateEdit.aspx" />
|
||||||
<Content Include="BaseInfo\ConstructionTestType.aspx" />
|
<Content Include="BaseInfo\ConstructionTestType.aspx" />
|
||||||
<Content Include="BaseInfo\CostType.aspx" />
|
<Content Include="BaseInfo\CostType.aspx" />
|
||||||
|
<Content Include="BaseInfo\CostTypeEdit.aspx" />
|
||||||
|
<Content Include="BaseInfo\CostTypeItemEdit.aspx" />
|
||||||
<Content Include="BaseInfo\CQMSTrainObject.aspx" />
|
<Content Include="BaseInfo\CQMSTrainObject.aspx" />
|
||||||
<Content Include="BaseInfo\CQMSTrainType.aspx" />
|
<Content Include="BaseInfo\CQMSTrainType.aspx" />
|
||||||
<Content Include="BaseInfo\DesignProfessional.aspx" />
|
<Content Include="BaseInfo\DesignProfessional.aspx" />
|
||||||
|
|
@ -7832,6 +7834,20 @@
|
||||||
<Compile Include="BaseInfo\CostType.aspx.designer.cs">
|
<Compile Include="BaseInfo\CostType.aspx.designer.cs">
|
||||||
<DependentUpon>CostType.aspx</DependentUpon>
|
<DependentUpon>CostType.aspx</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="BaseInfo\CostTypeEdit.aspx.cs">
|
||||||
|
<DependentUpon>CostTypeEdit.aspx</DependentUpon>
|
||||||
|
<SubType>ASPXCodeBehind</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="BaseInfo\CostTypeEdit.aspx.designer.cs">
|
||||||
|
<DependentUpon>CostTypeEdit.aspx</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="BaseInfo\CostTypeItemEdit.aspx.cs">
|
||||||
|
<DependentUpon>CostTypeItemEdit.aspx</DependentUpon>
|
||||||
|
<SubType>ASPXCodeBehind</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="BaseInfo\CostTypeItemEdit.aspx.designer.cs">
|
||||||
|
<DependentUpon>CostTypeItemEdit.aspx</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="BaseInfo\CQMSTrainObject.aspx.cs">
|
<Compile Include="BaseInfo\CQMSTrainObject.aspx.cs">
|
||||||
<DependentUpon>CQMSTrainObject.aspx</DependentUpon>
|
<DependentUpon>CQMSTrainObject.aspx</DependentUpon>
|
||||||
<SubType>ASPXCodeBehind</SubType>
|
<SubType>ASPXCodeBehind</SubType>
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,10 @@ namespace FineUIPro.Web.Person
|
||||||
UnitService.InitUnitDropDownList(this.drpUnit, string.Empty, false);
|
UnitService.InitUnitDropDownList(this.drpUnit, string.Empty, false);
|
||||||
Funs.FineUIPleaseSelect(drpUnit, "按单位查询");
|
Funs.FineUIPleaseSelect(drpUnit, "按单位查询");
|
||||||
this.drpUnit.SelectedValue = this.CurrUser.UnitId ?? Const.UnitId_SEDIN;
|
this.drpUnit.SelectedValue = this.CurrUser.UnitId ?? Const.UnitId_SEDIN;
|
||||||
|
if (this.CurrUser.UnitId != null && this.CurrUser.UnitId != BLL.Const.UnitId_SEDIN)
|
||||||
|
{
|
||||||
|
this.drpUnit.Enabled = false;
|
||||||
|
}
|
||||||
DepartService.InitDepartDropDownList(this.drpDepart, false);
|
DepartService.InitDepartDropDownList(this.drpDepart, false);
|
||||||
Funs.FineUIPleaseSelect(drpDepart, "按部门查询");
|
Funs.FineUIPleaseSelect(drpDepart, "按部门查询");
|
||||||
ProjectService.InitAllProjectDropDownList(this.drpProject, false);
|
ProjectService.InitAllProjectDropDownList(this.drpProject, false);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue