Merge branch 'master' of http://www.scserverddns.top:13000/sc/formula_manage
This commit is contained in:
commit
9cc6f92ae2
3 files changed
+8
-7
No files matched your search
+1
-1
@@ -97,7 +97,7 @@
|
||||
HorizontalGridLinesBrush="#FFC9C9C9" VerticalGridLinesBrush="#FFC9C9C9" GridLinesVisibility="All" BorderBrush="#CCCCCC"
|
||||
BorderThickness="1,1,1,1" ColumnHeaderHeight="40" HorizontalContentAlignment="Right" Grid.ColumnSpan="2"
|
||||
CanUserReorderColumns="False" CanUserSortColumns="False" CanUserResizeRows="False"
|
||||
CanUserAddRows="False" CanUserDeleteRows="False"
|
||||
CanUserAddRows="False" CanUserDeleteRows="False" HeadersVisibility ="Column"
|
||||
Background="White" SelectionMode="Single" FontSize="15" >
|
||||
<DataGrid.RowStyle >
|
||||
<Style TargetType="{x:Type DataGridRow}">
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@
|
||||
HorizontalGridLinesBrush="#FFC9C9C9" VerticalGridLinesBrush="#FFC9C9C9" GridLinesVisibility="All" BorderBrush="#CCCCCC"
|
||||
BorderThickness="1,1,1,1" ColumnHeaderHeight="40" HorizontalContentAlignment="Right" Grid.ColumnSpan="2"
|
||||
CanUserResizeRows="False" CanUserAddRows="False" CanUserDeleteRows="False" CanUserReorderColumns="False"
|
||||
CanUserResizeColumns="False" CanUserSortColumns="False">
|
||||
CanUserResizeColumns="False" CanUserSortColumns="False" HeadersVisibility ="Column">
|
||||
<DataGrid.RowStyle >
|
||||
<Style TargetType="{x:Type DataGridRow}">
|
||||
<Style.Triggers>
|
||||
|
||||
@@ -27,10 +27,9 @@ namespace formula_manage.Windows
|
||||
/// </summary>
|
||||
public partial class Stuff : Window
|
||||
{
|
||||
|
||||
public string INIPath = Convert.ToString(System.AppDomain.CurrentDomain.BaseDirectory) + "formula.ini"; //配置文件路径
|
||||
int Button_ID = 0;
|
||||
|
||||
int Button_ID = 0;
|
||||
string TEXT_SQLIP;
|
||||
string TEXT_SQLNAME;
|
||||
string TEXT_SQMOD;
|
||||
@@ -89,7 +88,7 @@ namespace formula_manage.Windows
|
||||
/// </summary>
|
||||
private void DataGridEquipment_LoadingRow(object sender, DataGridRowEventArgs e)
|
||||
{
|
||||
// e.Row.Header = e.Row.GetIndex() + 1;
|
||||
e.Row.Header = e.Row.GetIndex() + 1;
|
||||
}
|
||||
|
||||
private void Radiobutton(object sender, EventArgs e)
|
||||
@@ -123,7 +122,10 @@ namespace formula_manage.Windows
|
||||
}
|
||||
}
|
||||
|
||||
private async void GridSql(int e ) //查询数据库事件
|
||||
/// <summary>
|
||||
/// 查询数据库的方法
|
||||
/// </summary>
|
||||
private async void GridSql(int e )
|
||||
{
|
||||
string Stuff_sql = null;
|
||||
if (e == 0) Stuff_sql = "SELECT ProductCode ,ProductName , Price , SUPPLIER ,ProductType ,Color ,Concentration , GRAVITY FROM [Dispensing].[dbo].[PRODUCT]";//查询语句
|
||||
@@ -250,7 +252,6 @@ namespace formula_manage.Windows
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Stuff_sql = string.Format("UPDATE [dbo].[PRODUCT] SET ProductName='" + Product_Name + "',Price='" + _Price + "',SUPPLIER='" + _SUPPLIER + "',ProductType=" + int_stuff_ProductType + ",Color=" + ColorCode_SQL + ",Concentration=" + _Concentration + ",GRAVITY=" + _GRAVITY + " Where ProductCode='"+ Product_Code+"'");
|
||||
await conn_SC.OpenAsync(); //打开数据连接
|
||||
SqlCommand INSERT_cmd = new SqlCommand(Stuff_sql, conn_SC);
|
||||
|
||||
Reference in new issue
Block a user