有没有办法,从richtextbox保存数据库格式?
我有richtextbox,这里的部分文字都是粗体.
string s = richtextbox.Text显然不起作用.
如果我能得到这个格式化文本如何将其保存在Ms Sql Server 2005中?
我有专栏"所有者"的列车.
我有一个车主,他有10辆车.
现在我还有2个拥有相同车辆的人,所以我需要在我的桌子上添加20条记录.
只有一列不同:
就像是:
Insert into Cars (NameOfCar,NameOfOwner)
Select NameOfCar,'"Robert Kubica' Where NameOfOwner='Schumacher'.
Insert into Cars (NameOfCar,NameOfOwner)
Select NameOfCar,'"Hakashi Honda' Where NameOfOwner='Schumacher'.
Run Code Online (Sandbox Code Playgroud) 我想创建tabpage作为userControl.
有没有办法解决这个问题?
如何检查两个单词是否有共同的字符?
恩.:"word"和"letter"有共同的"r"
"字"和"电子邮件"没有任何共同的字符
这段代码是错误的,因为如果两个单词有两个共同的字符,我会在结果中得到4
int numberOfCommonChars = (from c1 in word1.ToCharArray()
from c2 in word2.ToCharArray()
where c1 == c2
select c1).Count();
Run Code Online (Sandbox Code Playgroud) public enum ObjectType {Country = 0,Region = 1,Province = 2,City = 3,Hotel = 4}
我有两个语言版本的两个应用程序,这个枚举在某个地方显示,所以取决于语言版本我想显示正确版本的枚举
用德语版本代替Country Land等
此应用程序使用相同的websercice,它具有此枚举的声明.
添加
我有一个datagridview和对象列表,哪些类有字段ObjectType,我必须在datagridviev中显示这个池,所以这是一个问题
我打算用MVVM做一个wpf应用程序(它基于http://www.codeproject.com/KB/WPF/MVVMQuickTutorial.aspx ).
此应用程序将每月与webservice连接一个.
在webservice我有合同
public class Student
{
public string Name {get; set;}
public int Score {get; set;}
public DateTime TimeAdded {get; set;}
public string Comment {get; set;}
}
Run Code Online (Sandbox Code Playgroud)
在WPF应用程序中添加和删除学生将保存到xml文件.
所以在wpf应用程序学生将是这样的:
public class Student
{
public string Name {get; set;}
public int Score {get; set;}
public DateTime TimeAdded {get; set;}
public string Comment {get; set;}
public Student(string Name, int Score,
DateTime TimeAdded, string Comment) {
this.Name = Name;
this.Score = Score;
this.TimeAdded = TimeAdded;
this.Comment = Comment;
}
} …Run Code Online (Sandbox Code Playgroud) 我有一个xml
<MyRoot>
<ITEM>
<Created>Customer created Aug 22 2011 9:28AM
Contact Details Last Updated Aug 22 2011 9:39AM</Created>
<Name>SomeName</Name>
<Address>High way to hell</Address>
<Phone1>123456</Phone1>
<Phone2></Phone2>
<Mobile>654321</Mobile>
<Email>myemail@gmail.com</Email>
</ITEM>
</MyRoot>
Run Code Online (Sandbox Code Playgroud)
它是xdoc的值([System.RuntimeType] {System.Xml.Linq.XDocument} System.RuntimeType)
当我执行这个:
var items= xdoc.Root.Elements("Item");
Run Code Online (Sandbox Code Playgroud)
我得到了类型的元素
{System.Xml.Linq.XContainer+<GetElements>d__11} System.Type {System.RuntimeType}
Run Code Online (Sandbox Code Playgroud)
和0作为元素的数量.
我怎样才能收集物品?
我几乎将vb中的ASMX中的服务迁移到基于新的WCF 4.0,但我无法运行它,因为我在开始时收到一条消息:
WCF Service Host cannot find any service metadata. This may cause the client application to run improperly. Please check if metadate is enabled. Do you want to exit?
Run Code Online (Sandbox Code Playgroud)
我不知道这个app.config有什么问题.
你能看一下并帮助我吗?
WCF Service Host cannot find any service metadata. This may cause the client application to run improperly. Please check if metadate is enabled. Do you want to exit?
<?xml version="1.0"?>
<configuration>
<configSections>
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<section name="ExtraWS.My.MySettings" requirePermission="false" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> …Run Code Online (Sandbox Code Playgroud) 我需要有一个javascript,它将对象作为json发送到WCF服务以保存它.我有javascript:
<script>
$(document).ready(function(){
$("#submitButton").click(function() {
console.info("executing submitButton click");
TestJSon();
);
});
</script>
<button type="button" id="submitButton">Save</button>
<script>
var varType;
var varUrl;
var varData;
var varContentType;
var varDataType;
var varProcessData;
//Generic function to call AXMX/WCF Service
function CallService()
{
console.log('called CallService')
$.ajax({
type : varType, //GET or POST or PUT or DELETE verb
url : varUrl, // Location of the service
data : varData, //Data sent to server
contentType : varContentType, // content type sent to server
dataType : varDataType, //Expected data …Run Code Online (Sandbox Code Playgroud) c# ×7
.net ×3
winforms ×3
wcf ×2
web-services ×2
coordinates ×1
enums ×1
javascript ×1
json ×1
linq ×1
linq-to-xml ×1
mvvm ×1
sql ×1
tabcontrol ×1
wpf ×1
xml ×1