本文整理汇总了C#中DataLayer类的典型用法代码示例。如果您正苦于以下问题:C# DataLayer类的具体用法?C# DataLayer怎么用?C# DataLayer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DataLayer类属于命名空间,在下文中一共展示了DataLayer类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: GetDashBoardContacts
public List<Patient_Contact> GetDashBoardContacts(long PatientID)
{
dl = new DataLayer();
SqlCommand cmd = new SqlCommand();
cmd.CommandType = CommandType.StoredProcedure;
cmd.CommandText = "Portal_GetDashBoardContacts";
cmd.Parameters.AddWithValue("PatientID", PatientID);
List<Patient_Contact> contacts = new List<Patient_Contact>();
DataTable dt = dl.Execute(cmd);
foreach (DataRow dr in dt.Rows)
{
Patient_Contact contact = new Patient_Contact
{
ID = Int64.Parse(dr["ID"].ToString()),
ContactName = dr["ContactName"].ToString(),
ContactType = dr["ContactType"].ToString(),
ContactPhoneNumber = dr["PhoneNumber"].ToString(),
Emergency = bool.Parse(dr["Emergency"].ToString())
};
contacts.Add(contact);
}
return contacts;
}
开发者ID:lchambaka,项目名称:WorkPad,代码行数:29,代码来源:Lib.cs
示例2: GetMediaGroups
public List<MediaGroup> GetMediaGroups()
{
DataLayer dal = new DataLayer();
dal.ConnectionString = ConectionString;
dal.Connect();
SqlCommand cmd = new SqlCommand();
cmd.CommandType = CommandType.StoredProcedure;
cmd.CommandText = "GetMediaGroups";
DataTable dt = dal.Execute(cmd);
List<MediaGroup> MediaGroups = new List<MediaGroup>();
foreach (DataRow dr in dt.Rows)
{
MediaGroup mediagroup = new MediaGroup
{
MediaID = Int32.Parse(dr["MediaID"].ToString()),
MediaTitle = dr["MediaTitle"].ToString(),
MediaType = dr["MediaType"].ToString(),
DateCreated = DateTime.Parse(dr["DateCreated"].ToString())
};
MediaGroups.Add(mediagroup);
}
return MediaGroups;
}
开发者ID:lchambaka,项目名称:WorkPad,代码行数:28,代码来源:Media.cs
示例3: GetEvent
public HopeEvent GetEvent(Int64 EventID )
{
dl = new DataLayer(pConnectionString);
SqlCommand cmd = new SqlCommand();
cmd.CommandType = CommandType.StoredProcedure;
cmd.CommandText = "GetEvent";
cmd.Parameters.AddWithValue("@EventID", EventID);
DataTable dt = dl.Execute(cmd);
foreach (DataRow dr in dt.Rows)
{
HopeEvent the_event = new HopeEvent
{
ID = Int64.Parse(dr["ID"].ToString()),
EventName = dr["EventName"].ToString(),
ShortDescription = dr["ShortDescription"].ToString(),
LongDescription = dr["LongDescription"].ToString(),
AdditionalInformation = dr["AdditionalInformation"].ToString(),
RegistrationInformation = dr["RegistrationInformation"].ToString(),
Sort = Int32.Parse(dr["Sort"].ToString()),
DateCreated = Convert.ToDateTime(dr["DateCreated"].ToString())
};
return the_event;
}
return null;
}
开发者ID:lchambaka,项目名称:WorkPad,代码行数:32,代码来源:Lib.cs
示例4: GetEventPictures
public List<EventPicture> GetEventPictures(Int64 EventID)
{
DataLayer dl = new DataLayer();
SqlCommand cmd = new SqlCommand();
cmd.CommandType = CommandType.StoredProcedure;
cmd.CommandText = "[GetEventsPictures]";
cmd.Parameters.AddWithValue("@EventID", EventID);
List<EventPicture> Pictures = new List<EventPicture>();
DataTable dt = dl.Execute(cmd);
foreach (DataRow dr in dt.Rows)
{
EventPicture picture = new EventPicture
{
PictureID = Int64.Parse(dr["PictureID"].ToString()),
PictureURL = dr["PictureURL"].ToString(),
};
Pictures.Add(picture);
}
return Pictures;
}
开发者ID:lchambaka,项目名称:WorkPad,代码行数:28,代码来源:Lib.cs
示例5: frmDepartment
public frmDepartment(ref DataLayer objDL)
{
InitializeComponent();
m_DL = objDL;
InitializeUI();
}
开发者ID:anneilb,项目名称:ce-dev,代码行数:7,代码来源:frmDepartment.cs
示例6: btnSumbit_Click
protected void btnSumbit_Click(object sender, EventArgs e)
{
DataLayer dl = new DataLayer();
string sMemberName = "<i>Anonymous</i>";
if (User.Identity.IsAuthenticated)
{
if (!cbxAnonymous.Checked)
{
sMemberName = dl.GetFullMemberNameBy_Email(User.Identity.Name);
}
}
SmtpMail.SmtpServer = "relay-hosting.secureserver.net";
MailMessage mm;
mm = new MailMessage();
mm.BodyFormat = MailFormat.Html;
mm.To = "[email protected];[email protected]";
mm.From = "[email protected]";
mm.Subject = "New \"Ask The Success Coach\" question!";
mm.Body = sMemberName + " submitted a question to the Success Coach.<br /><br />";
mm.Body += tbxQuestion.Text.Replace("\n", "<br />").Replace("\r", "");
SmtpMail.Send(mm);
Session["resultColor"] = "#007700";
Session["resultTitle"] = "Question Sent";
Session["resultMessage"] = "The Success Coach will answer your question in his next blog update.";
Session["resultReturnURL"] = "Blogs.aspx";
Response.Redirect("Result.aspx", true);
}
开发者ID:chevex-archived,项目名称:ReferralNetworX,代码行数:31,代码来源:AskTheCoach.aspx.cs
示例7: btnSubmit_Click
protected void btnSubmit_Click(object sender, EventArgs e)
{
if (tbxCode.Text == Session["CaptchaImageText"].ToString())
{
if (this.IsValid)
{
DataLayer dl = new DataLayer();
dl.AddNonMember(tbxNonMemberEmail.Text, tbxNonMemberName.Text, true, true);
SmtpMail.SmtpServer = "relay-hosting.secureserver.net";
MailMessage mm;
mm = new MailMessage();
mm.BodyFormat = MailFormat.Html;
mm.To = "[email protected];[email protected]";
mm.From = "[email protected]";
mm.Subject = "Someone signed up for the RNX free content.";
mm.Body = tbxNonMemberName.Text + " subscribed to the RNX free content using this email: " + tbxNonMemberEmail.Text;
SmtpMail.Send(mm);
Session["resultColor"] = "#007700";
Session["resultTitle"] = "Success!";
Session["resultMessage"] = "You have successfully subscribed to the RNX free content!";
Session["resultReturnURL"] = "Default.aspx";
Response.Redirect("Result.aspx", true);
}
}
else
{
cvInvalidCode.IsValid = false;
}
}
开发者ID:chevex-archived,项目名称:ReferralNetworX,代码行数:32,代码来源:Default.aspx.cs
示例8: lbtnQuotePost_Click
protected void lbtnQuotePost_Click(object sender, EventArgs e)
{
if (Request.QueryString["rt"] != null)
{
int iRTPostID = Convert.ToInt32(Request.QueryString["rt"]);
DataLayer dl = new DataLayer();
DataTable dtRTPost = dl.GetForumPostBy_PostID(iRTPostID);
rteBody.Value += "<div style=\"background-color:#ddddee; border: solid 2px #000077;padding:10px;\">";
rteBody.Value += dtRTPost.Rows[0].ItemArray[4].ToString();
rteBody.Value += "<br /><br /><div style=\"font-size: 12px;font-weight:bold;\">Posted by <a href=\"Profile.aspx?member=" + dtRTPost.Rows[0].ItemArray[2].ToString() + "\">";
rteBody.Value += dl.GetFullMemberNameBy_Email(dtRTPost.Rows[0].ItemArray[2].ToString());
rteBody.Value += "</a> on " + dtRTPost.Rows[0].ItemArray[3].ToString() + "</div></div><br />";
}
else
{
int iRTTopicID = Convert.ToInt32(Request.QueryString["topic"]);
DataLayer dl = new DataLayer();
DataTable dtRTTopic = dl.GetForumTopicBy_TopicID(iRTTopicID);
rteBody.Value += "<div style=\"background-color:#ddddee; border: solid 2px #000077;padding:10px;\">";
rteBody.Value += dtRTTopic.Rows[0].ItemArray[5].ToString();
rteBody.Value += "<br /><br /><div style=\"font-size: 12px;font-weight:bold;\">Posted by <a href=\"Profile.aspx?member=" + dtRTTopic.Rows[0].ItemArray[2].ToString() + "\">";
rteBody.Value += dl.GetFullMemberNameBy_Email(dtRTTopic.Rows[0].ItemArray[2].ToString());
rteBody.Value += "</a> on " + dtRTTopic.Rows[0].ItemArray[3].ToString() + "</div></div><br />";
}
}
开发者ID:chevex-archived,项目名称:ReferralNetworX,代码行数:25,代码来源:AddEditPost.aspx.cs
示例9: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
try
{
OrgID = System.Convert.ToInt32(Session["TenantID"]);
}
catch (Exception ex)
{
try
{
OrgID = System.Convert.ToInt32(Request.QueryString["OrgID"]);
}
catch (Exception ex2)
{
}
}
DataLayer dl = new DataLayer();
string loginurl = dl.getNextService(OrgID,0,"User Login");
string registerurl = dl.getNextService(OrgID, 0, "User Registration");
login.HRef = loginurl;
register.HRef = registerurl;
if (Session["user"] != null)
Response.Redirect("members.aspx");
if (Session["user1"] != null)
Response.Redirect("CustomerPage.aspx");
}
开发者ID:nikhilp2,项目名称:SoftwareDesign,代码行数:27,代码来源:home.aspx.cs
示例10: GetMyChildrens
public DataTable GetMyChildrens()
{
DataLayer dl=new DataLayer();
Person myPersion=new Person();
DataTable dt = dl.GetStudentList(base.SchoolID, "-1", "", "", "-1", "-1", _pepoleID, "", "order by StudentNumber asc", 70, 1);
return dt;
}
开发者ID:Letractively,项目名称:dilas,代码行数:7,代码来源:DParent.cs
示例11: ProcessInvoice
public string ProcessInvoice(DataLayer.Entities.Invoice invoice)
{
invoice.InvoiceDate = DateTime.Today.Date.ToShortDateString();
invoice.InvoiceNum = InvoiceNumberGenerator.GenerateInvoiceNumber();
return _repo.POSProcessInvoices(invoice);
}
开发者ID:lorenz31,项目名称:CrystalH2O,代码行数:7,代码来源:POSLogic.cs
示例12: ViewDidLoad
public override void ViewDidLoad()
{
base.ViewDidLoad ();
UITextFieldCondition firstCondition = new UITextFieldCondition (delegate {
txtFirstName.ResignFirstResponder();
return false;
});
txtFirstName.ShouldReturn = firstCondition;
UITextFieldCondition secondCondition = new UITextFieldCondition (delegate {
txtSurname.ResignFirstResponder();
return false;
});
txtSurname.ShouldReturn = secondCondition;
UITextFieldCondition emailCondition = new UITextFieldCondition (delegate {
txtEMail.ResignFirstResponder();
return false;
});
txtEMail.ShouldReturn = emailCondition;
UITextFieldCondition mobileCondition = new UITextFieldCondition (delegate {
txtMobile.ResignFirstResponder();
return false;
});
txtMobile.ShouldReturn = mobileCondition;
btnUpdate.TouchUpInside += (object sender, EventArgs e) => {
DataLayer dl = new DataLayer();
string gender = "Female";
if (segGender.SelectedSegment == 1)
gender = "Male";
if (PersonID == 0)
{
List<Person> duplicates = dl.getPersonByName(txtFirstName.Text, txtSurname.Text);
if (duplicates.Count > 0)
PersonID = duplicates[0].ID;
}
PersonID = dl.updatePerson(PersonID, dl.GetCampusID(), txtFirstName.Text, txtSurname.Text, gender, dpDoB.Date,txtMobile.Text, txtEMail.Text, 0);
if (Relationship != 0)
{
switch (Relationship)
{
case 1:
dl.updateSpouse1(MarriedRelionshipID, PersonID);
break;
case 2:
dl.updateSpouse2(MarriedRelionshipID, PersonID);
break;
default:
dl.createParentRelationship(MarriedRelionshipID, PersonID, false);
break;
}
}
UINavigationController parent = this.NavigationController;
parent.PopViewControllerAnimated(true);
};
}
开发者ID:Wazzo79,项目名称:Illumin8---Kids-Checkin-App,代码行数:60,代码来源:PersonViewController.cs
示例13: ExpenditureDetails
public ExpenditureDetails()
{
InitializeComponent();
_expenditures = new List<EXPENDITUREDETAIL>();
data = DataLayer.Instance;
dateOfExpenditure.SelectedDate = DateTime.Today;
}
开发者ID:qq5013,项目名称:TMS-1,代码行数:7,代码来源:ExpenditureDetails.xaml.cs
示例14: GetDashBoardInsurance
public List<Insurance_DashBoard> GetDashBoardInsurance(long PatientID)
{
dl = new DataLayer();
SqlCommand cmd = new SqlCommand();
cmd.CommandType = CommandType.StoredProcedure;
cmd.CommandText = "Portal_GetDashBoardInsuranceProviders";
cmd.Parameters.AddWithValue("PatientID", PatientID);
List<Insurance_DashBoard> Insurances = new List<Insurance_DashBoard>();
DataTable dt = dl.Execute(cmd);
foreach (DataRow dr in dt.Rows)
{
Insurance_DashBoard Insurance = new Insurance_DashBoard
{
ID = Int64.Parse(dr["ID"].ToString()),
ProviderName = dr["ProviderName"].ToString(),
InsuranceType = dr["InsuranceType"].ToString(),
CreatedBy = dr["CreatedBy"].ToString(),
GroupNumber = dr["GroupNumber"].ToString(),
PolicyNumber = dr["PolicyNumber"].ToString(),
DateCreated = Convert.ToDateTime(dr["DateCreated"].ToString()),
};
Insurances.Add(Insurance);
}
return Insurances;
}
开发者ID:lchambaka,项目名称:WorkPad,代码行数:32,代码来源:Lib.cs
示例15: btnSubmit_Click
protected void btnSubmit_Click(object sender, EventArgs e)
{
DataLayer dl = new DataLayer();
if (dl.EmailExists(tbxEmail.Text))
{
string sPassword = dl.GetMemberBy_Email(tbxEmail.Text).Rows[0].ItemArray[1].ToString();
SmtpMail.SmtpServer = "relay-hosting.secureserver.net";
MailMessage mm;
mm = new MailMessage();
mm.BodyFormat = MailFormat.Html;
mm.To = tbxEmail.Text;
mm.From = "[email protected]";
mm.Subject = "Your password for ReferralNetworX.com";
mm.Body = "You requested to have your password sent to you. It is listed below.<br /><br />Username: " + tbxEmail.Text + "<br />Password: " + sPassword;
SmtpMail.Send(mm);
Session["resultColor"] = "#007700";
Session["resultTitle"] = "Password Sent";
Session["resultMessage"] = "Your password has been sent to your email.";
Session["resultReturnURL"] = "Default.aspx";
Response.Redirect("Result.aspx", true);
}
else
{
Session["resultColor"] = "#ff0000";
Session["resultTitle"] = "Email Not Found";
Session["resultMessage"] = "The email you provided was not found.";
Session["resultReturnURL"] = "Default.aspx";
Response.Redirect("Result.aspx", true);
}
}
开发者ID:chevex-archived,项目名称:ReferralNetworX,代码行数:34,代码来源:ForgotPassword.aspx.cs
示例16: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
//if (!User.Identity.IsAuthenticated)
//{
// Session["resultColor"] = "#ff0000";
// Session["resultTitle"] = "Members Only";
// Session["resultMessage"] = "This is a members only area.<br />You must log in first.";
// Session["resultReturnURL"] = "Directory.aspx";
// Response.Redirect("Result.aspx", true);
//}
DataLayer dl = new DataLayer();
loggedinpanels.Controls.Add(new LiteralControl("<div style=\"width:250px;\" class=\"contenttitle\">Featured Member</div><div class=\"contentpanel\">"));
DataTable dtRandomMember = dl.GetRandomMember();
loggedinpanels.Controls.Add(new LiteralControl("<table style=\"width:100%;\"><tr><td style=\"font-size:13px;text-align:center;\"><a href=\"Profile.aspx?member=" + dtRandomMember.Rows[0].ItemArray[0].ToString() + "\"><img style=\"border-width:0px;\" src=\"MakeThumbnail.aspx?size=100&image=images/MemberAvatars/" + dtRandomMember.Rows[0].ItemArray[3].ToString() + "\" /></a><br /><a href=\"Profile.aspx?member=" + dtRandomMember.Rows[0].ItemArray[0].ToString() + "\">View Profile</a></td><td style=\"padding-left:5px;font-size:13px;width:100%;\"><b>Name:</b> " + dtRandomMember.Rows[0].ItemArray[2].ToString() + "<br /><br /><b>Location:</b> " + dtRandomMember.Rows[0].ItemArray[17].ToString() + "<br /><br /><b>Business:</b> " + dtRandomMember.Rows[0].ItemArray[8].ToString() + "<br /><br />"));
if (dtRandomMember.Rows[0].ItemArray[6].ToString() != "")
{
loggedinpanels.Controls.Add(new LiteralControl("<center><a href=\"" + dtRandomMember.Rows[0].ItemArray[6].ToString() + "\">Visit Website</a></center>"));
}
loggedinpanels.Controls.Add(new LiteralControl("</td></tr></table></div>"));
DataTable dtMemberAd = dl.GetRandomAd();
loggedinpanels.Controls.Add(new LiteralControl("<div class=\"contenttitle\">Member Ad</div><div style=\"text-align:center;\" class=\"contentpanel\"><a href=\"" + dtMemberAd.Rows[0].ItemArray[2].ToString() + "\"><img style=\"width:230px; border-width:0px;\" src=\"" + dtMemberAd.Rows[0].ItemArray[1].ToString() + "\" /></a></div>"));
if (User.Identity.IsAuthenticated)
{
loggedinpanels.Controls.Add(new LiteralControl("<div style=\"width:250px;\" class=\"contenttitle\">Popular Topics</div><div style=\"font-size:15px;\" class=\"contentpanel\"><ul>"));
DataTable dtTopics = dl.GetFiveTopics();
foreach (DataRow dr in dtTopics.Rows)
{
loggedinpanels.Controls.Add(new LiteralControl("<li><a href=\"Topic.aspx?topic=" + dr.ItemArray[0].ToString() + "\">" + dr.ItemArray[4].ToString() + "</a></li>"));
}
loggedinpanels.Controls.Add(new LiteralControl("</ul></div>"));
}
}
开发者ID:chevex-archived,项目名称:ReferralNetworX,代码行数:35,代码来源:Directory.aspx.cs
示例17: btnLogin_Click
protected void btnLogin_Click(object sender, EventArgs e)
{
DataLayer dataLayer = new DataLayer();
DataRow row = dataLayer.Login(Username.Text, Password.Text);
if (row != null)
{
//TODO:定義UserData,可以存放使用者資訊到Cookie,記住!!UserData因為是放在Cookie,所以IE和Netscape所支援的最大容量為4096bytes
// //UserData為一個字串用";"分開每個功能作用
// //目前的定義:所屬角色ID
SPerson person = new SPerson();
person.account = Username.Text;
person.name = row["name"].ToString();
//person.Permission = dataLayer.GetPermissionStringByID(row["id"].ToString());
person.email = row["emailAddress"].ToString();
person.Role = row["role"].ToString();
person.School_id = row["school_id"].ToString();
person.people_id = row["people_id"].ToString();
string userData = JsonConvert.SerializeObject(person);
SetAuthenTicket(userData, Username.Text);
//System.IO.File.AppendAllText(Server.MapPath("Login.log"), DateTime.Now.ToString() + "====>" + Username.Text + "," + row["name"] + "," + row["Organization"] + "\r\n");
Response.Redirect("SchoolZone.aspx");
}else
{
lblErrer.Text = "您輸入的帳號或密碼有誤,請再輸入一次!";
}
}
开发者ID:Letractively,项目名称:dilas,代码行数:29,代码来源:Default.aspx.cs
示例18: GetMediaGroup
public MediaGroup GetMediaGroup(int MediaID)
{
DataLayer dal = new DataLayer();
dal.ConnectionString = ConnectionString;
dal.Connect();
SqlCommand cmd = new SqlCommand();
cmd.CommandType = CommandType.StoredProcedure;
cmd.CommandText = "GetMediaGroup";
cmd.Parameters.AddWithValue("@MediaID", MediaID);
DataTable dt = dal.Execute(cmd);
DataRow dr = dt.Rows[0];
return new MediaGroup
{
MediaID = Int32.Parse(dr["MediaID"].ToString()),
MediaTitle = dr["MediaTitle"].ToString(),
MediaType = dr["MediaType"].ToString(),
ProductID = Int32.Parse(dr["ProductID"].ToString()),
Active = bool.Parse(dr["Active"].ToString()),
DateCreated = DateTime.Parse(dr["DateCreated"].ToString())
};
}
开发者ID:lchambaka,项目名称:WorkPad,代码行数:25,代码来源:Admin.cs
示例19: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
if (User.Identity.IsAuthenticated)
{
cbxAnonymous.Visible = true;
}
else
{
cbxAnonymous.Visible = false;
}
DataLayer dl = new DataLayer();
if (User.Identity.IsAuthenticated)
{
loggedinpanels.Controls.Add(new LiteralControl("<div style=\"width:250px;\" class=\"contenttitle\">Featured Member</div><div class=\"contentpanel\">"));
DataTable dtRandomMember = dl.GetRandomMember();
loggedinpanels.Controls.Add(new LiteralControl("<table style=\"width:100%;\"><tr><td style=\"font-size:13px;text-align:center;\"><a href=\"Profile.aspx?member=" + dtRandomMember.Rows[0].ItemArray[0].ToString() + "\"><img style=\"border-width:0px;\" src=\"MakeThumbnail.aspx?size=100&image=images/MemberAvatars/" + dtRandomMember.Rows[0].ItemArray[3].ToString() + "\" /></a><br /><a href=\"Profile.aspx?member=" + dtRandomMember.Rows[0].ItemArray[0].ToString() + "\">View Profile</a></td><td style=\"padding-left:5px;font-size:13px;width:100%;\"><b>Name:</b> " + dtRandomMember.Rows[0].ItemArray[2].ToString() + "<br /><br /><b>Location:</b> " + dtRandomMember.Rows[0].ItemArray[17].ToString() + "<br /><br /><b>Business:</b> " + dtRandomMember.Rows[0].ItemArray[8].ToString() + "<br /><br />"));
if (dtRandomMember.Rows[0].ItemArray[6].ToString() != "")
{
loggedinpanels.Controls.Add(new LiteralControl("<center><a href=\"" + dtRandomMember.Rows[0].ItemArray[6].ToString() + "\">Visit Website</a></center>"));
}
loggedinpanels.Controls.Add(new LiteralControl("</td></tr></table></div>"));
}
DataTable dtMemberAd = dl.GetRandomAd();
loggedinpanels.Controls.Add(new LiteralControl("<div class=\"contenttitle\">Member Ad</div><div style=\"text-align:center;\" class=\"contentpanel\"><a href=\"" + dtMemberAd.Rows[0].ItemArray[2].ToString() + "\"><img style=\"width:230px; border-width:0px;\" src=\"" + dtMemberAd.Rows[0].ItemArray[1].ToString() + "\" /></a></div>"));
}
开发者ID:chevex-archived,项目名称:ReferralNetworX,代码行数:27,代码来源:AskTheCoach.aspx.cs
示例20: GetMediaGroupItem
public MediaGroupItem GetMediaGroupItem(string AssetID)
{
DataLayer dal = new DataLayer();
dal.ConnectionString = ConnectionString;
dal.Connect();
SqlCommand cmd = new SqlCommand();
cmd.CommandType = CommandType.StoredProcedure;
cmd.CommandText = "GetMediaGroupItem";
cmd.Parameters.AddWithValue("@AssetID", AssetID);
DataTable dt = dal.Execute(cmd);
foreach (DataRow dr in dt.Rows)
{
MediaGroupItem mediagroupitem = new MediaGroupItem
{
MediaID = Int32.Parse(dr["MediaID"].ToString()),
AssetID = dr["AssetID"].ToString(),
FileName = dr["FileName"].ToString(),
PreviewImageURL = dr["PreviewImage"].ToString(),
FilePath = dr["FilePath"].ToString(),
PermanentLinkURL = dr["PermanentLink"].ToString(),
Sort = Int32.Parse(dr["Sort"].ToString())
};
return mediagroupitem;
}
return null;
}
开发者ID:lchambaka,项目名称:WorkPad,代码行数:31,代码来源:Admin.cs
注:本文中的DataLayer类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论