新增修改班次时间模块

master
zpp 1 year ago
parent d58ae4f823
commit 536e91c2d7

@ -2621,6 +2621,29 @@ left join basedata_nodesetting c on a.CurrNodeId=c.id
return null; ;
}
public static DataTable getShiftTime()
{
StringBuilder strSql = new StringBuilder();
strSql.Append("SELECT t.Shift_Code,t.Shift_Desc,t.Shift_Start_Time,Shift_End_Time from base_shifts_t t where del_flag=0");
DataSet ds = Utils.netClientDBHelper.getDataSet(strSql.ToString());
List<Orderplan> list = new List<Orderplan>();
if (ds.Tables[0].Rows.Count > 0)
{
return ds.Tables[0];
}
return null; ;
}
public static bool ModShiftTime(string Code,string beginTime,string endTime, string Code1, string beginTime1, string endTime1)
{
List<string> sqlList = new List<string>();
string sql=@"update base_shifts_t set Shift_Start_Time='"+ beginTime + "', Shift_End_Time='"+ endTime + "' where del_flag = 0 and Shift_Code = '"+ Code + "'";
string sql1 = @"update base_shifts_t set Shift_Start_Time='" + beginTime1 + "', Shift_End_Time='" + endTime1 + "' where del_flag = 0 and Shift_Code = '" + Code1 + "'";
sqlList.Add(sql); sqlList.Add(sql1);
bool result = Utils.netClientDBHelper.executeBatchSql(sqlList);
return result;
}
/// <summary>
/// 是否存在该小车记录
/// </summary>
@ -3373,5 +3396,7 @@ left join basedata_plcsetting f on a.PlcId5=f.Id
// return list;
// }
}
}

@ -0,0 +1,143 @@
using CentralControl.DBDAO;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using XGL.Data.DBService;
using XGL.Models.Model.FoamingMac;
namespace XGL.Views
{
/// <summary>
/// FormClassesTime.xaml 的交互逻辑
/// </summary>
public partial class FormClassesTime : Window
{
FormingMachineService formingMachineService = new FormingMachineService();
FoamingMacModel _foamingMacModel;
public FormClassesTime()
{
InitializeComponent();
}
public FormClassesTime(FoamingMacModel foamingMac)
{
InitializeComponent();
_foamingMacModel = foamingMac;
}
//DBService ser = new DBService();
private void Window_Loaded(object sender, RoutedEventArgs e)
{
GetHour(); GetMin(); GetAllTime();
}
private void btnOK_Click(object sender, RoutedEventArgs e)
{
string beginTime = cbxhour.Text + ":" + cbxmin.Text;
string endTime = cbxhour1.Text + ":" + cbxmin1.Text;
string beginTime1 = cbxhour2.Text + ":" + cbxmin2.Text;
string endTime1 = cbxhour3.Text + ":" + cbxmin3.Text;
bool i = DBService.ModShiftTime("BC002", beginTime, endTime, "BC001", beginTime1, endTime1);
if (i)
{
MessageBox.Show("更新成功");
}
}
private void GetTime(string beforTime, out string afterHour, out string afterMin)
{
int index = beforTime.IndexOf(':');
afterHour =beforTime.Substring(0, 2);
afterMin = beforTime.Substring(index+1, 2);
}
public void GetAllTime()
{
DataTable dt= DBService.getShiftTime();
string beginHour = "";
string beginMin = "";
string endHour = "";
string endMin = "";
foreach (DataRow dr in dt.Rows)
{
if (dr["Shift_Code"].ToString() == "BC002") //白班
{
GetTime(dr["Shift_Start_Time"].ToString(), out beginHour, out beginMin);
cbxhour.Text = beginHour;
cbxmin.Text = beginMin;
GetTime(dr["Shift_End_Time"].ToString(), out endHour, out endMin);
cbxhour1.Text = endHour;
cbxmin1.Text = endMin;
}
else
{
GetTime(dr["Shift_Start_Time"].ToString(), out beginHour, out beginMin);
cbxhour2.Text = beginHour;
cbxmin2.Text = beginMin;
GetTime(dr["Shift_End_Time"].ToString(), out endHour, out endMin);
cbxhour3.Text = endHour;
cbxmin3.Text = endMin;
}
}
}
public List<string> listMin = new List<string>();
public void GetMin()
{
listMin = new List<string>();
for (int i = 0; i <= 60; i++)
{
string minStr = i.ToString().PadLeft(2, '0');
listMin.Add(minStr);
}
cbxmin.ItemsSource = listMin;
cbxmin1.ItemsSource = listMin;
cbxmin2.ItemsSource = listMin;
cbxmin3.ItemsSource = listMin;
}
public List<string> listHour = new List<string>();
public void GetHour()
{
listHour = new List<string>();
for (int i = 1; i <= 24; i++)
{
string minStr = i.ToString().PadLeft(2, '0'); ;
listHour.Add(minStr);
}
cbxhour.ItemsSource = listHour;
cbxhour1.ItemsSource = listHour;
cbxhour2.ItemsSource = listHour;
cbxhour3.ItemsSource = listHour;
}
private void txtBarcode_TextChanged(object sender, TextChangedEventArgs e)
{
//this.lbMsg.Content = "";
}
private void btnCancel_Click(object sender, RoutedEventArgs e)
{
this.Close();
}
}
}

