我的 .xsd 文件中有一个更新查询,如下所示:
UPDATE Factors
SET CodeFactor = @CodeFactor, Date = @Date, MobileNumber = @MobileNumber,
Description= @Description, TotalPrice = @TotalPrice,
ShouldPayPrice = @ShouldPayPrice
WHERE ID = @Original_ID;
SELECT ID, CodeFactor, Date, PersonName, MobileNumber, Description, TotalPrice,
ShouldPayPrice, PaidPrice, Settlement, Kind
FROM Factors
WHERE ID = @Original_ID
ORDER BY Date DESC;
我以如下形式使用它:
Fact.UpdateQuery(txtShomareFactor.Text.Trim(), fdpDate.Text.Trim(),
txtMobile.Text.Trim(), txtSharheKharid.Text,
Convert.ToInt64(txtJameKol.Text.Replace(",", "").Trim()),
Convert.ToInt64(txtMablagheGhabelePardakht.Text.Replace(",", "").Trim()),
IDFactorTOShowDetails);
它会更新除描述列之外的所有列!