ZhiYeJianKang_PeiXun/Song.Site/Json/Employee.aspx.cs
2025-02-20 15:41:53 +08:00

45 lines
1.3 KiB
C#

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using WeiSha.Common;
using Song.ServiceInterfaces;
using Song.Entities;
using System.Text;
using System.Reflection;
namespace Song.Site.Json
{
public partial class Employee : System.Web.UI.Page
{
//Ô±¹¤id
private int id = WeiSha.Common.Request.QueryString["id"].Int32 ?? 0;
protected void Page_Load(object sender, EventArgs e)
{
Song.Entities.EmpAccount emp = null;
if (id < 1)
emp = Extend.LoginState.Admin.CurrentUser;
else
emp = Business.Do<IEmployee>().GetSingle(id);
string str = "";
if (emp != null)
{
//×ÊÔ´µÄ·¾¶
string resPath = Upload.Get["Employee"].Virtual;
emp.Acc_Photo = resPath + emp.Acc_Photo;
emp.Acc_Pw = "";
str = emp.ToJson(null, "Acc_Pw,Acc_Qus,Acc_Ans,Dep_CnName,Acc_IDCardNumber");
}
Response.Write(str);
Response.End();
}
}
}