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


C# Messages.getId方法代码示例

本文整理汇总了C#中Messages.getId方法的典型用法代码示例。如果您正苦于以下问题:C# Messages.getId方法的具体用法?C# Messages.getId怎么用?C# Messages.getId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Messages的用法示例。


在下文中一共展示了Messages.getId方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Button1_Click

    protected void Button1_Click(object sender, EventArgs e)
    {
        try
        {
            int mid = 1, msgid = 1;
            //System.Windows.Forms.MessageBox.Show("Before alert " + Request.Params.Get("alert"));
            if (Request.Params.Get("alert") != null)
            {
                //System.Windows.Forms.MessageBox.Show("In alert ");
                Mails m;
                Messages mg;
                Clock c;
                bool MailEnabled = (Request.Params.Get("mail") != null);
                bool MessageEnabled = Request.Params.Get("message") != null;

                if (MailEnabled || MessageEnabled)
                {

                    c = InitializeClock();
                    c.Save();
                    if (MailEnabled)
                    {
                        Label1.Text += "  Mail  ";
                        m = new Mails(-1, TextBox1.Text, TextBox2.Text, TextBox3.Text, c.getId());
                        m.save();
                        mid = m.getId();
                    }
                    if (MessageEnabled)
                    {
                        Label1.Text += "   Message";
                        mg = new Messages(-1, TextBox4.Text, TextBox6.Text, c.getId());
                        mg.save();
                        msgid = mg.getId();
                    }
                }
            }
           // System.Windows.Forms.MessageBox.Show("Before saving");
            Label1.Text += "       Remainder";
            Reminder r = new Reminder(u.getUserName(), Calendar1.SelectedDate.ToString("dd/MMM/yyyy"), DropDownList10.SelectedItem.Text, TextBox7.Text, mid, msgid);
           // System.Windows.Forms.MessageBox.Show("After saving");
            Label1.Text = r.getQuery();
            if (r.save())
            {
                /*Response.Write("<script language='javascript'>"+
                                    "alert('Reminder added successfully..');"+
                                    "window.open('./RemindersList.aspx');"+
                                    "alert('new Page');"+
                               "</script>");*/
                Response.Redirect("RemindersList.aspx");
            }
            else
                Response.Write("<script language='javascript'>alert('An error occured in saving your reminder , try again after few seconds');</script>");
        }
        catch (Exception ee) { Response.Write(ee.Message); }
    }
开发者ID:sriharshakappala,项目名称:ping,代码行数:55,代码来源:AddReminder.aspx.cs

示例2: FormView2_ItemUpdated

    protected void FormView2_ItemUpdated(object sender, FormViewUpdatedEventArgs e)
    {
        int MsgId = (int)Session["MSGID"];

        if (MsgId == DEFAULT_MSGID)   // 114  -->  Default MessageId
        {
            // Creating New Message
            Messages Default = Messages.getById(MsgId);
            Messages NewMessage = new Messages(-1, Default.getDestNumber(), Default.getMessage(), Default.getClockId());

            //Clearing Default Message
            Default.setDestNumber("");
            Default.setMessage("");
            Default.update();

            NewMessage.save();
            Session.Add("MSGID", NewMessage.getId());

            //System.Windows.Forms.MessageBox.Show(NewMessage.getId() + "");
            //Updating MessagesId of Reminder
            Reminder r = Reminder.getById(((int)Session["RID"]));
            r.setMessageId(NewMessage.getId());
            r.update();
            //System.Windows.Forms.MessageBox.Show("Reminder Updated");
        }
    }
开发者ID:sriharshakappala,项目名称:ping,代码行数:26,代码来源:RemindersList.aspx.cs


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