123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- using System;
- using System.Collections.Generic;
- using System.Data.SqlClient;
- using System.Diagnostics;
- using System.Linq;
- using System.Text;
- using JLHHJSvr.BLL;
- using JLHHJSvr.Com;
- using JLHHJSvr.Com.Model;
- using LJLib.DAL.SQL;
- using LJLib.Net.SPI.Server;
- namespace JLHHJSvr.Excutor
- {
- internal sealed class GetDwLayoutExcutor : ExcutorBase<GetDwLayoutRequest, GetDwLayoutResponse>
- {
- protected override void ExcuteInternal(GetDwLayoutRequest request, object state, GetDwLayoutResponse rslt)
- {
- var tokendata = BllHelper.GetToken(request.token);
- if (tokendata == null)
- {
- rslt.ErrMsg = "会话已中断";
- return;
- }
- rslt.layout = new FxUserDwlayout();
- using (var con = new SqlConnection(GlobalVar.ConnectionString))
- using (var cmd = con.CreateCommand())
- {
- con.Open();
- var whereStr = "userid = @userid and dwname = @dwname";
- var parms = new Dictionary<string, object>()
- {
- {"@userid", tokendata.userid},
- {"@dwname", request.dwname}
- };
- var layout = new FxUserDwlayout();
- try
- {
- if (DbSqlHelper.SelectOne(cmd, "fx_user_dwlayout", whereStr, parms, layout, "column_visible,column_width,column_x,column_autosize,column_detail_height") == 1)
- {
- rslt.layout = layout;
- }
- }
- catch (Exception ex)
- {
- Trace.Write(ex.ToString());
- }
- }
- }
- }
- }
|