本文整理汇总了C#中Feedback类的典型用法代码示例。如果您正苦于以下问题:C# Feedback类的具体用法?C# Feedback怎么用?C# Feedback使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Feedback类属于命名空间,在下文中一共展示了Feedback类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: WriteXMLFile
public void WriteXMLFile(Feedback palis)
{
/*
using (XmlWriter writer = XmlWriter.Create(@"D:\H3340\1.xml"))
{
writer.WriteStartDocument();
writer.WriteStartElement("Palaute");
writer.WriteElementString("pvm", palis.Date);
writer.WriteElementString("tekija", palis.Name);
writer.WriteElementString("opittu", palis.Learned);
writer.WriteElementString("haluanoppia", palis.WantToLearn);
writer.WriteElementString("hyvaa", palis.Good);
writer.WriteElementString("parannettavaa", palis.Improvements);
writer.WriteElementString("muuta", palis.Others);
writer.WriteEndElement();
writer.WriteEndDocument();
}
*/
XDocument doc = XDocument.Load(@"D:\H3340\1.xml"); //Tähän T8Palaute.Properties.Settings.Default.yhteys (app.configista) niin menee sit ghostille
XElement palautteet = doc.Element("palautteet");
palautteet.Add(new XElement("palaute",
new XElement("pvm", palis.Date),
new XElement("tekija", palis.Name),
new XElement("opittu", palis.Learned),
new XElement("haluanoppia", palis.WantToLearn),
new XElement("hyvaa", palis.Good),
new XElement("parannettavaa", palis.Improvements),
new XElement("muuta", palis.Others)));
doc.Save(@"D:\H3340\1.xml");
}
示例2: Counter
private static void Counter(Int32 from, Int32 to, Feedback fb) {
for (Int32 val = from; val <= to; val++) {
// If any callbacks are specified, call them
if (fb != null)
fb(val);
}
}
示例3: submit_Click
//
//On click of Submit: Validates selection, stores feedback and navigates to Logout form
//
protected void submit_Click(object sender, EventArgs e)
{
if ((comboBox1.SelectedIndex == -1) || (comboBox2.SelectedIndex == -1) || (comboBox3.SelectedIndex == -1) || (comboBox4.SelectedIndex == -1) || (comboBox5.SelectedIndex == -1))
System.Web.HttpContext.Current.Response.Write("<SCRIPT LANGUAGE='JavaScript'>alert('Some error! Please Check again!')</SCRIPT>");
//MessageBox.Show("Please select a valid entry.", "Error");
else
{
Feedback g = new Feedback();
g.employee_ID = emp.employee_Id;
g.exam_ID = ed.exam_ID;
g.answer1 = Convert.ToInt32(comboBox1.SelectedItem.ToString());
g.answer2 = Convert.ToInt32(comboBox2.SelectedItem.ToString());
g.answer3 = Convert.ToInt32(comboBox3.SelectedItem.ToString());
g.answer4 = Convert.ToInt32(comboBox4.SelectedItem.ToString());
g.answer5 = Convert.ToInt32(comboBox5.SelectedItem.ToString());
string feed = f.addFeedback(g);
Session["employee"] = emp;
Session["exam"] = ed;
//MessageBox.Show(feed, "Feedback");
/*LogoutForm fm9 = new LogoutForm(emp, ed);
fm9.MdiParent = this.MdiParent;
fm9.Dock = DockStyle.Fill;
this.Close();
fm9.Show();*/
Response.Redirect("~/LogoutForm.aspx");
}
}
示例4: PopulateClosedFeedback
private void PopulateClosedFeedback()
{
var feedbackTable = (DataView) this.sqlFeedback.Select(DataSourceSelectArguments.Empty);
if (feedbackTable == null)
{
return;
}
feedbackTable.RowFilter = "CustomerID =" + this.txtCustomerId.Text + " AND DateClosed IS NOT NULL";
if (feedbackTable.Count <= 0)
{
this.DisableControls();
return;
}
foreach (DataRowView row in feedbackTable)
{
var customerFeedback = new Feedback
{
FeedbackId = row["FeedbackID"].ToString(),
SoftwareId = row["SoftwareID"].ToString(),
DateClosed = row["DateClosed"].ToString(),
Title = row["Title"].ToString()
};
this.lbClosedFeedback.Items.Add(new ListItem(customerFeedback.FormatFeedback(), customerFeedback.FeedbackId));
}
this.EnableControls();
SetFocus(this.lbClosedFeedback);
}
示例5: Method
private void Method(int value, Feedback fb)
{
if (fb != null)
{
fb(value); //call all methods in delegate variable with value parameter
}
}
示例6: PutFeedback
public IHttpActionResult PutFeedback(int id, Feedback feedback)
{
if (!ModelState.IsValid)
{
return BadRequest(ModelState);
}
if (id != feedback.ID)
{
return BadRequest();
}
db.Entry(feedback).State = EntityState.Modified;
try
{
db.SaveChanges();
}
catch (DbUpdateConcurrencyException)
{
if (!FeedbackExists(id))
{
return NotFound();
}
else
{
throw;
}
}
return StatusCode(HttpStatusCode.NoContent);
}
示例7: saveFeedback
// palautteen tallennus
private bool saveFeedback(Feedback newFeedback)
{
try
{
// lisätään xelement tiedostoon
this.feedbackFile.Add(
new XElement("palaute",
new XElement("pvm", newFeedback.Date),
new XElement("tekija", newFeedback.Name),
new XElement("opintojaksonimi", newFeedback.ClassName),
new XElement("opintojaksokoodi", newFeedback.ClassCode),
new XElement("opittu", newFeedback.Learned),
new XElement("haluanoppia", newFeedback.WantToLearn),
new XElement("hyvaa", newFeedback.Good),
new XElement("parannettavaa", newFeedback.Bad),
new XElement("muuta", newFeedback.Other)
)
);
// yritetään tallentaa xelement tiedostoa
this.feedbackFile.Save(HttpContext.Current.Server.MapPath("~/App_Data/Palautteet.xml"));
}
catch (Exception)
{
return false;
}
return true;
}
示例8: Insert
public virtual void Insert( Feedback f, String lnkReplyList )
{
Result result = db.insert( f );
if (result.IsValid) {
addNotification( f, lnkReplyList );
}
}
示例9: Insert
public virtual void Insert( Feedback f )
{
Result result = db.insert( f );
if (result.IsValid) {
addFeedInfo( f );
addNotification( f );
}
}
示例10: AddFeedbackAsync
public async Task<Feedback> AddFeedbackAsync(Feedback feedback)
{
var emailTask = MessagingPlugin.EmailMessenger;
if(emailTask.CanSendEmail)
{
emailTask.SendEmail("[email protected]", "My Shop Feedback", feedback.ToString());
}
return feedback;
}
示例11: Counter
private static void Counter(Int32 from, Int32 to, Feedback fb)
{
for (Int32 val = from; val <= to; val++)
{
if (fb != null) {
fb(val);
}
}
}
示例12: AddComment
public void AddComment(Feedback comment)
{
var commentAdding = new CommentAddingEventArgs(this, comment);
CommentAdding.Raise(commentAdding);
if (commentAdding.Cancel)
return;
postRepository.SaveComment(comment);
var commentAdded = new CommentAddedEventArgs(this, comment);
CommentAdded.Raise(commentAdded);
}
示例13: Can_insert_post_comment
public void Can_insert_post_comment()
{
var postComment = new Feedback();
postService.Expect(x => x.GetPostById(blog, 1))
.Return(new Post {FriendlyTitle = "m"});
var actionResult = controller.AddComment(1, postComment);
Assert.That(((ViewResult) actionResult).ViewName == "Read");
Assert.That(actionResult, Is.Not.Null);
postService.AssertWasCalled(x => x.AddComment(postComment));
}
示例14: FeedbackDataModel
public FeedbackDataModel(Feedback feedback)
{
this.Id = feedback.Id;
this.Type = feedback.Type;
this.PostDate = feedback.PostDate;
this.Text = feedback.Text;
this.UserId = feedback.UserId;
this.Comments = feedback.Comments.AsQueryable().Select(c => new CommentDataModel(c));
this.AddressedTo = feedback.AddressedTo;
// this.UserName = feedback.User.UserName;
}
示例15: addNotification
private void addNotification( Feedback f, String lnkReplyList )
{
int receiverId = f.Target.Id;
if (f.Creator.Id == receiverId) return;
String feedbackInfo = lang.get( "feedbackInfo" );
String spaceLink = "<a href=\"" + lnkReplyList + "\">" + lang.get( "yourSpace" ) + "</a>";
String msg = string.Format( feedbackInfo, f.Creator.Name, spaceLink );
nfService.send( receiverId, typeof( User ).FullName, msg, NotificationType.Comment );
}