当前位置: 首页>>代码示例>>C#>>正文


C# Feedback类代码示例

本文整理汇总了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");
    }
开发者ID:Valje,项目名称:IIO13200_NET_15S,代码行数:31,代码来源:palautekysely.aspx.cs

示例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);
    }
 }
开发者ID:Helen1987,项目名称:edu,代码行数:7,代码来源:Ch17-1-Delegates.cs

示例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");
            }
        }
开发者ID:nikkhilmuthye,项目名称:Skill-Set-Assessment-System,代码行数:33,代码来源:FeedbackForm.aspx.cs

示例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);
    }
开发者ID:jwalke24,项目名称:DUMB-site,代码行数:32,代码来源:CustomerFeedback.aspx.cs

示例5: Method

 private void Method(int value, Feedback fb)
 {
     if (fb != null)
     {
         fb(value);  //call all methods in delegate variable with value parameter 
     } 
 }
开发者ID:Stanols,项目名称:Samples,代码行数:7,代码来源:DelegateSample.cs

示例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);
        }
开发者ID:sahif,项目名称:MSAPROJECT,代码行数:32,代码来源:FeedbacksController.cs

示例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;

    }
开发者ID:JoniKukko,项目名称:IIO13200_NET_15S,代码行数:32,代码来源:WriteFeedback.aspx.cs

示例8: Insert

 public virtual void Insert( Feedback f, String lnkReplyList )
 {
     Result result = db.insert( f );
     if (result.IsValid) {
         addNotification( f, lnkReplyList );
     }
 }
开发者ID:happyYao,项目名称:wojilu,代码行数:7,代码来源:FeedbackService.cs

示例9: Insert

 public virtual void Insert( Feedback f )
 {
     Result result = db.insert( f );
     if (result.IsValid) {
         addFeedInfo( f );
         addNotification( f );
     }
 }
开发者ID:robin88,项目名称:wojilu,代码行数:8,代码来源:FeedbackService.cs

示例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;
 }
开发者ID:usmanm77,项目名称:MyShoppe,代码行数:9,代码来源:OfflineDataStore.cs

示例11: Counter

 private static void Counter(Int32 from, Int32 to, Feedback fb)
 {
     for (Int32 val = from; val <= to; val++)
     {
         if (fb != null) {
             fb(val);
         }
     }
 }
开发者ID:eagles,项目名称:demo,代码行数:9,代码来源:DelegateDemo.cs

示例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);
		}
开发者ID:BlogSharp,项目名称:Blogsharp,代码行数:10,代码来源:PostService.cs

示例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));
 }
开发者ID:BlogSharp,项目名称:Blogsharp,代码行数:10,代码来源:PostControllerTests.cs

示例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;
        }
开发者ID:TeamBilberry,项目名称:Web-Services-Teamwork-2014,代码行数:11,代码来源:FeedbackDataModel.cs

示例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 );
        }
开发者ID:happyYao,项目名称:wojilu,代码行数:11,代码来源:FeedbackService.cs


注:本文中的Feedback类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。