本文整理汇总了C#中docsoft.jgrid类的典型用法代码示例。如果您正苦于以下问题:C# jgrid类的具体用法?C# jgrid怎么用?C# jgrid使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
jgrid类属于docsoft命名空间,在下文中一共展示了jgrid类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: Render
protected override void Render(HtmlTextWriter writer)
{
var sb = new StringBuilder();
var cs = this.Page.ClientScript;
#region Tham số
HttpContext c = HttpContext.Current;
var listRow = new List<jgridRow>();
#endregion
switch (subAct)
{
case "get":
#region lấy dữ liệu cho grid
foreach (var item in KhachHangDal.SelectCongNo(false.ToString()))
{
listRow.Add(new jgridRow(item.ID.ToString(), new string[]
{
item.ID.ToString()
,item.Ten
, Lib.TienVietNam(item.CongNo)
}));
}
var gridSpAdm = new jgrid(string.IsNullOrEmpty(jgrpage) ? "1" : jgrpage
, "1"
, "1000"
, listRow);
sb.Append(JavaScriptConvert.SerializeObject(gridSpAdm));
break;
#endregion
case "scpt":
#region Nạp js
sb.AppendFormat(@"{0}"
, cs.GetWebResourceUrl(typeof(Class1), "appStore.commonStore.thuChiMgr.baoCaoCong.JScript1.js"));
//sb.AppendFormat(@"{0}"
// , cs.GetWebResourceUrl(typeof(Class1), "appStore.commonStore.thuChiMgr.baoCaoCong.Publish.js"));
break;
#endregion
default:
#region nạp
var listFn = FunctionDal.SelectByUserAndFNID(Security.Username, fnId);
sb.Append(Lib.GetResource(Assembly.GetExecutingAssembly(), "baoCaoCong.mdl.htm"));
sb.AppendFormat(@"<script>$.getScript('{0}',function(){1});</script>"
, cs.GetWebResourceUrl(typeof(Class1), "appStore.commonStore.thuChiMgr.baoCaoCong.JScript1.js")
, "{baoCaoCongFn.loadgrid();}");
sb.AppendFormat("<script>adm.validFn('{0}');</script>", JavaScriptConvert.SerializeObject(listFn));
break;
#endregion
}
writer.Write(sb.ToString());
base.Render(writer);
}
开发者ID:nhatkycon,项目名称:AoCuoiHongNhung,代码行数:52,代码来源:Class1.cs
示例2: Render
protected override void Render(System.Web.UI.HtmlTextWriter writer)
{
StringBuilder sb = new StringBuilder();
ClientScriptManager cs = this.Page.ClientScript;
string _userName = Request["UserName"];
string _IP = Request["IPTruyCap"];
switch (subAct)
{
case "get":
#region lấy dữ liệu cho grid
if (string.IsNullOrEmpty(jgrsidx)) jgrsidx = "ID";
if (string.IsNullOrEmpty(jgrsord)) jgrsord = "asc";
Pager<Log> PagerGet = LogDal.pagerNormal("", false, "LOG_" + jgrsidx + " " + jgrsord,_userName,Convert.ToInt32(jgRows), null);
List<jgridRow> ListRow = new List<jgridRow>();
foreach (Log log in PagerGet.List)
{
ListRow.Add(new jgridRow(log.ID.ToString(), new string[] { log.ID.ToString(), log.LLOG_ID.ToString(), log.NgayTao.ToString(), log.Username, log.RawUrl, log.RequestIp }));
}
jgrid grid = new jgrid(string.IsNullOrEmpty(jgrpage) ? "1" : jgrpage, PagerGet.TotalPages.ToString(), PagerGet.Total.ToString(), ListRow);
sb.Append(JavaScriptConvert.SerializeObject(grid));
break;
#endregion
case "scpt":
#region Nạp js
sb.AppendFormat(@"{0}"
, cs.GetWebResourceUrl(typeof(Class1), "docsoft.plugin.hethong.quanlyLog.JScript1.js"));
break;
#endregion
default:
#region nạp
FunctionCollection ListFn = FunctionDal.SelectByUserAndFNID(Security.Username, fnId);
sb.Append(@"
<div id=""mdl-head"">
<input type=""text"" _value="""" class=""admtxt UserName""/><button class=""admfilter-btn""></button>
<input type=""text"" class=""admtxt-medium ui-corner-all IPTruyCap"" /><button class=""admSearch-btn""></button>
</div>
<table id=""quanlylogmdl-List"" class=""mdl-list""></table>
<div id=""quanlylogmdl-Pager""></div>");
sb.AppendFormat(@"<script>$.getScript('{0}',function(){1});</script>"
, cs.GetWebResourceUrl(typeof(Class1), "docsoft.plugin.hethong.quanlyLog.JScript1.js")
, "{quanlylog.loadgrid();}");
sb.AppendFormat("<script>adm.validFn('{0}');</script>", JavaScriptConvert.SerializeObject(ListFn));
break;
#endregion
}
writer.Write(sb.ToString());
base.Render(writer);
}
开发者ID:nhatkycon,项目名称:AoCuoiHongNhung,代码行数:51,代码来源:Class1.cs
示例3: Render
protected override void Render(HtmlTextWriter writer)
{
StringBuilder sb = new StringBuilder();
ClientScriptManager cs = this.Page.ClientScript;
#region Tham số
string _ID = Request["ID"];
string _q = Request["q"];
string _dm = Request["dm"];
string _active = Request["active"];
string _publish = Request["publish"];
string _Lang = Request["Lang"];
string _dmkv = Request["dmkv"];
string _LangBased = Request["LangBased"];
string _LangBased_ID = Request["LangBased_ID"];
string _ckbMua = Request["ckbMua"];
string _Anh = Request["Anh"];
string _Ten = Request["Ten"];
string _MoTa = Request["MoTa"];
string _NoiDung = Request["NoiDung"];
string _NgayHetHan = Request["NgayHetHan"];
string _XuatXu = Request["XuatXu"];
string _Active = Request["Active"];
string _Publish = Request["Publish"];
string _Hot = Request["Hot"];
string _Hot1 = Request["Hot1"];
string _Hot2 = Request["Hot2"];
string _Hot3 = Request["Hot3"];
string _Hot4 = Request["Hot4"];
string _muaban = Request["muaban"];
string _trangthai = Request["trangthai"];
GiaoThuong Item;
List<GiaoThuong> List = new List<GiaoThuong>();
List<jgridRow> ListRow = new List<jgridRow>();
#endregion
switch (subAct)
{
case "ListDanhMucID":
#region load hỗ trợ đăng ký dịch vụ
if (!string.IsNullOrEmpty(_ID)) {
sb.Append(JavaScriptConvert.SerializeObject(DanhMucDal.SelectListDanhMucID(_ID)));
}
break;
#endregion
case "getByLangBasedId":
#region lấy dữ liệu ngôn ngữ phụ
List<GiaoThuong> listpg = GiaoThuongDal.SelectgetByLangBasedId(Convert.ToInt32(_LangBased_ID));
List<jgridRow> ListRowgetByLangBasedId = new List<jgridRow>();
foreach (GiaoThuong item in listpg)
{
ListRowgetByLangBasedId.Add(new jgridRow(item.ID.ToString(), new string[]{
item.ID.ToString()
,item.LangBased.ToString()
,item.Lang
,string.Format(@"<img src=""../up/i/{0}"" />",Lib.imgSize(item.Anh,"50x50"))
,item.Ten
,item.NoiDung
,item._DM_Ten
,item.XuatXu
,item.NgayTao.ToString("dd/MM/yyyy")
,item.NguoiTao
,item.Publish.ToString()
,item.Active.ToString()
}));
}
jgrid gridlang = new jgrid(string.IsNullOrEmpty(jgrpage) ? "1" : jgrpage, "1", listpg.Count.ToString(), ListRowgetByLangBasedId);
sb.Append(JavaScriptConvert.SerializeObject(gridlang));
break;
#endregion
case "get":
#region lấy dữ liệu cho grid
Pager<GiaoThuong> PagerGet = GiaoThuongDal.pagerNormal("", false, jgrsidx + " " + jgrsord, _q, _dm,Security.Username, "False", _publish, _Lang, Convert.ToInt32(jgRows), _dmkv, _muaban, "");
foreach (GiaoThuong item in PagerGet.List)
{
ListRow.Add(new jgridRow(item.ID.ToString(), new string[]{
item.ID.ToString()
,item.LangBased.ToString()
,item.Lang
,string.Format(@"<img src=""../up/i/{0}"" />",Lib.imgSize(item.Anh,"50x50"))
,item.Ten
,item.NoiDung
,item._DM_Ten
,item.XuatXu
,item.NgayTao.ToString("dd/MM/yyyy")
,item.NguoiTao
,item.Publish.ToString()
,item.Active.ToString()
}));
}
jgrid grid = new jgrid(string.IsNullOrEmpty(jgrpage) ? "1" : jgrpage
, List.Count.ToString()
, List.Count.ToString()
, ListRow);
sb.Append(JavaScriptConvert.SerializeObject(grid));
break;
#endregion
case "del":
#region xóa
//.........这里部分代码省略.........
开发者ID:nhatkycon,项目名称:spav4,代码行数:101,代码来源:Class1.cs
示例4: Render
protected override void Render(HtmlTextWriter writer)
{
StringBuilder sb = new StringBuilder();
ClientScriptManager cs = this.Page.ClientScript;
#region Tham số
string _ID = Request["ID"];
string _B_ID = Request["B_ID"];
string _DM_ID = Request["DM_ID"];
string _RssUrl = Request["RssUrl"];
Channel ItemSave;
#endregion
switch (subAct)
{
case "get":
#region lấy dữ liệu cho grid
List<jgridRow> ListRow = new List<jgridRow>();
ChannelCollection List = ChannelDal.SelectByDmIdByBid(_DM_ID, _B_ID);
foreach (Channel dm in List)
{
ListRow.Add(new jgridRow(dm.ID.ToString(), new string[] {
string.Format("{0}",dm.ID)
, dm.B_Ten
, dm.DM_Ten
, dm.RssUrl
}));
}
jgrid grid = new jgrid(string.IsNullOrEmpty(jgrpage) ? "1" : jgrpage, List.Count.ToString(), List.Count.ToString(), ListRow);
sb.Append(JavaScriptConvert.SerializeObject(grid));
break;
#endregion
case "del":
#region xóa
if (!string.IsNullOrEmpty(_ID))
{
ChannelDal.DeleteById(Convert.ToInt32(_ID));
}
break;
#endregion
case "edit":
#region chỉnh sửa
if (!string.IsNullOrEmpty(_ID))
{
sb.Append("(" + JavaScriptConvert.SerializeObject(ChannelDal.SelectById(Convert.ToInt32(_ID))) + ")");
}
break;
#endregion
case "save":
#region lưu
if (!string.IsNullOrEmpty(_ID))
{
ItemSave = ChannelDal.SelectById(Convert.ToInt32(_ID));
}
else
{
ItemSave = new Channel();
}
if (!string.IsNullOrEmpty(_B_ID))
{
ItemSave.B_ID = Convert.ToInt32(_B_ID);
}
if (!string.IsNullOrEmpty(_DM_ID))
{
ItemSave.DM_ID = Convert.ToInt32(_DM_ID);
}
ItemSave.RssUrl = _RssUrl;
if (!string.IsNullOrEmpty(_ID))
{
ItemSave = ChannelDal.Update(ItemSave);
}
else
{
ItemSave = ChannelDal.Insert(ItemSave);
}
sb.Append("1");
break;
#endregion
case "getautoComplete":
#region Lấy danh sách danh mục
sb.Append(JavaScriptConvert.SerializeObject(docbao.entitites.DanhMucDal.SelectAll()));
break;
#endregion
case "getautoCompletePid":
#region Lấy danh sách danh mục
sb.Append(JavaScriptConvert.SerializeObject(docbao.entitites.DanhMucDal.SelectPid()));
break;
#endregion
case "scpt":
#region Nạp js
sb.AppendFormat(@"{0}"
, cs.GetWebResourceUrl(typeof(Class1), "plugin.rss.kenhRss.JScript1.js"));
break;
#endregion
default:
#region nạp
FunctionCollection ListFn = FunctionDal.SelectByUserAndFNID(Security.Username, fnId);
sb.Append(@"<div class=""mdl-head"">
<span class=""mdl-head-searchPnl ui-state-default ui-corner-all"">
<a href=""javascript:;"" class=""mdl-head-clearSearch""></a>
<input type=""text"" class=""mdl-head-txt mdl-head-search mdl-head-search-kenhRssMdl"" />
//.........这里部分代码省略.........
开发者ID:nhatkycon,项目名称:Autodaily2013,代码行数:101,代码来源:kenhRss.cs
示例5: Render
protected override void Render(HtmlTextWriter writer)
{
var sb = new StringBuilder();
var cs = this.Page.ClientScript;
#region Tham số
var ID = Request["ID"];
var DM_ID = Request["DM_ID"];
var DM_Ten = Request["DM_Ten"];
var DV_ID = Request["DV_ID"];
var DV_Ten = Request["DV_Ten"];
var SoLuong = Request["SoLuong"];
var ThuTu = Request["ThuTu"];
var MoTa = Request["MoTa"];
string q = Request["q"];
#endregion
switch (subAct)
{
case "getSub":
#region lấy dữ liệu cho grid
if (string.IsNullOrEmpty(jgrsidx)) jgrsidx = "ID";
if (string.IsNullOrEmpty(jgrsord)) jgrsord = "asc";
var listSub = TinhTrangDichVuDal.SelectDmId(DM_ID);
var listRowSub = listSub.Select(item => new jgridRow(item.ID.ToString(), new string[]
{
item.ID.ToString(),
item.ThuTu.ToString(),
item.DV_Ten,
item.SoLuong.ToString()
})).ToList();
var gridSub = new jgrid(string.IsNullOrEmpty(jgrpage) ? "1" : jgrpage, "0", "0", listRowSub);
sb.Append(JavaScriptConvert.SerializeObject(gridSub));
break;
#endregion
case "saveSub":
#region lưu
var itemSub = new TinhTrangDichVu();
if (!string.IsNullOrEmpty(ID))
{
itemSub = TinhTrangDichVuDal.SelectById(new Guid(ID));
}
else
{
itemSub.ID = Guid.NewGuid();
}
if (!string.IsNullOrEmpty(DM_ID))
{
itemSub.DM_ID = new Guid(DM_ID);
}
if (!string.IsNullOrEmpty(DV_ID))
{
itemSub.DV_ID = new Guid(DV_ID);
}
itemSub.SoLuong = Convert.ToInt32(SoLuong);
itemSub.NgayCapNhat = DateTime.Now;
itemSub.NguoiCapNhat = Security.Username;
itemSub.ThuTu = Convert.ToInt32(ThuTu);
if (!string.IsNullOrEmpty(ID))
{
itemSub = TinhTrangDichVuDal.Update(itemSub);
}
else
{
itemSub.NgayTao = DateTime.Now;
itemSub.NguoiTao = Security.Username;
itemSub = TinhTrangDichVuDal.Insert(itemSub);
}
sb.Append("1");
break;
#endregion
case "editSub":
#region chỉnh sửa
if (!string.IsNullOrEmpty(ID))
{
sb.AppendFormat("({0})", JavaScriptConvert.SerializeObject(TinhTrangDichVuDal.SelectById(new Guid(ID))));
}
break;
#endregion
case "delSub":
#region xóa
if (!string.IsNullOrEmpty(ID))
{
TinhTrangDichVuDal.DeleteById(new Guid(ID));
}
break;
#endregion
case "getByDmId":
#region lấy dữ liệu cho grid
sb.Append(JavaScriptConvert.SerializeObject(TinhTrangDichVuDal.SelectDmId(DM_ID)));
break;
#endregion
case "scpt":
#region Nạp js
sb.AppendFormat(@"{0}"
, cs.GetWebResourceUrl(typeof(Class1), "appStore.pmSpa.tinhTrangDichVuMgr.JScript1.js"));
break;
#endregion
default:
//.........这里部分代码省略.........
开发者ID:nhatkycon,项目名称:Autodaily2013,代码行数:101,代码来源:Class1.cs
示例6: Render
protected override void Render(HtmlTextWriter writer)
{
var sb = new StringBuilder();
var cs = this.Page.ClientScript;
#region Tham số
HttpContext c = HttpContext.Current;
var TuNgay = c.Request["TuNgay"];
var DenNgay = c.Request["DenNgay"];
var dNow = DateTime.Now;
var dauThang = new DateTime(dNow.Year, 1, 1).ToString("yyyy-MM-dd");
var cuoiThang = new DateTime(dNow.Year, dNow.Month, 1).AddMonths(1).AddDays(-1).ToString("yyyy-MM-dd");
TuNgay = string.IsNullOrEmpty(TuNgay) ? dauThang : Convert.ToDateTime(TuNgay, new CultureInfo("vi-Vn")).ToString("yyyy-MM-dd");
DenNgay = string.IsNullOrEmpty(DenNgay) ? cuoiThang : Convert.ToDateTime(DenNgay, new CultureInfo("vi-Vn")).ToString("yyyy-MM-dd");
var _q = c.Request["q"];
List<jgridRow> ListRow = new List<jgridRow>();
var danhMucKyHieuChi = DanhMucDal.SelectByMa("TC-CHI");
var danhMucKyHieuThu = DanhMucDal.SelectByMa("TC-THU");
#endregion
switch (subAct)
{
case "get":
#region lấy dữ liệu cho grid
var pagerGet = ThuChiReportDal.SelectTuNgayDenNgay(TuNgay, DenNgay);
var prefixMaChi = danhMucKyHieuChi.KyHieu;
var prefixMaThu = danhMucKyHieuThu.KyHieu;
foreach (var item in pagerGet)
{
ListRow.Add(new jgridRow(item.ma.ToString(), new string[]
{
item.ma.ToString()
,
item.sophieu == "0" ? "" : string.Format("{0}{1}",
(item.isthu
? prefixMaThu
: prefixMaChi),
item.sophieu)
, item.diengiai
, Lib.TienVietNam(item.thu_tk)
, Lib.TienVietNam(item.thu_tm)
, Lib.TienVietNam(item.thu_t)
, Lib.TienVietNam(item.chi_tk)
, Lib.TienVietNam(item.chi_tm)
, Lib.TienVietNam(item.chi_t)
, Lib.TienVietNam(item.tt_tk)
, Lib.TienVietNam(item.tt_tm)
, Lib.TienVietNam(item.tt_t)
, Lib.TienVietNam(item.sodu_tk)
, Lib.TienVietNam(item.sodu_tm)
, Lib.TienVietNam(item.sodu_t)
, item.loaiquy.ToString()
, item.isthu.ToString()
, item.isCandoi.ToString()
, item.ngay
, item.NguoiTao
}));
}
jgrid gridSPAdm = new jgrid(string.IsNullOrEmpty(jgrpage) ? "1" : jgrpage
, "1"
, pagerGet.Count.ToString()
, ListRow);
sb.Append(JavaScriptConvert.SerializeObject(gridSPAdm));
break;
#endregion
case "scpt":
#region Nạp js
sb.AppendFormat(@"{0}"
, cs.GetWebResourceUrl(typeof(Class1), "appStore.commonStore.thuChiMgr.baoCaoThuChi.JScript1.js"));
//sb.AppendFormat(@"{0}"
// , cs.GetWebResourceUrl(typeof(Class1), "appStore.commonStore.thuChiMgr.baoCaoThuChi.Publish.js"));
break;
#endregion
default:
#region nạp
var listFn = FunctionDal.SelectByUserAndFNID(Security.Username, fnId);
sb.Append(Lib.GetResource(Assembly.GetExecutingAssembly(), "baoCaoThuChi.mdl.htm"));
sb.AppendFormat(@"<script>$.getScript('{0}',function(){1});</script>"
, cs.GetWebResourceUrl(typeof(Class1), "appStore.commonStore.thuChiMgr.baoCaoThuChi.JScript1.js")
, "{baoCaoThuChiFn.loadgrid();}");
sb.AppendFormat("<script>adm.validFn('{0}');</script>", JavaScriptConvert.SerializeObject(listFn));
break;
#endregion
}
writer.Write(sb.ToString());
base.Render(writer);
}
开发者ID:nhatkycon,项目名称:Bally-v2,代码行数:89,代码来源:Class1.cs
示例7: Render
protected override void Render(System.Web.UI.HtmlTextWriter writer)
{
StringBuilder sb = new StringBuilder();
ClientScriptManager cs = this.Page.ClientScript;
#region Tham số
string _id = Request["ID"];
string _gh_id = Request["GH_ID"];
string _chude_id = Request["ChuDe_ID"];
string _chude_ten = Request["TenChuDe"];
string _ten = Request["Ten"];
string _thutu = Request["Thutu"];
string _mota = Request["Mota"];
string _anh = Request["UrlImage"];
string _duyet = Request["Duyet"];
string _clip = Request["Url"];
string _cq_id = Request["CQ_ID"];
string _active = Request["Active"];
string _q = Request["q"];
#endregion
switch (subAct)
{
case "getVideo":
#region lấy danh sách
string _NguoiTao = Security.Username;
if (string.IsNullOrEmpty(jgRows)) jgRows = "5";
if (string.IsNullOrEmpty(jgrsidx)) jgrsidx = "Thutu";
if (string.IsNullOrEmpty(jgrsord)) jgrsord = "asc";
Pager<VideoClip> PagerGet = VideoClipDal.pagerNormal("", false, jgrsidx + " " + jgrsord, _q, Request["rows"], _gh_id, _chude_id, _active);
List<jgridRow> ListRow = new List<jgridRow>();
foreach (VideoClip item in PagerGet.List)
{
ListRow.Add(new jgridRow(item.ID.ToString(), new string[]{
item.ID.ToString()
,string.Format(item.Thutu.ToString()==null?"":item.Thutu.ToString())
,string.Format("<img class=\"adm-pro-icon\" src=\"../up/v/{0}\" />", string.IsNullOrEmpty(item.UrlImage) ? "no-image.png" :item.UrlImage)
,string.Format(item.Ten.ToString()==null?"":item.Ten.ToString())
,string.Format(item.Mota.ToString()==null?"":item.Mota.ToString())
,string.Format(item.SoLuotXem.ToString()==null?"":item.SoLuotXem.ToString())
,DanhMucDal.SelectById(item.ChuDe_ID).Ten.ToString()
,item.Ngaytao.ToString("dd/MM/yy")
,item.NguoiTao
,item.Active.ToString()
}));
}
jgrid grid = new jgrid(string.IsNullOrEmpty(jgrpage) ? "1" : jgrpage, PagerGet.TotalPages.ToString(), PagerGet.Total.ToString(), ListRow);
sb.Append(JavaScriptConvert.SerializeObject(grid));
break;
#endregion
case "saveVideo":
#region lưu dữ liệu
VideoClip ItemSave = new VideoClip();
if (!string.IsNullOrEmpty(_id))
{
ItemSave = VideoClipDal.SelectById(Convert.ToInt32(_id));
}
ItemSave.Ten = _ten;
ItemSave.ChuDe_ID = int.Parse(_chude_id);
ItemSave.Mota = string.IsNullOrEmpty(_mota) ? "" : _mota;
ItemSave.Active = Convert.ToBoolean(_duyet);
ItemSave.UrlImage = _anh;
ItemSave.Url = _clip;
ItemSave.Thutu = Convert.ToInt16(_thutu);
ItemSave.Loai = 1;
ItemSave.Keyword = "";
ItemSave.CateID = 0;
// ItemSave.PID = Convert.ToInt32(_PID);
if (!string.IsNullOrEmpty(_id))
{
ItemSave.NguoiTao = Security.Username;
ItemSave.Ngaytao = DateTime.Now;
ItemSave = VideoClipDal.Update(ItemSave);
}
else
{
ItemSave.SoLuotXem = 0;
ItemSave.NguoiTao = Security.Username;
ItemSave.Ngaytao = DateTime.Now;
ItemSave.RowId = Guid.NewGuid();
ItemSave = VideoClipDal.Insert(ItemSave);
}
sb.Append("1");
break;
#endregion
case "delVideo":
#region xóa
if (!string.IsNullOrEmpty(_id))
{
char[] step = { ',' };
string[] arrID = _id.Split(step);
for (int i = 0; i < arrID.Length; i++)
{
VideoClip o = new VideoClip();
o = VideoClipDal.SelectById(Convert.ToInt32(arrID[i]));
try
//.........这里部分代码省略.........
开发者ID:nhatkycon,项目名称:spav4,代码行数:101,代码来源:Class1.cs
示例8: Render
protected override void Render(HtmlTextWriter writer)
{
var sb = new StringBuilder();
var cs = this.Page.ClientScript;
#region Variables
var ID = Request["ID"];
var Ma = Request["Ma"];
var Ten = Request["Ten"];
var Ho = Request["Ho"];
var XungHo = Request["XungHo"];
var NgaySinh = Request["NgaySinh"];
var GioiTinh = Request["GioiTinh"];
var Email = Request["Email"];
var Mobile = Request["Mobile"];
var Phone = Request["Phone"];
var CMND = Request["CMND"];
var Ym = Request["Ym"];
var FacebookUid = Request["FacebookUid"];
var LinhVuc_ID = Request["LinhVuc_ID"];
var NguonGoc_ID = Request["NguonGoc_ID"];
var NguonGoc_ChiTiet_ID = Request["NguonGoc_ChiTiet_ID"];
var DiaChi = Request["DiaChi"];
var KhuVuc_ID = Request["KhuVuc_ID"];
var NgayTao = Request["NgayTao"];
var NguoiTao = Request["NguoiTao"];
var NgayCapNhat = Request["NgayCapNhat"];
var NguoiCapNhat = Request["NguoiCapNhat"];
var NgungTheoDoi = Request["NgungTheoDoi"];
var NoiBat = Request["NoiBat"];
var ChiaSe = Request["ChiaSe"];
var DanhGia = Request["DanhGia"];
var KhongNhanEmail = Request["KhongNhanEmail"];
var KhongDuocGoiDien = Request["KhongDuocGoiDien"];
var ThoiGianGoiDien = Request["ThoiGianGoiDien"];
var NguoiGioiThieu = Request["NguoiGioiThieu"];
var TuVanVien = Request["TuVanVien"];
var EmailTitle = Request["EmailTitle"];
var EmailBody = Request["EmailBody"];
var _q = Request["q"];
#endregion
var ListRow = new List<jgridRow>();
switch (subAct)
{
case "get":
#region get
var pagerGet = KhachHangDal.pagerNormal("", false, "a.KH_" + jgrsidx + " " + jgrsord, _q, Convert.ToInt32(jgRows), KhuVuc_ID,NguonGoc_ID);
foreach (var item in pagerGet.List)
{
ListRow.Add(new jgridRow(item.ID.ToString(), new string[] {
item.ID.ToString()
, item.Ma
, item.Ten
, item.Mobile
, item.Email
, item.GioiTinh ? "Nam" : "Nữ"
, item.Ym
, item.NgaySinh.ToString("dd/MM/yy")
, item.KhuVuc_Ten
, item.NguonGoc_Ten
, string.Format("{0:dd/MM/yy}",item.NgayCapNhat
)
}));
}
jgrid gridSPAdm = new jgrid(string.IsNullOrEmpty(jgrpage) ? "1" : jgrpage
, pagerGet.TotalPages.ToString()
, pagerGet.Total.ToString()
, ListRow);
sb.Append(JavaScriptConvert.SerializeObject(gridSPAdm));
break;
#endregion
case "save":
#region chỉnh sửa
if (Security.IsAuthenticated())
{
var item = new KhachHang();
if (!string.IsNullOrEmpty(ID))
{
item = KhachHangDal.SelectById(new Guid(ID));
}
else
{
if(string.IsNullOrEmpty(Ma))
{
Ma = CaptchaImage.GenerateRandomCode(CaptchaType.Numeric, 10);
}
}
item.CMND = CMND;
item.DiaChi = DiaChi;
item.Email = Email;
item.GioiTinh = Convert.ToBoolean(GioiTinh);
if (!string.IsNullOrEmpty(KhuVuc_ID))
{
item.KhuVuc_ID = new Guid(KhuVuc_ID);
}
item.Ma = Ma;
item.Mobile = Mobile;
//.........这里部分代码省略.........
开发者ID:nhatkycon,项目名称:ThaoLyShop,代码行数:101,代码来源:Class1.cs
示例9: Render
protected override void Render(HtmlTextWriter writer)
{
StringBuilder sb = new StringBuilder();
ClientScriptManager cs = this.Page.ClientScript;
#region tham so
string _ID = Request["ID"];
string _PRowId = Request["PRowId"];
string _PID = Request["PID"];
string _Ten = Request["Ten"];
string _DiaChi = Request["DiaChi"];
string _CongTy = Request["CongTy"];
string _Email = Request["Email"];
string _DienThoai = Request["DienThoai"];
//string _Phone = Request["Phone"];
string _Skype = Request["Skype"];
string _Ym = Request["Ym"];
string _Website = Request["Website"];
string _Active = Request["Active"];
string _RowId = Request["RowId"];
string _q = Request["q"];
#endregion
switch (subAct)
{
case "get":
#region Get du lieu cho Grid
if (string.IsNullOrEmpty(jgrsidx)) jgrsidx = "ID";
if (string.IsNullOrEmpty(jgrsord)) jgrsord = "desc";
Pager<LienHe> PagerGet = LienHeDal.pagerNormal("", false, "LH_" + jgrsidx + " " + jgrsord, _q, Request["rows"]);
List<jgridRow> ListRow = new List<jgridRow>();
foreach (LienHe lh in PagerGet.List)
{
ListRow.Add(new jgridRow(lh.ID.ToString(),
new string[] {
lh.ID.ToString()
,lh.Ten
,lh.DiaChi
,lh.CongTy
,lh.Email
,lh.Mobile
,lh.Skype
,lh.Ym
,lh.Website
,lh.Active.ToString()
}));
}
jgrid grid = new jgrid(string.IsNullOrEmpty(jgrpage) ? "1" : jgrpage, PagerGet.TotalPages.ToString(), PagerGet.Total.ToString(), ListRow);
sb.Append(JavaScriptConvert.SerializeObject(grid));
break;
#endregion
case "edit":
#region Sua mau tin
if (!string.IsNullOrEmpty(_ID))
{
sb.Append("(" + JavaScriptConvert.SerializeObject(LienHeDal.SelectById(Convert.ToInt32(_ID))) + ")");
}
break;
#endregion
case "del":
#region xóa
if (!string.IsNullOrEmpty(_ID))
{
//LienHeDal.DeleteByIdList(_ID);
LienHeDal.DeleteById(Convert.ToInt32(_ID));
}
break;
#endregion
case "save":
#region luu thong tin
LienHe ItemSave = new LienHe();
if (string.IsNullOrEmpty(_Ten))
{
sb.Append("0");
break;
}
if (!string.IsNullOrEmpty(_ID))
{
ItemSave = LienHeDal.SelectById(Convert.ToInt32(_ID));
}
ItemSave.Ten = _Ten;
ItemSave.DiaChi = _DiaChi;
ItemSave.CongTy = _CongTy;
ItemSave.Email = _Email;
ItemSave.Mobile = _DienThoai;
ItemSave.Skype = _Skype;
ItemSave.Ym = _Ym;
ItemSave.Website = _Website;
ItemSave.Active =Convert.ToBoolean(_Active);
ItemSave.PRowId = Guid.NewGuid();
if (!string.IsNullOrEmpty(_ID))
{
ItemSave.NguoiCapNhat = Security.Username;
ItemSave.NgayCapNhat = DateTime.Now;
//ItemSave.NgayTao =ItemSave.NgayTao;
ItemSave = LienHeDal.Update(ItemSave);
//.........这里部分代码省略.........
开发者ID:nhatkycon,项目名称:nkc-v3,代码行数:101,代码来源:Class1.cs
示例10: Render
protected override void Render(HtmlTextWriter writer)
{
StringBuilder sb = new StringBuilder();
ClientScriptManager cs = this.Page.ClientScript;
#region Tham số
string _ID = Request["ID"];
string _Duyet = Request["Duyet"];
string _Khoa = Request["Khoa"];
string _q = Request["q"];
List<jgridRow> ListRow = new List<jgridRow>();
ThanhToan Item;
string Username = Security.Username;
bool logged = Security.IsAuthenticated();
#endregion
switch (subAct)
{
case "get":
#region lấy dữ liệu cho grid
if (string.IsNullOrEmpty(jgrsidx)) jgrsidx = "ID";
if (string.IsNullOrEmpty(jgrsord)) jgrsord = "asc";
Pager<ThanhToan> PagerGet = ThanhToanDal.pagerYeuCau("T_" + jgrsidx + " " + jgrsord, Convert.ToInt32(jgRows));
foreach (ThanhToan item in PagerGet.List)
{
ListRow.Add(new jgridRow(item.ID.ToString(),
new string[] {
item.ID.ToString(),
item.NguoiYeuCau,
item.SoDu.ToString("C",new CultureInfo("vi-Vn")),
item.NgayTao.ToString("hh:mm dd/MM/yy")
}));
}
jgrid grid = new jgrid(string.IsNullOrEmpty(jgrpage) ? "1" : jgrpage, PagerGet.TotalPages.ToString(), PagerGet.Total.ToString(), ListRow);
sb.Append(JavaScriptConvert.SerializeObject(grid));
break;
#endregion
case "duyet":
#region duyet
if (!string.IsNullOrEmpty(_ID))
{
using (SqlConnection con = DAL.con())
{
con.Open();
SqlTransaction tran = con.BeginTransaction();
try
{
bool Khoa = Convert.ToBoolean(_Khoa);
double total;
TaiKhoan tkItem;
foreach (string item in _ID.Split(new char[] { ',' }))
{
if (item.Length > 0)
{
total = 0;
Item = ThanhToanDal.SelectById(Convert.ToInt32(item), tran);
tkItem = TaiKhoanDal.SelectByUsername(Item.NguoiYeuCau, tran);
if (!string.IsNullOrEmpty(tkItem.Tk))
{
total = Convert.ToDouble(maHoa.DecryptString(tkItem.Tk, tkItem.Username));
}
if (Khoa)
{
if (!Item.Duyet)
{
total = total - Convert.ToDouble(Item.SoDu);
}
}
ThanhToanDal.Duyet(item, _Khoa, tran);
TaiKhoanDal.UpdateTk(tkItem.ID, maHoa.EncryptString(total.ToString(), Item.NguoiYeuCau), tran);
}
}
tran.Commit();
}
catch (Exception ex)
{
tran.Rollback();
sb.Append(ex.ToString());
}
finally
{
con.Close();
}
}
}
break;
#endregion
case "scpt":
#region Nạp js
sb.AppendFormat(@"{0}"
, cs.GetWebResourceUrl(typeof(Class1), "seo.plugin.thanhToanMgr.yeuCau.JScript1.js"));
break;
#endregion
default:
#region nạp
FunctionCollection ListFn = FunctionDal.SelectByUserAndFNID(Security.Username, fnId);
if (!logged)
{
renderText("un-authorized", "text/plain");
}
//.........这里部分代码省略.........
开发者ID:nhatkycon,项目名称:nkc-v3,代码行数:101,代码来源:Class1.cs
示例11: Render
protected override void Render(HtmlTextWriter writer)
{
#region biến
StringBuilder sb = new StringBuilder();
ClientScriptManager cs = this.Page.ClientScript;
string _ID = Request["ID"];
string _F_ID = Request["F_ID"];
string _Lang = Request["Lang"];
string _Alias = Request["Alias"];
string _LangBased_ID = Request["LangBased_ID"];
string _LangBased = Request["LangBased"];
string _KeyWords = Request["KeyWords"];
string _Description = Request["Description"];
string _PID = Request["DMID"];
string _PTen = Request["DMTen"];
string _Ten = Request["Ten"];
string _Mota = Request["Mota"];
string _NoiDung_tt = Re
|
请发表评论