晕死了,我看到啊,图片地址http://photo.store.qq.com/http_imgload.cgi?/rurl2=481f5cfee975d1e412b8471115d559cd1cf8d7b7ad3d03fecfd6b79bf0fd42176788c35c6a0550e18bc5cfe1fdc68484da4aea659e4341d5d426444cb98bbd2aeaf121be16016cc4fbf2a0dcbecdc8f3899a225f
拜托老大门看下啊
拜托老大门看下啊
拜托老大门看下啊
拜托老大门看下啊
要不你多发点代码,要不你自己仔细检查一下是不是这里出错。
private DataSet dsView;
private void btnExlt_Click(object sender, System.EventArgs e)
{
this.Close();
} private void frmAddBook_Load(object sender, System.EventArgs e)
{
AddSortDB ad = new AddSortDB();
ds = ad.load();
this.cboSort.DataSource = ds.Tables["bookSort"];
this.cboSort.DisplayMember = ds.Tables["bookSort"].Columns["类别名称"].ToString();
this.cboSort.SelectedIndex=0;
AddBookDB ab = new AddBookDB();
dsView = ab.load();
this.dbgBook.DataSource = dsView;
this.dbgBook.DataMember = "view_SortBooks";
}
public string sortName
{
get
{
return this.cboSort.SelectedItem.ToString();
}
}
public object objAddBook
{
get
{
return this;
}
}
public string Code
{
get
{
return this.txtCode.Text;
}
}
public string bName
{
get
{
return this.txtBookName.Text;
}
}
public string Author
{
get
{
return this.txtAuthor.Text;
}
}
public string Company
{
get
{
return this.txtCompany.Text;
}
}
public decimal Price
{
get
{
return Convert.ToDecimal(this.txtPrice.Text);
}
}
public int Num
{
get
{
return Convert.ToInt32(this.txtNum.Text);
}
} private void btnAdd_Click(object sender, EventArgs e)
{
AddBookDB ad = new AddBookDB();
ad.addBooks(this);
ad.load();
}
}
}所有代码中都没有涉及到DateTime...昨天开始也是这问题,后来不知怎么就好了
return Decimal.Parse(txtPrice.Text);
邮箱也可以[email protected]
一样的错,试过了,正在发邮件,数据库是SqlServer2000
return Convert.ToDecimal(this.txtPrice.Text);
这句出错么?
你加个断点看下this.txtPrice.Text 的值 看是不是不能转成Decimal
{
get
{
return Convert.ToDecimal(this.txtPrice.Text.trim());
}
} 怀疑为空格!
{
get
{
return Convert.ToDecimal(this.txtPrice.Text.trim());
}
} h怀疑为空格!
return Convert.ToDecimal(this.txtPrice.Text.trim());