protected void Page_Load(object sender, EventArgs e) { //獲取GET參數 dotype = Request.Params["dotype"].ToString(); string AutoId = Request.Params["id"].ToString(); //獲取登錄者的真實姓名 uname = Com.Session.uname; #region 查詢當前AutoId的數據記錄 SchSystem.BLL.ServUserFor sufBll = new SchSystem.BLL.ServUserFor(); SchSystem.Model.ServUserForV sufvModel = new SchSystem.Model.ServUserForV(); string ServiceId = ""; if (!string.IsNullOrEmpty(AutoId) && !string.IsNullOrEmpty(dotype)) { sufvModel = sufBll.GetModelV("AutoId,UserName,UTname,CnName,FromType,RecUser,ServiceId,ServStat,ServMonth,FeeM,RecTime,EndTime,EditTime,DoNote,Uareano,BusMonth,FeeCode", int.Parse(AutoId)); ServiceId = sufvModel.ServiceId; servUserForModel = Newtonsoft.Json.JsonConvert.SerializeObject(sufvModel); } #endregion #region 獲取資費套餐下拉列表 SchSystem.BLL.ServBus sbBll = new SchSystem.BLL.ServBus(); DataTable servbusdt = sbBll.GetList("'0' pId,ServiceId id,FeeCode,CnName name,'false' checked,BusMonth,'true' chkDisabled", "").Tables[0]; if (servbusdt.Rows.Count > 0) { for (int i = 0; i < servbusdt.Rows.Count; i++) { if (servbusdt.Rows[i]["id"].ToString() == ServiceId) { servbusdt.Rows[i]["checked"] = true; } } } servbustree = Newtonsoft.Json.JsonConvert.SerializeObject(servbusdt); #endregion #region 獲取省市區 //获取省份 StringBuilder areaProvince = new StringBuilder(); string sareacode = ""; areaProvince.Append(Com.Public.GetDrpArea("0", "", ref sareacode, false, "0")); province = areaProvince.ToString(); //获取城市 StringBuilder areaCity = new StringBuilder(); string sareacitycode = ""; areaCity.Append(Com.Public.GetDrpArea("1", sareacode, ref sareacitycode, false, "0")); city = areaCity.ToString(); #endregion }
protected void Page_Load(object sender, EventArgs e) { //獲取GET參數 dotype = Request.Params["dotype"].ToString(); string AutoId = Request.Params["id"].ToString(); //獲取登錄者的真實姓名 uname = Com.Session.uname; #region 查詢當前AutoId的數據記錄 SchSystem.BLL.ServUserFor sufBll = new SchSystem.BLL.ServUserFor(); SchSystem.Model.ServUserForV sufvModel = new SchSystem.Model.ServUserForV(); string ServiceId = ""; if (!string.IsNullOrEmpty(AutoId) && !string.IsNullOrEmpty(dotype)) { sufvModel = sufBll.GetModelV("AutoId,UserName,UTname,FromType,CnName,RecUser,ServiceId,ServStat,ServMonth,FeeM,RecTime,EndTime,EditTime,DoNote,Uareano,BusMonth,FeeCode", int.Parse(AutoId)); ServiceId = sufvModel.ServiceId; servUserForModel = Newtonsoft.Json.JsonConvert.SerializeObject(sufvModel); } #endregion }
public SchSystem.Model.ServUserForV DataRowToModelV(DataRow row) { SchSystem.Model.ServUserForV model = new SchSystem.Model.ServUserForV(); if (row != null) { if (row["AutoId"] != null && row["AutoId"].ToString() != "") { model.AutoId = int.Parse(row["AutoId"].ToString()); } if (row["UserName"] != null) { model.UserName = row["UserName"].ToString(); } if (row["UTname"] != null) { model.UTname = row["UTname"].ToString(); } if (row["FromType"] != null) { model.FromType = row["FromType"].ToString(); } if (row["RecUser"] != null) { model.RecUser = row["RecUser"].ToString(); } if (row["CnName"] != null) { model.CnName = row["CnName"].ToString(); } if (row["ServiceId"] != null) { model.ServiceId = row["ServiceId"].ToString(); } if (row["Uareano"] != null) { model.Uareano = row["Uareano"].ToString(); } if (row["ServStat"] != null && row["ServStat"].ToString() != "") { model.ServStat = int.Parse(row["ServStat"].ToString()); } if (row["ServMonth"] != null && row["ServMonth"].ToString() != "") { model.ServMonth = int.Parse(row["ServMonth"].ToString()); } if (row["FeeM"] != null && row["FeeM"].ToString() != "") { model.FeeM = int.Parse(row["FeeM"].ToString()); } if (row["RecTime"] != null && row["RecTime"].ToString() != "") { model.RecTime = DateTime.Parse(row["RecTime"].ToString()); } if (row["EndTime"] != null && row["EndTime"].ToString() != "") { model.EndTime = DateTime.Parse(row["EndTime"].ToString()); } if (row["EditTime"] != null && row["EditTime"].ToString() != "") { model.EditTime = DateTime.Parse(row["EditTime"].ToString()); } if (row["DoNote"] != null) { model.DoNote = row["DoNote"].ToString(); } if (row["BusMonth"] != null) { model.BusMonth = int.Parse(row["BusMonth"].ToString()); } if (row["FeeCode"] != null) { model.FeeCode = row["FeeCode"].ToString(); } } return(model); }