Ejemplo n.º 1
0
 public static ClientDataSet.MessageDataTable GetMessages(string localObjectType, string localObjectId)
 {
     using (MessageTableAdapter adapter = new MessageTableAdapter(OrganizationProvider.GetConnectionString(UserContext.Current.OrganizationId)))
     {
         return(adapter.GetMessages(localObjectType, localObjectId));
     }
 }
Ejemplo n.º 2
0
        public static Guid InsertMessage(Guid?parentMessageId, string localObjectType, string localObjectId, Guid fromUserId, Guid?toUserId, string subject, string text)
        {
            Guid messageId = Guid.NewGuid();

            using (MessageTableAdapter adapter = new MessageTableAdapter(OrganizationProvider.GetConnectionString(UserContext.Current.OrganizationId)))
            {
                adapter.Insert(messageId, parentMessageId, localObjectType, localObjectId, fromUserId, toUserId, subject, text, DateTime.UtcNow);
            }
            return(messageId);
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         Master.DataFromPageLabelControl("Patient");
     }
     MessageTableAdapter adap = new MessageTableAdapter();
     DataSet1.MessageDataTable dt = new DataSet1.MessageDataTable();
        dt=adap.GetData(Session["PatientID"].ToString());
     GridView1.DataSource=dt;
     GridView1.DataBind();
 }
Ejemplo n.º 4
0
        static void Main(string[] args)
        {
            //Animals<string> lw= new Animals<string>();
            //lw.Kind = "青龙";

            //Animals<Foods> my = new Animals<Foods>();
            //my.Kind = new Foods();

            //_17Bang bang = new _17Bang();

            MessageTableAdapter adapter  = new MessageTableAdapter();
            MessageDataTable    Messages = adapter.GetData();


            adapter.DeleteQuery(10);



            //int i = 18;



            //3.getFibonacci(0, 1);

            //4.quickSort(new int[] { 23, 15, 37, 89, 2, 21, 43, 9, 56 }, 0, 8);


            //1.int a = 20, b = 18;
            //swap(ref a, ref b);
            //Console.WriteLine(a);
            //Console.WriteLine(b);


            //2.int age = 18;
            //grow(ref age);
            //Console.WriteLine(age);


            //bool input = double.TryParse(Console.ReadLine(),out double input);
            //if (double.TryParse(Console.ReadLine(), out double input))//能够parse
            //{

            //    input += 10;
            //}
            //else
            //{
            //    Console.WriteLine("输入错误...");
            //}

            //buy(3,"可乐");
            //buy(5);



            //Console.WriteLine("Ceiling:" + Math.Ceiling(19.8));//向上取整 20;
            //Console.WriteLine("Floor:" + Math.Floor(19.8));//向下取整 19;
            //Console.WriteLine("Round:" + Math.Round(19.875, 2));

            //Console.WriteLine(new Random().Next(1000));
            //Random names = new Random();
            //int output = names.Next(1, 1000);
            //int a = new Random().Next(1, 123);
        }