Merge branch 'master' of http://www.scserverddns.top:13000/sc/formula_manage
This commit is contained in:
commit
589a453438
4 files changed
+58
-55
No files matched your search
@@ -12,38 +12,6 @@ namespace formula_manage
|
|||||||
/// <typeparam name="T"></typeparam>
|
/// <typeparam name="T"></typeparam>
|
||||||
public interface IProvider<T> where T : class
|
public interface IProvider<T> where T : class
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// 查询所有记录
|
|
||||||
/// </summary>
|
|
||||||
/// <returns></returns>
|
|
||||||
List<T> Select();
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 查询一条记录
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="t"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
List<T> Selectsql(T t);
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 插入一条记录
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="t"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
int Insert(T t);
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 修改一条记录
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="t"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
int Update(T t);
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 删除一条记录
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="t"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
int Delete(T t);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+4
-4
@@ -66,8 +66,8 @@
|
|||||||
<TextBox x:Name="Anew" HorizontalAlignment="Left" Height="30" Margin="300,35,0,0" TextWrapping="Wrap" Text="0" VerticalAlignment="Top" Width="30" FontSize="20"
|
<TextBox x:Name="Anew" HorizontalAlignment="Left" Height="30" Margin="300,35,0,0" TextWrapping="Wrap" Text="0" VerticalAlignment="Top" Width="30" FontSize="20"
|
||||||
MaxLines="1" MaxLength="2" PreviewTextInput="Tb_KeyPress" InputMethod.IsInputMethodEnabled="False" Focusable ="False"/>
|
MaxLines="1" MaxLength="2" PreviewTextInput="Tb_KeyPress" InputMethod.IsInputMethodEnabled="False" Focusable ="False"/>
|
||||||
<TextBox HorizontalAlignment="Left" Height="30" Margin="95,105,0,0" TextWrapping="Wrap" Text="" VerticalAlignment="Top" Width="200" FontSize="20" KeyUp="SearchBox_OnKeyDownd" IsTabStop="False"/>
|
<TextBox HorizontalAlignment="Left" Height="30" Margin="95,105,0,0" TextWrapping="Wrap" Text="" VerticalAlignment="Top" Width="200" FontSize="20" KeyUp="SearchBox_OnKeyDownd" IsTabStop="False"/>
|
||||||
<ComboBox x:Name="Machine" DisplayMemberPath="Name" HorizontalAlignment="Left" Height="30" Margin="95,140,0,0" VerticalAlignment="Top" Width="130" FontSize="20" KeyUp="SearchBox_OnKeyDownd" IsEditable="True"/>
|
<ComboBox x:Name="Machine" DisplayMemberPath="Name" HorizontalAlignment="Left" Height="30" Margin="95,140,0,0" VerticalAlignment="Top" Width="120" FontSize="20" KeyUp="SearchBox_OnKeyDownd" IsEditable="True"/>
|
||||||
<ComboBox x:Name="OrderType" Text="正常单" HorizontalAlignment="Left" Height="30" Margin="95,175,0,0" VerticalAlignment="Top" Width="130" FontSize="20" IsTabStop="True" KeyUp="SearchBox_OnKeyDownd" IsEditable="True">
|
<ComboBox x:Name="OrderType" Text="正常单" HorizontalAlignment="Left" Height="30" Margin="95,175,0,0" VerticalAlignment="Top" Width="120" FontSize="20" IsTabStop="True" KeyUp="SearchBox_OnKeyDownd" IsEditable="True">
|
||||||
<ComboBoxItem Content="正常单"></ComboBoxItem>
|
<ComboBoxItem Content="正常单"></ComboBoxItem>
|
||||||
<ComboBoxItem Content="追加单"></ComboBoxItem>
|
<ComboBoxItem Content="追加单"></ComboBoxItem>
|
||||||
</ComboBox>
|
</ComboBox>
|
||||||
@@ -158,8 +158,8 @@
|
|||||||
<DataGridTemplateColumn Header="原料代码" Width="200" MaxWidth="400" MinWidth="100" IsReadOnly="False">
|
<DataGridTemplateColumn Header="原料代码" Width="200" MaxWidth="400" MinWidth="100" IsReadOnly="False">
|
||||||
<DataGridTemplateColumn.CellTemplate>
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<ComboBox x:Name="CP_PRODUCT_CODE" BorderThickness="0,0,0,0" ItemsSource="{Binding Path=RRODUCTdataTable}" DisplayMemberPath="{Binding ProductCode}" BorderBrush="{x:Null}" Background="{x:Null}" IsEditable="True" KeyDown="CP_PRODUCT_CODE_KeyUp"
|
<ComboBox x:Name="CP_PRODUCT_CODE" BorderThickness="0,0,0,0" ItemsSource="{Binding RRODUCTdataTable}" DisplayMemberPath="{Binding Path=ProductCode}" BorderBrush="{x:Null}" Background="{x:Null}" IsEditable="True" KeyDown="CP_PRODUCT_CODE_KeyUp"
|
||||||
SelectedItem="{Binding Path=G_TypeNameDicNoStr}" >
|
>
|
||||||
</ComboBox>
|
</ComboBox>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</DataGridTemplateColumn.CellTemplate>
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
|
|||||||
@@ -105,8 +105,60 @@ namespace formula_manage
|
|||||||
}
|
}
|
||||||
|
|
||||||
Grid_RRODUCT.ItemsSource = RRODUCTdataTable.DefaultView;
|
Grid_RRODUCT.ItemsSource = RRODUCTdataTable.DefaultView;
|
||||||
|
|
||||||
|
this.DataContext = STUFFdataTable;
|
||||||
|
|
||||||
|
|
||||||
|
/* DataGridTemplateColumn tempColumn = Grid_RRODUCT.Columns[1] as DataGridTemplateColumn;
|
||||||
|
FrameworkElement element1 = Grid_RRODUCT.Columns[1].GetCellContent(Grid_RRODUCT.Items[1]);
|
||||||
|
System.Windows.Controls.ComboBox comboBox1 = tempColumn.CellTemplate.FindName("CP_PRODUCT_CODE", element1) as System.Windows.Controls.ComboBox;
|
||||||
|
|
||||||
|
comboBox1.ItemsSource = STUFFdataTable.DefaultView;*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* private int g_TypeNameDicNo; //枪型号名
|
||||||
|
|
||||||
|
public int G_TypeNameDicNo
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return g_TypeNameDicNo;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
g_TypeNameDicNo = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public string G_TypeNameDicNoStr
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return gunNameTypeDic[g_TypeNameDicNo]; //查找Dictionary返回它的Value
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
int selectedIndex = 0;
|
||||||
|
foreach (KeyValuePair<int, string> pair in gunNameTypeDic)
|
||||||
|
{
|
||||||
|
if (pair.ToString().Equals(value)) //对比键值对
|
||||||
|
{
|
||||||
|
selectedIndex = pair.Key;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
G_TypeNameDicNo = selectedIndex;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private Dictionary<int, string> gunNameTypeDic;
|
||||||
|
public Dictionary<int, string> GunNameTypeDic
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return gunNameTypeDic;
|
||||||
|
}
|
||||||
|
}*/
|
||||||
|
|
||||||
private async void sql_()
|
private async void sql_()
|
||||||
{
|
{
|
||||||
UserClass.IniFile.IniFiles Configini = new UserClass.IniFile.IniFiles(INIPath);//生效配置读取
|
UserClass.IniFile.IniFiles Configini = new UserClass.IniFile.IniFiles(INIPath);//生效配置读取
|
||||||
|
|||||||
@@ -15,16 +15,6 @@ namespace formula_manage.ViewModel
|
|||||||
///</Summary>
|
///</Summary>
|
||||||
public class RRODUCTiewModel : ViewModelBase
|
public class RRODUCTiewModel : ViewModelBase
|
||||||
{
|
{
|
||||||
// private List<RRODUCT> products = new List<RRODUCT>();
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///
|
|
||||||
/// </summary>
|
|
||||||
/* public List<RRODUCT> RRODUCT
|
|
||||||
{
|
|
||||||
|
|
||||||
}*/
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// StuffViewModeldl
|
/// StuffViewModeldl
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -41,15 +31,8 @@ namespace formula_manage.ViewModel
|
|||||||
|
|
||||||
void Tick_Event(object sender, EventArgs e)//Tick_Event周期执行事件
|
void Tick_Event(object sender, EventArgs e)//Tick_Event周期执行事件
|
||||||
{
|
{
|
||||||
// if (Stuff.Button_sql == true)//获取按钮状态
|
|
||||||
{
|
|
||||||
// if (Stuff.Buttontype_sql == -1) Product = new ProductProvider().Select();
|
|
||||||
// if (Stuff.Buttontype_sql == 0) Product = new ProductProvider().Selects0();
|
|
||||||
// if (Stuff.Buttontype_sql == 1) Product = new ProductProvider().Selects1();
|
|
||||||
// if (Stuff.Buttontype_sql == 2) Product = new ProductProvider().Selects2();
|
|
||||||
// if (Stuff.Buttontype_sql == 3) Product = new ProductProvider().Selects3();
|
|
||||||
// Stuff.Button_sql = false;//清除按钮状态
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user