摘要: Activity1Intent intent= new Intent(MainActivity.this,SecondActivity.class);Bundle bundle= new Bundle();bundle.putString("username","lizhch");intent.putExtra("busername", bundle); startActivityForResult(intent, 0);//启动之后要求接受回传的值@Overrideprotected void onActivityResult(in 阅读全文
posted @ 2013-08-06 20:39 feidaochuanqing 阅读(503) 评论(0) 推荐(0) 编辑
摘要: package com.feidaochuanqing.uibycode;import android.app.Activity;import android.os.Bundle;import android.view.ViewGroup;import android.widget.LinearLayout;import android.widget.TextView;public class MainActivity extends Activity { /** Called when the activity is first created. */ @Override public vo 阅读全文
posted @ 2013-08-06 19:45 feidaochuanqing 阅读(334) 评论(0) 推荐(0) 编辑
摘要: --预定义授权(为用户设置角色)sp_addrolemember 'db_datareader',lizhchsp_addrolemember 'db_datawriter',lizhchsp_droprolemember 'db_datareader',lizhch--语句(对整体表的操作)grant create table to lizhch--对象(对单个表的操作)grant select on tt to lizhchgrant insert on tt to lizhchgrant update on tt to lizhchgran 阅读全文
posted @ 2013-06-28 22:04 feidaochuanqing 阅读(1319) 评论(0) 推荐(0) 编辑
摘要: 触发器 分为两种 一种是 after触发器 一种是insteadof触发器1.Afater触发器是只能用于表上 遇到异常的时候出了raiserror 以外,可以rollback transaction2.Insteadof触发器的用途在于将对表或是视图原来的操作(SQL语句执行的操作)屏蔽掉,取而代之的是 使用 触发器 中的语句。3.触发器的作用:1种是维护数据完整性,增加一些约束之类的,2另外一种作用是操作相关联的表。动作触发其他操作。 阅读全文
posted @ 2013-06-18 22:36 feidaochuanqing 阅读(172) 评论(0) 推荐(0) 编辑
摘要: EXEC sp_addextendedproperty @name = N'MS_Description', @value = 'Postal code is a required column.',@level0type = N'Schema', @level0name = 'dbo', --指定schema@level1type = N'Table', @level1name = 't1', --指定table@level2type = N'Column', @level2nam 阅读全文
posted @ 2013-06-18 14:11 feidaochuanqing 阅读(802) 评论(0) 推荐(0) 编辑
摘要: 1 select * int t3 from t1 --将t1中的表结构以及数据创建到t3上2 数据库选项的自动统计功能一定要打开,这样对性能有帮助 阅读全文
posted @ 2013-06-16 06:05 feidaochuanqing 阅读(441) 评论(0) 推荐(0) 编辑
摘要: 1.Contractnamespace BankContract{ [ServiceContract] public interface IBank { [OperationContract] [TransactionFlow(TransactionFlowOption.Mandatory)]//设置事务流,必须启用使用 void IntoMoney(int money); [OperationContract] [TransactionFlow(TransactionFlowOption.Mandatory)] void OutMoney(int money); }}2.Servicenam 阅读全文
posted @ 2013-04-06 22:42 feidaochuanqing 阅读(185) 评论(0) 推荐(0) 编辑
摘要: host by program private void button1_Click(object sender, EventArgs e) { ServiceHost host = new ServiceHost(typeof(PersonService)); WSHttpBinding wsBinding =new WSHttpBinding(); host.AddServiceEndpoint(typeof(IPersonService),wsBinding,new Uri("http://localhost:8766")); host.Opened +=new Ev 阅读全文
posted @ 2013-04-01 23:48 feidaochuanqing 阅读(118) 评论(0) 推荐(0) 编辑
摘要: Service(实现服务契约接口的服务类)namespace Service{ public class PersonService:IPersonService { List<Person> list = new List<Person>(); #region IPersonService 成员 public List<Person> GetAllPerson() { return list; } public void Add(Person person) { list.Add(person); } #endregion }}Contract(服务契约和 阅读全文
posted @ 2013-04-01 22:38 feidaochuanqing 阅读(95) 评论(0) 推荐(0) 编辑
摘要: Point point = new Point(5,5); const int SPACE = 5;//每个面板之间的间距 for (int i = 0; i < 10; i++) { PanelEx ex = new PanelEx(); ex.Size = new Size(130, 190); ex.Location = point; ex.FooterText = "脚部分"; ex.HeaderText = "头部分"; if (this.Size.Width < point.X + 260 + SPACE * 2) { point 阅读全文
posted @ 2013-03-17 21:31 feidaochuanqing 阅读(128) 评论(0) 推荐(0) 编辑