@ -0,0 +1,384 @@
<Window x:Class="XGL.Views.FormClassesTime"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:convert="clr-namespace:XGL.Tools"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:hc="https://handyorg.github.io/handycontrol" xmlns:localDate="clr-namespace:XGL.Tools"
Height="400" Width="380"
Loaded="Window_Loaded" WindowStartupLocation="CenterScreen" WindowStyle="None">
<Window.Resources>
<ResourceDictionary>
<Style x:Key="RoundButton" TargetType="Button">
<Setter Property="Width" Value="25" />
<Setter Property="Height" Value="25" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Grid>
<Ellipse
Name="GelBackground"
Stroke="Black"
StrokeThickness="1" >
<Ellipse.Fill>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FF34268A" Offset="0.1"></GradientStop>
<GradientStop Color="#FF33288B" Offset="0.5"></GradientStop>
<GradientStop Color="#FF2281D1" Offset="0.9"></GradientStop>
</LinearGradientBrush>
</Ellipse.Fill>
</Ellipse>
<ContentPresenter
Name="GelButtonContent"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Content="{TemplateBinding Content}" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="CustomButtonStyle" TargetType="{x:Type Button}">
<Setter Property="Height" Value="40"></Setter>
<Setter Property="Width" Value="100"></Setter>
<Setter Property="Foreground" Value="White"></Setter>
<Setter Property="FontSize" Value="18"></Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Grid>
<Border
x:Name="border"
Background="#2F82E7"
BorderThickness="0,0,0,3" />
<ContentPresenter
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
RecognizesAccessKey="True"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal" />
<VisualState x:Name="MouseOver">
<Storyboard>
<ColorAnimationUsingKeyFrames Storyboard.TargetName="border" Storyboard.TargetProperty="(Panel.Background).(SolidColorBrush.Color)">
<EasingColorKeyFrame KeyTime="0" Value="#213269" />
</ColorAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<VisualState x:Name="Pressed" />
<VisualState x:Name="Disabled" />
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsFocused" Value="True" />
<Trigger Property="IsDefaulted" Value="True" />
<Trigger Property="IsMouseOver" Value="True" />
<Trigger Property="IsPressed" Value="True" />
<Trigger Property="IsEnabled" Value="False" />
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="CustomCellStyle" TargetType="DataGridCell">
<Setter Property="Foreground" Value="Black" />
<Setter Property="TextBlock.TextAlignment" Value="Center" />
<Setter Property="TextBlock.FontSize" Value="22" />
<Setter Property="BorderThickness" Value="0 0 1 1" />
<Setter Property="BorderBrush" Value="LightGray" />
</Style>
<convert:MyValueConverter x:Key="MyConverter"/>
<convert:SyncFlagConverter x:Key="SyncFlagConverter"/>
<convert:SyncFlagColorConverter x:Key="SyncFlagColorConvert"/>
<!--日历样式-->
<Style TargetType="CalendarDayButton" x:Key="CalendarDayBtnStyle">
<Setter Property="FontSize" Value="18"></Setter>
</Style>
<Style x:Key="calendarWithGotToTodayStyle"
TargetType="{x:Type Calendar}">
<Setter Property="CalendarDayButtonStyle"
Value="{StaticResource CalendarDayBtnStyle}"></Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Calendar}">
<Border>
<StackPanel Orientation="Vertical">
<StackPanel x:Name="PART_Root"
HorizontalAlignment="Center" Background="#FF878787">
<CalendarItem x:Name="PART_CalendarItem"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
Background="{TemplateBinding Background}"
Style="{TemplateBinding CalendarItemStyle}"
Height="{TemplateBinding Height}"
/>
<Grid VerticalAlignment="Center" HorizontalAlignment="Center">
<Grid.RowDefinitions>
<RowDefinition Height="30"></RowDefinition>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="52"></ColumnDefinition>
<ColumnDefinition Width="26"></ColumnDefinition>
<ColumnDefinition Width="52"></ColumnDefinition>
</Grid.ColumnDefinitions>
<TextBlock x:Name="PART_GoToday"
Width="40" Height="20"
Text="今天" FontSize="18" VerticalAlignment="Center" HorizontalAlignment="Center" TextAlignment="Center" Cursor="Hand" Foreground="#FFFFFFFF" />
<TextBlock Grid.Column="2" x:Name="PART_GoClear"
Width="40" Height="20"
Text="清空" FontSize="18" VerticalAlignment="Center" HorizontalAlignment="Center" TextAlignment="Center" Cursor="Hand" Foreground="#FFFFFFFF" />
</Grid>
</StackPanel>
</StackPanel>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!--ComboBox下拉按钮-->
<Style TargetType="ToggleButton" x:Key="ComboxStyleBtn">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate>
<Border x:Name="Back" Background="#F7FDF7" BorderThickness="1" BorderBrush="Transparent">
<Path Name="PathFill" Fill="Blue" Width="8" Height="4" StrokeThickness="0" Data="M5,0 L10,10 L0,10 z" RenderTransformOrigin="0.5,0.5" >
<Path.RenderTransform>
<TransformGroup>
<ScaleTransform/>
<SkewTransform/>
<RotateTransform Angle="180"/>
<TranslateTransform/>
</TransformGroup>
</Path.RenderTransform>
</Path>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="PathFill" Property="Fill" Value="White"></Setter>
<Setter TargetName="Back" Property="Background" Value="#3697A4"></Setter>
<Setter TargetName="Back" Property="BorderBrush" Value="#3697A4"></Setter>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="ComboBox" x:Key="ComboBoxStyle">
<Setter Property="ItemContainerStyle">
<Setter.Value>
<!--ComBoxItem #59CA4F #81D779-->
<Style TargetType="ComboBoxItem">
<Setter Property="Height" Value="60"></Setter>
<Setter Property="MinHeight" Value="22"></Setter>
<Setter Property="MinWidth" Value="60"></Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ComboBoxItem">
<Border Name="Back" Background="Transparent" CornerRadius="5,5,5,5"
RenderTransformOrigin="0.5,0.5" BorderThickness="0,0,0,0" BorderBrush="Blue" >
<ContentPresenter ContentSource="{Binding Source}" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5,0,0,0"></ContentPresenter>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="Back" Property="Background" Value="LightGray"></Setter>
</Trigger>
<Trigger Property="IsHighlighted" Value="True">
<Setter TargetName="Back" Property="Background" Value="LightGray"></Setter>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Setter.Value>
</Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ComboBox">
<Grid Background="#F7FDF7">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.7*"/>
<ColumnDefinition Width="0.3*" MaxWidth="30"/>
</Grid.ColumnDefinitions>
<TextBox x:Name="PART_EditableTextBox" Grid.Column="0" IsReadOnly="{TemplateBinding IsReadOnly}" FontSize="18" VerticalContentAlignment="Center" Text="{TemplateBinding Text}"></TextBox>
<Border Grid.Column="0" BorderThickness="1,1,0,1" BorderBrush="LightGray" CornerRadius="1,0,0,1">
</Border>
<Border Grid.Column="1" BorderThickness="0,1,1,1" BorderBrush="LightGray" CornerRadius="0,1,1,0">
<ToggleButton Style="{StaticResource ComboxStyleBtn}" IsChecked="{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" ClickMode="Press"></ToggleButton>
</Border>
<Popup IsOpen="{TemplateBinding IsDropDownOpen}" Placement="Bottom" x:Name="Popup" Focusable="False" AllowsTransparency="True" PopupAnimation="Slide">
<Border CornerRadius="1" MaxHeight="{TemplateBinding MaxDropDownHeight}" MinWidth="{TemplateBinding ActualWidth}" x:Name="DropDown" SnapsToDevicePixels="True">
<Border.Effect>
<DropShadowEffect Color="Black" BlurRadius="2" ShadowDepth="0" Opacity="0.5"/>
</Border.Effect>
<ScrollViewer Margin="4,6,4,6" Style="{DynamicResource ScrollViewerStyle}" MaxHeight="{TemplateBinding MaxDropDownHeight}" SnapsToDevicePixels="True" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" CanContentScroll="True">
<!-- StackPanel 用于显示子级,方法是将 IsItemsHost 设置为 True -->
<StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Contained" Background="White"/>
</ScrollViewer>
</Border>
</Popup>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="{x:Type ComboBox}">
<Setter Property="Width" Value="120"></Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ComboBox}">
<Border BorderBrush="Gray" BorderThickness="1" CornerRadius="5" Background="White">
<Grid>
<!--下拉箭头-->
<ToggleButton ClickMode="Press" Focusable="False" IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Margin="2" MinWidth="0" MinHeight="0" Width="Auto">
<ToggleButton.Style>
<Style TargetType="{x:Type ToggleButton}">
<Setter Property="MinWidth" Value="0"/>
<Setter Property="MinHeight" Value="0"/>
<Setter Property="Width" Value="Auto"/>
<Setter Property="Height" Value="Auto"/>
<Setter Property="Background" Value="White"/>
<Setter Property="BorderBrush" Value="#00000000"/>
<Setter Property="BorderThickness" Value="2"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ToggleButton}">
<DockPanel Background="{TemplateBinding Background}" LastChildFill="False" SnapsToDevicePixels="True">
<Border x:Name="Border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" DockPanel.Dock="Right" >
<Path Data="M0,0L3.5,4 7,0z" Fill="{TemplateBinding Foreground}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
</DockPanel>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="True">
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlDarkBrushKey}}"/>
</Trigger>
</Style.Triggers>
</Style>
</ToggleButton.Style>
</ToggleButton>
<!--项内容-->
<ContentPresenter IsHitTestVisible="False" Content="{TemplateBinding SelectionBoxItem}" ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}" ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}" VerticalAlignment="Center" Margin="3" />
<!--下拉显示面板HorizontalOffset:设置下拉面板的相对位置-->
<Popup HorizontalOffset="-1" Width="{TemplateBinding ActualWidth}"
IsOpen="{TemplateBinding IsDropDownOpen}" Focusable="False" PopupAnimation="Slide">
<Grid SnapsToDevicePixels="True" HorizontalAlignment="Stretch">
<Border BorderThickness="1,1,1,1" BorderBrush="Gray" CornerRadius="5">
<Border.Background>
<SolidColorBrush Color="White" />
</Border.Background>
</Border>
<ScrollViewer SnapsToDevicePixels="True" HorizontalScrollBarVisibility="Hidden" >
<StackPanel IsItemsHost="True"/>
</ScrollViewer>
</Grid>
</Popup>
</Grid>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
</Window.Resources>
<Grid Background="White" Margin="10">
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid Grid.Row="0" Grid.RowSpan="2">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition Width="30" />
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<GroupBox Grid.Row="0" Grid.RowSpan="2" Grid.ColumnSpan="6" Header="白班" >
</GroupBox>
<Label Grid.Row="0" HorizontalAlignment="Center" VerticalAlignment="Center" Height="30">开始时间</Label>
<ComboBox Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="2" x:Name="cbxhour" Height="30" Width="100" />
<ComboBox Grid.Row="0" Grid.Column="4" Grid.ColumnSpan="2" x:Name="cbxmin" Height="30" Width="100" />
<Label Grid.Row="0" Grid.Column="3" HorizontalAlignment="Center" Height="30" ></Label>
<Label Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center" Height="30" >结束时间</Label>
<ComboBox Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2" x:Name="cbxhour1" Height="30" Width="100" />
<ComboBox Grid.Row="1" Grid.Column="4" Grid.ColumnSpan="2" x:Name="cbxmin1" Height="30" Width="100" />
<Label Grid.Row="1" Grid.Column="3" HorizontalAlignment="Center" Height="30" ></Label>
</Grid>
<!--<TextBox Grid.Row="0" x:Name="txtBarcode" FontSize="18" Width="80" Height="30" VerticalContentAlignment="Center" TextChanged="txtBarcode_TextChanged" Margin="87,27,233,23"/>-->
<Grid Grid.Row="2" Grid.RowSpan="2">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition Width="30"/>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<GroupBox Grid.Row="0" Grid.RowSpan="2" Grid.ColumnSpan="6" Header="夜班" >
</GroupBox>
<Label Grid.Row="0" HorizontalAlignment="Center" VerticalAlignment="Center" Height="30">开始时间</Label>
<ComboBox Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="2" x:Name="cbxhour2" Height="30" Width="100" />
<ComboBox Grid.Row="0" Grid.Column="4" Grid.ColumnSpan="112" x:Name="cbxmin2" Height="30" Width="100" />
<Label Grid.Row="0" Grid.Column="3" HorizontalAlignment="Center" Height="30" ></Label>
<Label Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center" Height="30" >结束时间</Label>
<ComboBox Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2" x:Name="cbxhour3" Height="30" Width="100" />
<ComboBox Grid.Row="1" Grid.Column="4" Grid.ColumnSpan="2" x:Name="cbxmin3" Height="30" Width="100" />
<Label Grid.Row="1" Grid.Column="3" HorizontalAlignment="Center" Height="30" ></Label>
</Grid>
<StackPanel Grid.Row="4" VerticalAlignment="Center" HorizontalAlignment="Left" Orientation="Horizontal">
<Button
x:Name="btnOK"
Width="100"
Height="40"
Margin="60,0,0,0"
Background="#2F82E7"
Content="确定"
FontSize="20"
Foreground="White"
IsCancel="True" Click="btnOK_Click" />
<Button
x:Name="btnCancel"
Width="100"
Height="40"
Margin="60,0,0,0"
Background="#2F82E7"
Content="取消"
FontSize="20"
Foreground="White"
IsCancel="True" Click="btnCancel_Click"/>
</StackPanel>
</Grid>
</Window>

