/// <summary> /// 获得数据列表 /// </summary> public List <MobileSoft.Model.System.Tb_System_Register> DataTableToList(DataTable dt) { List <MobileSoft.Model.System.Tb_System_Register> modelList = new List <MobileSoft.Model.System.Tb_System_Register>(); int rowsCount = dt.Rows.Count; if (rowsCount > 0) { MobileSoft.Model.System.Tb_System_Register model; for (int n = 0; n < rowsCount; n++) { model = new MobileSoft.Model.System.Tb_System_Register(); //model.RegID=dt.Rows[n]["RegID"].ToString(); if (dt.Rows[n]["RegType"].ToString() != "") { model.RegType = int.Parse(dt.Rows[n]["RegType"].ToString()); } if (dt.Rows[n]["RegMode"].ToString() != "") { model.RegMode = int.Parse(dt.Rows[n]["RegMode"].ToString()); } model.RegUserName = dt.Rows[n]["RegUserName"].ToString(); model.RegPassWord = dt.Rows[n]["RegPassWord"].ToString(); model.RegQuestion = dt.Rows[n]["RegQuestion"].ToString(); model.RegAnswer = dt.Rows[n]["RegAnswer"].ToString(); model.RegCorpName = dt.Rows[n]["RegCorpName"].ToString(); model.CorpAddress = dt.Rows[n]["CorpAddress"].ToString(); model.ZipCode = dt.Rows[n]["ZipCode"].ToString(); model.LinkMan = dt.Rows[n]["LinkMan"].ToString(); model.Tel = dt.Rows[n]["Tel"].ToString(); model.Fax = dt.Rows[n]["Fax"].ToString(); model.Email = dt.Rows[n]["Email"].ToString(); model.WebName = dt.Rows[n]["WebName"].ToString(); if (dt.Rows[n]["RegDate"].ToString() != "") { model.RegDate = DateTime.Parse(dt.Rows[n]["RegDate"].ToString()); } if (dt.Rows[n]["IsAuditing"].ToString() != "") { model.IsAuditing = int.Parse(dt.Rows[n]["IsAuditing"].ToString()); } if (dt.Rows[n]["IsSucc"].ToString() != "") { model.IsSucc = int.Parse(dt.Rows[n]["IsSucc"].ToString()); } model.ReturnMsg = dt.Rows[n]["ReturnMsg"].ToString(); model.Province = dt.Rows[n]["Province"].ToString(); model.City = dt.Rows[n]["City"].ToString(); model.Borough = dt.Rows[n]["Borough"].ToString(); model.CorpTypeName = dt.Rows[n]["CorpTypeName"].ToString(); model.Street = dt.Rows[n]["Street"].ToString(); model.CommName = dt.Rows[n]["CommName"].ToString(); if (dt.Rows[n]["VSPID"].ToString() != "") { model.VSPID = int.Parse(dt.Rows[n]["VSPID"].ToString()); } modelList.Add(model); } } return(modelList); }
/// <summary> /// 更新一条数据 /// </summary> public void Update(MobileSoft.Model.System.Tb_System_Register model) { dal.Update(model); }
/// <summary> /// 增加一条数据 /// </summary> public void Add(MobileSoft.Model.System.Tb_System_Register model) { dal.Add(model); }