|
|
@ -13,197 +13,198 @@ namespace SCP.BasicData |
|
|
|
{ |
|
|
|
public partial class SCP_LANGUAGE : PageBase |
|
|
|
{ |
|
|
|
private List<TA_LANGUAGE> _list=new List<TA_LANGUAGE>(); |
|
|
|
public int num; |
|
|
|
protected void Page_Load(object sender, EventArgs e) |
|
|
|
{ |
|
|
|
if (!IsPostBack) |
|
|
|
{ |
|
|
|
BindData(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public void BindData() |
|
|
|
{ |
|
|
|
_list = SearchData(); |
|
|
|
var list = Sort<TA_LANGUAGE>(_list.AsQueryable(), Grid_TA_LANGUAGE); |
|
|
|
Grid_TA_LANGUAGE.DataSource = list; |
|
|
|
Grid_TA_LANGUAGE.RecordCount = list.Count(); |
|
|
|
Grid_TA_LANGUAGE.DataBind(); |
|
|
|
} |
|
|
|
|
|
|
|
//导出
|
|
|
|
public void BtnOutPut_OnClick(object sender, EventArgs e) |
|
|
|
{ |
|
|
|
//var _ret = Controller.SCP_TA_LANGUAGE_CONTROLLER.Get_TA_LANGUAGE_List(new TA_LANGUAGE());
|
|
|
|
//if (_ret.State == ReturnStatus.Succeed)
|
|
|
|
//{
|
|
|
|
// _list = _ret.Result;
|
|
|
|
// var list = Sort<TA_LANGUAGE>(_list.AsQueryable(), Grid_TA_LANGUAGE).ToList();
|
|
|
|
|
|
|
|
// Dictionary<string, string> cellheader = new Dictionary<string, string>(){
|
|
|
|
// { "AddressNo", "地点编号" },
|
|
|
|
// { "Region", "所属区域" },
|
|
|
|
// { "AccountingUnit", "会计单位" },
|
|
|
|
// { "AddressDescription", "地点描述" }
|
|
|
|
//};
|
|
|
|
// string url = EntityListToExcel2003(cellheader, list, "地址");
|
|
|
|
//}
|
|
|
|
} |
|
|
|
|
|
|
|
//查询
|
|
|
|
protected void btnSearch_OnClick(object sender, EventArgs e) |
|
|
|
{ |
|
|
|
BindData(); |
|
|
|
} |
|
|
|
public List<TA_LANGUAGE> SearchData() |
|
|
|
{ |
|
|
|
TA_LANGUAGE _entity = new TA_LANGUAGE(); |
|
|
|
_entity.GUID = TXT_GUID.Text; |
|
|
|
_entity.CH = TXT_CH.Text; |
|
|
|
|
|
|
|
var _ret =SCP_TA_LANGUAGE_CONTROLLER.Get_TA_LANGUAGE_List(_entity); |
|
|
|
if (_ret.State == ReturnStatus.Succeed) |
|
|
|
{ |
|
|
|
_list = _ret.Result; |
|
|
|
|
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
_list = new List<TA_LANGUAGE>(); |
|
|
|
} |
|
|
|
|
|
|
|
return _list; |
|
|
|
|
|
|
|
} |
|
|
|
//显示
|
|
|
|
protected void btnShow_OnClick(object sender, EventArgs e) |
|
|
|
{ |
|
|
|
//gp1.Hidden = false;
|
|
|
|
} |
|
|
|
//关闭
|
|
|
|
protected void btnClose_OnClick(object sender, EventArgs e) |
|
|
|
{ |
|
|
|
//gp1.Hidden = true;
|
|
|
|
} |
|
|
|
|
|
|
|
protected void Grid1_OnPageIndexChange(object sender, GridPageEventArgs e) |
|
|
|
{ |
|
|
|
Grid_TA_LANGUAGE.PageIndex = e.NewPageIndex; |
|
|
|
} |
|
|
|
|
|
|
|
protected void Grid1_OnSort(object sender, GridSortEventArgs e) |
|
|
|
{ |
|
|
|
|
|
|
|
_list = SearchData(); |
|
|
|
var list = Sort<TA_LANGUAGE>(_list.AsQueryable(), Grid_TA_LANGUAGE); |
|
|
|
Grid_TA_LANGUAGE.DataSource = list; |
|
|
|
Grid_TA_LANGUAGE.RecordCount = list.Count(); |
|
|
|
Grid_TA_LANGUAGE.DataBind(); |
|
|
|
} |
|
|
|
|
|
|
|
protected void Btn_Add_Click(object sender, EventArgs e) |
|
|
|
{ |
|
|
|
|
|
|
|
TXT_GUID.Text=Guid.NewGuid().ToString("N").ToUpper(); |
|
|
|
TXT_CH.Text=string.Empty; |
|
|
|
TXT_EN.Text=string.Empty; |
|
|
|
TXT_RU.Text=string.Empty; |
|
|
|
TXT_DE.Text=string.Empty; |
|
|
|
TXT_FR.Text=string.Empty; |
|
|
|
TXT_AR.Text=string.Empty; |
|
|
|
TXT_JP.Text = string.Empty; |
|
|
|
CB_IsDeleted.Checked = false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
protected void Grid_TA_LANGUAGE_RowSelect(object sender, GridRowSelectEventArgs e) |
|
|
|
{ |
|
|
|
object[] rowDataKeys = Grid_TA_LANGUAGE.DataKeys[e.RowIndex]; |
|
|
|
TA_LANGUAGE _entity = new TA_LANGUAGE(); |
|
|
|
_entity.UID = ConvertHelper.To<Int32>(rowDataKeys[0]); |
|
|
|
_entity.GUID = rowDataKeys[1] as string; |
|
|
|
_entity.CH = rowDataKeys[2] as string; |
|
|
|
_entity.EN = rowDataKeys[3] as string; |
|
|
|
_entity.RU = rowDataKeys[4] as string; |
|
|
|
_entity.DE = rowDataKeys[5] as string; |
|
|
|
_entity.FR = rowDataKeys[6] as string; |
|
|
|
_entity.EL = rowDataKeys[7] as string; |
|
|
|
_entity.AR = rowDataKeys[8] as string; |
|
|
|
_entity.JP = rowDataKeys[9] as string; |
|
|
|
_entity.IsDeleted = ConvertHelper.To<Boolean>(rowDataKeys[10]); |
|
|
|
TXT_GUID.Text = _entity.GUID; |
|
|
|
TXT_CH.Text = _entity.CH; |
|
|
|
TXT_EN.Text = _entity.EN; |
|
|
|
TXT_RU.Text = _entity.RU; |
|
|
|
TXT_DE.Text = _entity.DE; |
|
|
|
TXT_FR.Text = _entity.FR; |
|
|
|
TXT_AR.Text = _entity.AR; |
|
|
|
TXT_JP.Text = _entity.JP; |
|
|
|
CB_IsDeleted.Checked = _entity.IsDeleted; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected void Btn_Save_Click(object sender, EventArgs e) |
|
|
|
{ |
|
|
|
TA_LANGUAGE _entity = new TA_LANGUAGE(); |
|
|
|
_entity.GUID = TXT_GUID.Text; |
|
|
|
_entity.CH = TXT_CH.Text; |
|
|
|
_entity.EN = TXT_EN.Text; |
|
|
|
_entity.RU = TXT_RU.Text; |
|
|
|
_entity.DE = TXT_DE.Text; |
|
|
|
_entity.FR = TXT_FR.Text; |
|
|
|
_entity.AR = TXT_AR.Text; |
|
|
|
_entity.JP = TXT_JP.Text; |
|
|
|
_entity.IsDeleted = CB_IsDeleted.Checked; |
|
|
|
var ret=SCP_TA_LANGUAGE_CONTROLLER.Get_TA_LANGUAGE_List(new TA_LANGUAGE { CH = TXT_CH.Text }); |
|
|
|
if (ret.State == ReturnStatus.Succeed) |
|
|
|
{ |
|
|
|
|
|
|
|
if (ret.Result.Count > 0) |
|
|
|
{ |
|
|
|
Alert.ShowInTop("中文名称重复!"); |
|
|
|
return; |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
var ret1 = SCP_TA_LANGUAGE_CONTROLLER.Save_TA_LANGUAGE(new List<TA_LANGUAGE>() { _entity }); |
|
|
|
if (ret1.State == ReturnStatus.Succeed) |
|
|
|
{ |
|
|
|
var _ret = SCP_TA_LANGUAGE_CONTROLLER.Get_TA_LANGUAGE_List(new TA_LANGUAGE()); |
|
|
|
if (_ret.State == ReturnStatus.Succeed) |
|
|
|
{ |
|
|
|
_list = _ret.Result; |
|
|
|
var list = Sort<TA_LANGUAGE>(_list.AsQueryable(), Grid_TA_LANGUAGE); |
|
|
|
Grid_TA_LANGUAGE.DataSource = list; |
|
|
|
Grid_TA_LANGUAGE.RecordCount = list.Count(); |
|
|
|
Grid_TA_LANGUAGE.DataBind(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
protected void Btn_Delete_Click(object sender, EventArgs e) |
|
|
|
{ |
|
|
|
//var ret = SCP_TA_LANGUAGE_CONTROLLER.Del_TA_LANGUAGE(new TA_LANGUAGE { GUID = TXT_GUID.Text });
|
|
|
|
//if (ret.State == ReturnStatus.Succeed)
|
|
|
|
//{
|
|
|
|
// BindData();
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
protected void BtnSearch_Click(object sender, EventArgs e) |
|
|
|
{ |
|
|
|
BindData(); |
|
|
|
} |
|
|
|
// private List<TA_LANGUAGE> _list=new List<TA_LANGUAGE>();
|
|
|
|
// public int num;
|
|
|
|
// protected void Page_Load(object sender, EventArgs e)
|
|
|
|
// {
|
|
|
|
// if (!IsPostBack)
|
|
|
|
// {
|
|
|
|
// BindData();
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
|
|
|
|
// public void BindData()
|
|
|
|
// {
|
|
|
|
// _list = SearchData();
|
|
|
|
// var list = Sort<TA_LANGUAGE>(_list.AsQueryable(), Grid_TA_LANGUAGE);
|
|
|
|
// Grid_TA_LANGUAGE.DataSource = list;
|
|
|
|
// Grid_TA_LANGUAGE.RecordCount = list.Count();
|
|
|
|
// Grid_TA_LANGUAGE.DataBind();
|
|
|
|
// }
|
|
|
|
|
|
|
|
// //导出
|
|
|
|
// public void BtnOutPut_OnClick(object sender, EventArgs e)
|
|
|
|
// {
|
|
|
|
// //var _ret = Controller.SCP_TA_LANGUAGE_CONTROLLER.Get_TA_LANGUAGE_List(new TA_LANGUAGE());
|
|
|
|
// //if (_ret.State == ReturnStatus.Succeed)
|
|
|
|
// //{
|
|
|
|
// // _list = _ret.Result;
|
|
|
|
// // var list = Sort<TA_LANGUAGE>(_list.AsQueryable(), Grid_TA_LANGUAGE).ToList();
|
|
|
|
|
|
|
|
// // Dictionary<string, string> cellheader = new Dictionary<string, string>(){
|
|
|
|
// // { "AddressNo", "地点编号" },
|
|
|
|
// // { "Region", "所属区域" },
|
|
|
|
// // { "AccountingUnit", "会计单位" },
|
|
|
|
// // { "AddressDescription", "地点描述" }
|
|
|
|
// //};
|
|
|
|
// // string url = EntityListToExcel2003(cellheader, list, "地址");
|
|
|
|
// //}
|
|
|
|
// }
|
|
|
|
|
|
|
|
// //查询
|
|
|
|
// protected void btnSearch_OnClick(object sender, EventArgs e)
|
|
|
|
// {
|
|
|
|
// BindData();
|
|
|
|
// }
|
|
|
|
// //public List<TA_LANGUAGE> SearchData()
|
|
|
|
// //{
|
|
|
|
// // TA_LANGUAGE _entity = new TA_LANGUAGE();
|
|
|
|
// // _entity.GUID = TXT_GUID.Text;
|
|
|
|
// // _entity.CH = TXT_CH.Text;
|
|
|
|
|
|
|
|
// // var _ret =SCP_TA_LANGUAGE_CONTROLLER.Get_TA_LANGUAGE_List(_entity);
|
|
|
|
// // if (_ret.State == ReturnStatus.Succeed)
|
|
|
|
// // {
|
|
|
|
// // _list = _ret.Result;
|
|
|
|
|
|
|
|
// // }
|
|
|
|
// // else
|
|
|
|
// // {
|
|
|
|
// // _list = new List<TA_LANGUAGE>();
|
|
|
|
// // }
|
|
|
|
|
|
|
|
// // return _list;
|
|
|
|
|
|
|
|
// //}
|
|
|
|
// //显示
|
|
|
|
// protected void btnShow_OnClick(object sender, EventArgs e)
|
|
|
|
// {
|
|
|
|
// //gp1.Hidden = false;
|
|
|
|
// }
|
|
|
|
// //关闭
|
|
|
|
// protected void btnClose_OnClick(object sender, EventArgs e)
|
|
|
|
// {
|
|
|
|
// //gp1.Hidden = true;
|
|
|
|
// }
|
|
|
|
|
|
|
|
// protected void Grid1_OnPageIndexChange(object sender, GridPageEventArgs e)
|
|
|
|
// {
|
|
|
|
// Grid_TA_LANGUAGE.PageIndex = e.NewPageIndex;
|
|
|
|
// }
|
|
|
|
|
|
|
|
// protected void Grid1_OnSort(object sender, GridSortEventArgs e)
|
|
|
|
// {
|
|
|
|
|
|
|
|
// _list = SearchData();
|
|
|
|
// var list = Sort<TA_LANGUAGE>(_list.AsQueryable(), Grid_TA_LANGUAGE);
|
|
|
|
// Grid_TA_LANGUAGE.DataSource = list;
|
|
|
|
// Grid_TA_LANGUAGE.RecordCount = list.Count();
|
|
|
|
// Grid_TA_LANGUAGE.DataBind();
|
|
|
|
// }
|
|
|
|
|
|
|
|
// protected void Btn_Add_Click(object sender, EventArgs e)
|
|
|
|
// {
|
|
|
|
|
|
|
|
// TXT_GUID.Text=Guid.NewGuid().ToString("N").ToUpper();
|
|
|
|
// TXT_CH.Text=string.Empty;
|
|
|
|
// TXT_EN.Text=string.Empty;
|
|
|
|
// TXT_RU.Text=string.Empty;
|
|
|
|
// TXT_DE.Text=string.Empty;
|
|
|
|
// TXT_FR.Text=string.Empty;
|
|
|
|
// TXT_AR.Text=string.Empty;
|
|
|
|
// TXT_JP.Text = string.Empty;
|
|
|
|
// CB_IsDeleted.Checked = false;
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// protected void Grid_TA_LANGUAGE_RowSelect(object sender, GridRowSelectEventArgs e)
|
|
|
|
// {
|
|
|
|
// object[] rowDataKeys = Grid_TA_LANGUAGE.DataKeys[e.RowIndex];
|
|
|
|
// TA_LANGUAGE _entity = new TA_LANGUAGE();
|
|
|
|
// _entity.UID = ConvertHelper.To<Int32>(rowDataKeys[0]);
|
|
|
|
// _entity.GUID = rowDataKeys[1] as string;
|
|
|
|
// _entity.CH = rowDataKeys[2] as string;
|
|
|
|
// _entity.EN = rowDataKeys[3] as string;
|
|
|
|
// _entity.RU = rowDataKeys[4] as string;
|
|
|
|
// _entity.DE = rowDataKeys[5] as string;
|
|
|
|
// _entity.FR = rowDataKeys[6] as string;
|
|
|
|
// _entity.EL = rowDataKeys[7] as string;
|
|
|
|
// _entity.AR = rowDataKeys[8] as string;
|
|
|
|
// _entity.JP = rowDataKeys[9] as string;
|
|
|
|
// _entity.IsDeleted = ConvertHelper.To<Boolean>(rowDataKeys[10]);
|
|
|
|
// TXT_GUID.Text = _entity.GUID;
|
|
|
|
// TXT_CH.Text = _entity.CH;
|
|
|
|
// TXT_EN.Text = _entity.EN;
|
|
|
|
// TXT_RU.Text = _entity.RU;
|
|
|
|
// TXT_DE.Text = _entity.DE;
|
|
|
|
// TXT_FR.Text = _entity.FR;
|
|
|
|
// TXT_AR.Text = _entity.AR;
|
|
|
|
// TXT_JP.Text = _entity.JP;
|
|
|
|
// CB_IsDeleted.Checked = _entity.IsDeleted;
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// protected void Btn_Save_Click(object sender, EventArgs e)
|
|
|
|
// {
|
|
|
|
// TA_LANGUAGE _entity = new TA_LANGUAGE();
|
|
|
|
// _entity.GUID = TXT_GUID.Text;
|
|
|
|
// _entity.CH = TXT_CH.Text;
|
|
|
|
// _entity.EN = TXT_EN.Text;
|
|
|
|
// _entity.RU = TXT_RU.Text;
|
|
|
|
// _entity.DE = TXT_DE.Text;
|
|
|
|
// _entity.FR = TXT_FR.Text;
|
|
|
|
// _entity.AR = TXT_AR.Text;
|
|
|
|
// _entity.JP = TXT_JP.Text;
|
|
|
|
// _entity.IsDeleted = CB_IsDeleted.Checked;
|
|
|
|
// var ret=SCP_TA_LANGUAGE_CONTROLLER.Get_TA_LANGUAGE_List(new TA_LANGUAGE { CH = TXT_CH.Text });
|
|
|
|
// if (ret.State == ReturnStatus.Succeed)
|
|
|
|
// {
|
|
|
|
|
|
|
|
// if (ret.Result.Count > 0)
|
|
|
|
// {
|
|
|
|
// Alert.ShowInTop("中文名称重复!");
|
|
|
|
// return;
|
|
|
|
// }
|
|
|
|
// else
|
|
|
|
// {
|
|
|
|
// var ret1 = SCP_TA_LANGUAGE_CONTROLLER.Save_TA_LANGUAGE(new List<TA_LANGUAGE>() { _entity });
|
|
|
|
// if (ret1.State == ReturnStatus.Succeed)
|
|
|
|
// {
|
|
|
|
// var _ret = SCP_TA_LANGUAGE_CONTROLLER.Get_TA_LANGUAGE_List(new TA_LANGUAGE());
|
|
|
|
// if (_ret.State == ReturnStatus.Succeed)
|
|
|
|
// {
|
|
|
|
// _list = _ret.Result;
|
|
|
|
// var list = Sort<TA_LANGUAGE>(_list.AsQueryable(), Grid_TA_LANGUAGE);
|
|
|
|
// Grid_TA_LANGUAGE.DataSource = list;
|
|
|
|
// Grid_TA_LANGUAGE.RecordCount = list.Count();
|
|
|
|
// Grid_TA_LANGUAGE.DataBind();
|
|
|
|
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// protected void Btn_Delete_Click(object sender, EventArgs e)
|
|
|
|
// {
|
|
|
|
// //var ret = SCP_TA_LANGUAGE_CONTROLLER.Del_TA_LANGUAGE(new TA_LANGUAGE { GUID = TXT_GUID.Text });
|
|
|
|
// //if (ret.State == ReturnStatus.Succeed)
|
|
|
|
// //{
|
|
|
|
// // BindData();
|
|
|
|
// //}
|
|
|
|
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// protected void BtnSearch_Click(object sender, EventArgs e)
|
|
|
|
// {
|
|
|
|
// BindData();
|
|
|
|
// }
|
|
|
|
//}
|
|
|
|
} |
|
|
|
} |