@ -13,8 +13,10 @@
<UserControl.Resources>
<ResourceDictionary>
<!--<ResourceDictionary.MergedDictionaries>
--><!--<hc:ThemeResources />
<hc:Theme />--><!--
-->
<!--<hc:ThemeResources />
<hc:Theme />-->
<!--
</ResourceDictionary.MergedDictionaries>-->
<Style x:Key="RoundButton" TargetType="Button">
<Setter Property="Width" Value="25" />
@ -271,7 +273,7 @@
FontSize="22"
FontWeight="Bold"
Text="准备清单" VerticalAlignment="Center"/>
</StackPanel>
</StackPanel>
</Label>
<Label Content="请选择日期:" VerticalContentAlignment="Center" FontSize="16" Margin="0,5,0,0" VerticalAlignment="Center" Foreground="Gray" FontWeight="Bold" Width="136" BorderThickness="0" Background="Transparent" Height="38"></Label>
<localDate:UserDatePicker x:Name="dateStart" FontSize="18" Margin="0,10,0,0" VerticalAlignment="Center" AlternativeCalendarStyle="{StaticResource calendarWithGotToTodayStyle}"
@ -284,10 +286,11 @@
</StackPanel>
<Button x:Name="btnRefresh" Content="查询" Grid.Row="0" Margin="20,10,0,0" Width="105" Height="40" Foreground="White" FontSize="20"
Grid.Column="1" Background="#2F82E7" Click="btnRefresh_Click"></Button>
<Button x:Name="btnClassesTime" Content="提前生产班次时间" Margin="40,10,0,0" Width="185" Height="40" Foreground="White" FontSize="20"
Background="#2F82E7" Click="btnClassesTime_Click"/>
<!--<Button x:Name="btnQueryLog" Content="查询" Foreground="White" Margin="20,0,0,0" FontSize="18" Background="#2B7EE6" Width="100" Height="30" Click="btnRefresh_Click"/>-->
</StackPanel>
<DataGrid
x:Name="dgMaterialInfo"
Grid.Row="1"
@ -364,7 +367,7 @@
</Button.Template>
</Button>
</Grid>
<!--<Button
x:Name="btnStartOrders"
@ -394,8 +397,8 @@
FontSize="22"
FontWeight="Bold"
Text="工单" />
</StackPanel>
</Label>
</StackPanel>
</Label>
</StackPanel>
<!--<Button x:Name="btnRefresh" Content="刷新" Grid.Row="0"
Grid.Column="1" Style="{StaticResource CustomButtonStyle}" Click="btnRefresh_Click"></Button>-->
@ -500,7 +503,7 @@
</Style>
</DataGridTextColumn.ElementStyle>
</DataGridTextColumn>
<DataGridTextColumn Visibility="Hidden"
Width="150"
Binding="{Binding workorder_id}"
@ -510,17 +513,17 @@
Width="250"
Binding="{Binding workorder_code}"
Header="订单码" />
<DataGridTextColumn
Width="1350"
Binding="{Binding prod_line_code}"
Header="设备" />
<DataGridTextColumn
Width="250"
Binding="{Binding id}"

@ -490,6 +490,13 @@ namespace XGL.Views
GetWorkOrder();
}
private void btnClassesTime_Click(object sender, RoutedEventArgs e)
{
FormClassesTime timeForm = new FormClassesTime();
timeForm.ShowDialog();
}
/// <summary>
/// 增加序号
/// </summary>

Loading…
Cancel
Save