代码无效引用清理,试压包资料界面看板修改
This commit is contained in:
@@ -1,15 +1,13 @@
|
||||
using FineUIPro;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
|
||||
public static class Base_CompanytemplateService
|
||||
|
||||
public static class Base_CompanytemplateService
|
||||
{
|
||||
#region 获取列表
|
||||
/// <summary>
|
||||
@@ -20,19 +18,19 @@ namespace BLL
|
||||
get;
|
||||
set;
|
||||
}
|
||||
public static List<Model.Base_CompanyTemplate> GetBase_CompanyTemplateByModle(Model.Base_CompanyTemplate table)
|
||||
{
|
||||
var q= from x in Funs.DB.Base_CompanyTemplate
|
||||
where
|
||||
( string.IsNullOrEmpty(table.TemplateId)||x.TemplateId.Contains(table.TemplateId)) &&
|
||||
( string.IsNullOrEmpty(table.Code)||x.Code.Contains(table.Code)) &&
|
||||
( string.IsNullOrEmpty(table.Name)||x.Name.Contains(table.Name)) &&
|
||||
( string.IsNullOrEmpty(table.FilePath)||x.FilePath.Contains(table.FilePath)) &&
|
||||
( string.IsNullOrEmpty(table.Remarks)||x.Remarks.Contains(table.Remarks))
|
||||
select x
|
||||
;
|
||||
|
||||
return q.ToList();
|
||||
public static List<Model.Base_CompanyTemplate> GetBase_CompanyTemplateByModle(Model.Base_CompanyTemplate table)
|
||||
{
|
||||
var q = from x in Funs.DB.Base_CompanyTemplate
|
||||
where
|
||||
(string.IsNullOrEmpty(table.TemplateId) || x.TemplateId.Contains(table.TemplateId)) &&
|
||||
(string.IsNullOrEmpty(table.Code) || x.Code.Contains(table.Code)) &&
|
||||
(string.IsNullOrEmpty(table.Name) || x.Name.Contains(table.Name)) &&
|
||||
(string.IsNullOrEmpty(table.FilePath) || x.FilePath.Contains(table.FilePath)) &&
|
||||
(string.IsNullOrEmpty(table.Remarks) || x.Remarks.Contains(table.Remarks))
|
||||
select x
|
||||
;
|
||||
|
||||
return q.ToList();
|
||||
}
|
||||
|
||||
/// 获取分页列表
|
||||
@@ -42,55 +40,56 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static IEnumerable getListData(Model.Base_CompanyTemplate table, Grid Grid1)
|
||||
{
|
||||
var q= GetBase_CompanyTemplateByModle(table);
|
||||
var q = GetBase_CompanyTemplateByModle(table);
|
||||
count = q.Count();
|
||||
if (count == 0)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
// q= q.Take(Grid1.PageSize * Grid1.PageIndex).Skip(Grid1.PageSize * (Grid1.PageIndex)).ToList();
|
||||
// q = SortConditionHelper.SortingAndPaging(q, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize);
|
||||
// q = SortConditionHelper.SortingAndPaging(q, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize);
|
||||
return from x in q
|
||||
select new
|
||||
{
|
||||
x.TemplateId,
|
||||
x.Code,
|
||||
x.Name,
|
||||
x.FilePath,
|
||||
x.Remarks,
|
||||
|
||||
x.TemplateId,
|
||||
x.Code,
|
||||
x.Name,
|
||||
x.FilePath,
|
||||
x.Remarks,
|
||||
|
||||
};
|
||||
}
|
||||
#endregion
|
||||
|
||||
public static Model.Base_CompanyTemplate GetBase_CompanyTemplateById(string TemplateId)
|
||||
{
|
||||
return Funs.DB.Base_CompanyTemplate.FirstOrDefault(x=>x.TemplateId==TemplateId);
|
||||
public static Model.Base_CompanyTemplate GetBase_CompanyTemplateById(string TemplateId)
|
||||
{
|
||||
return Funs.DB.Base_CompanyTemplate.FirstOrDefault(x => x.TemplateId == TemplateId);
|
||||
}
|
||||
public static Model.Base_CompanyTemplate GetBase_CompanyTemplateByCode(string Code)
|
||||
{
|
||||
return Funs.DB.Base_CompanyTemplate.FirstOrDefault(x => x.Code== Code);
|
||||
return Funs.DB.Base_CompanyTemplate.FirstOrDefault(x => x.Code == Code);
|
||||
}
|
||||
public static bool IsExitCode(string Code)
|
||||
{
|
||||
bool result = false;
|
||||
var q= (from x in Funs.DB.Base_CompanyTemplate where x.Code ==Code select x ).FirstOrDefault();
|
||||
if (q!=null)
|
||||
var q = (from x in Funs.DB.Base_CompanyTemplate where x.Code == Code select x).FirstOrDefault();
|
||||
if (q != null)
|
||||
{
|
||||
result = true;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
public static void AddBase_CompanyTemplate(Model.Base_CompanyTemplate newtable)
|
||||
{
|
||||
|
||||
Model.Base_CompanyTemplate table = new Model.Base_CompanyTemplate{
|
||||
TemplateId=newtable.TemplateId,
|
||||
Code=newtable.Code,
|
||||
Name=newtable.Name,
|
||||
FilePath=newtable.FilePath,
|
||||
Remarks=newtable.Remarks,
|
||||
|
||||
Model.Base_CompanyTemplate table = new Model.Base_CompanyTemplate
|
||||
{
|
||||
TemplateId = newtable.TemplateId,
|
||||
Code = newtable.Code,
|
||||
Name = newtable.Name,
|
||||
FilePath = newtable.FilePath,
|
||||
Remarks = newtable.Remarks,
|
||||
};
|
||||
Funs.DB.Base_CompanyTemplate.InsertOnSubmit(table);
|
||||
Funs.DB.SubmitChanges();
|
||||
@@ -103,41 +102,41 @@ namespace BLL
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static void UpdateBase_CompanyTemplate(Model.Base_CompanyTemplate newtable)
|
||||
{
|
||||
|
||||
Model.Base_CompanyTemplate table = Funs.DB.Base_CompanyTemplate.FirstOrDefault(x=>x.TemplateId==newtable.TemplateId);
|
||||
if (table != null)
|
||||
|
||||
Model.Base_CompanyTemplate table = Funs.DB.Base_CompanyTemplate.FirstOrDefault(x => x.TemplateId == newtable.TemplateId);
|
||||
if (table != null)
|
||||
{
|
||||
table.TemplateId=newtable.TemplateId;
|
||||
table.Code=newtable.Code;
|
||||
table.Name=newtable.Name;
|
||||
table.FilePath=newtable.FilePath;
|
||||
table.Remarks=newtable.Remarks;
|
||||
table.TemplateId = newtable.TemplateId;
|
||||
table.Code = newtable.Code;
|
||||
table.Name = newtable.Name;
|
||||
table.FilePath = newtable.FilePath;
|
||||
table.Remarks = newtable.Remarks;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
public static void DeleteBase_CompanyTemplateById (string TemplateId)
|
||||
{
|
||||
|
||||
Model.Base_CompanyTemplate table =Funs.DB.Base_CompanyTemplate.FirstOrDefault(x=>x.TemplateId==TemplateId);
|
||||
if (table != null)
|
||||
{
|
||||
public static void DeleteBase_CompanyTemplateById(string TemplateId)
|
||||
{
|
||||
|
||||
Model.Base_CompanyTemplate table = Funs.DB.Base_CompanyTemplate.FirstOrDefault(x => x.TemplateId == TemplateId);
|
||||
if (table != null)
|
||||
{
|
||||
Funs.DB.Base_CompanyTemplate.DeleteOnSubmit(table);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static void DeleteALLBase_CompanyTemplate ()
|
||||
{
|
||||
if( Funs.DB.Base_CompanyTemplate !=null)
|
||||
{
|
||||
Funs.DB.Base_CompanyTemplate.DeleteAllOnSubmit( Funs.DB.Base_CompanyTemplate);
|
||||
public static void DeleteALLBase_CompanyTemplate()
|
||||
{
|
||||
if (Funs.DB.Base_CompanyTemplate != null)
|
||||
{
|
||||
Funs.DB.Base_CompanyTemplate.DeleteAllOnSubmit(Funs.DB.Base_CompanyTemplate);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
public static void InitBase_CompanyTemplateDownList(FineUIPro.DropDownList dropName, bool isShowPlease)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user