0
我正在使用多語言項目。在這種情況下,當我改變語言時,數據表中的數字也會改變。我想限制這種變化。這裏是我的代碼限制數據表以改變文化
public DataSet ExportFarmers(CustomerAssignmentDataModel searchDataModel)
{
SqlParameter[] param = new SqlParameter[8];
param[0] = new SqlParameter("@UserId", searchDataModel.UserId);
param[1] = new SqlParameter("@LanguageId", searchDataModel.LanguageId);
param[2] = new SqlParameter("@BusinessUnitIds", string.IsNullOrEmpty(searchDataModel.BusinessUnitIds) ? "0" : searchDataModel.BusinessUnitIds);
param[3] = new SqlParameter("@ZoneIds", string.IsNullOrEmpty(searchDataModel.ZoneIds) ? "0" : searchDataModel.ZoneIds);
param[4] = new SqlParameter("@RegionIds", string.IsNullOrEmpty(searchDataModel.RegionIds) ? "0" : searchDataModel.RegionIds);
param[5] = new SqlParameter("@TerritoryIds", string.IsNullOrEmpty(searchDataModel.TerritoryIds) ? "0" : searchDataModel.TerritoryIds);
param[6] = new SqlParameter("@VillageIds", searchDataModel.VillageIds == "null" ? "0" : searchDataModel.VillageIds);
param[7] = new SqlParameter("@CustomerTypeId", searchDataModel.CustomerTypeId);
DataSet ds = DbHelper.ExecuteSQLSPToGetDataSet("SpExportFarmers", param);
ds.Tables[0].TableName = "Farmer";
ds.Tables[1].TableName = "Farmer Crop";
ds.AcceptChanges();
return ds;
}
在這個數據表中有一列在那裏,它根據文化來改變格式。但我想限制。
目前尚不清楚在這裏被問到。什麼是輸入,預期輸出和當前輸出? – rene
當前輸出是有一列有十進制值45,000000,但在存儲過程中它是45.000000.So預期輸出是45.00000 –
如果這是一個數字數據類型,那麼你只在看文化設置的差異,當你的數據被表示。這不是應該或可以在數據集或數據表中解決的問題。這是需要由UI處理的演示文稿問題。 – rene