Browse Source

业务调整。

master
yibo 6 years ago
parent
commit
f19879602a
4 changed files with 14 additions and 15 deletions
  1. +2
    -2
      B3DealerClient/Windows/CarcassInStoreWindow_/CarcassInStoreContext.cs
  2. +1
    -0
      B3DealerClient/Windows/CarcassSaleOutWindow_/CarcassSaleOutContext.cs
  3. +4
    -4
      B3DealerClient/Windows/FreshInStoreWindow_/FreshInStoreContext.cs
  4. +7
    -9
      B3DealerClient/Windows/FreshInStoreWindow_/FreshInStoreWindow.xaml.cs

+ 2
- 2
B3DealerClient/Windows/CarcassInStoreWindow_/CarcassInStoreContext.cs View File

@ -9,7 +9,7 @@ namespace B3DealerClient.Windows.CarcassInStoreWindow_
{ {
public class CarcassInStoreContext : NotificationObject public class CarcassInStoreContext : NotificationObject
{ {
private DateTime? mDate = DateTime.Today;
private DateTime? mDate;
public DateTime? Date public DateTime? Date
{ {
@ -21,7 +21,7 @@ namespace B3DealerClient.Windows.CarcassInStoreWindow_
} }
} }
private DateTime? mArrivedDate;
private DateTime? mArrivedDate = DateTime.Today;
public DateTime? ArrivedDate public DateTime? ArrivedDate
{ {


+ 1
- 0
B3DealerClient/Windows/CarcassSaleOutWindow_/CarcassSaleOutContext.cs View File

@ -106,6 +106,7 @@ namespace B3DealerClient.Windows.CarcassSaleOutWindow_
mDmo = value; mDmo = value;
RaisePropertyChanged("Dmo"); RaisePropertyChanged("Dmo");
RaisePropertyChanged("CanSave"); RaisePropertyChanged("CanSave");
RaisePropertyChanged("CanDelete");
} }
} }


+ 4
- 4
B3DealerClient/Windows/FreshInStoreWindow_/FreshInStoreContext.cs View File

@ -9,7 +9,7 @@ namespace B3DealerClient.Windows.FreshInStoreWindow_
{ {
class FreshInStoreContext : NotificationObject class FreshInStoreContext : NotificationObject
{ {
private DateTime? mDate = DateTime.Today;
private DateTime? mDate;
public DateTime? Date public DateTime? Date
{ {
@ -21,7 +21,7 @@ namespace B3DealerClient.Windows.FreshInStoreWindow_
} }
} }
private DateTime? mArrivedDate;
private DateTime? mArrivedDate = DateTime.Today;
public DateTime? ArrivedDate public DateTime? ArrivedDate
{ {
@ -37,7 +37,7 @@ namespace B3DealerClient.Windows.FreshInStoreWindow_
public NameIDPair Supplier { get { return mSupplier; } } public NameIDPair Supplier { get { return mSupplier; } }
private NameIDPair mStore = new NameIDPair(); private NameIDPair mStore = new NameIDPair();
public NameIDPair Store { get { return mStore; } }
public NameIDPair Store { get { return mStore; } }
private decimal? mPics; private decimal? mPics;
public decimal? Pics public decimal? Pics
@ -81,6 +81,6 @@ namespace B3DealerClient.Windows.FreshInStoreWindow_
} }
} }
public bool CanSave { get { return Pics > 0 && mDetail != null; } }
public bool CanSave { get { return Pics > 0 && mDetail != null; } }
} }
} }

+ 7
- 9
B3DealerClient/Windows/FreshInStoreWindow_/FreshInStoreWindow.xaml.cs View File

@ -170,20 +170,18 @@ namespace B3DealerClient.Windows.FreshInStoreWindow_
foreach (var item in context.Dmo.Details) foreach (var item in context.Dmo.Details)
{ {
var record = new FreshInStore_Record(); var record = new FreshInStore_Record();
record.DetailID = item.ID;
record.Number = item.SecondNumber; record.Number = item.SecondNumber;
record.Weight = item.Number; record.Weight = item.Number;
InsertRecord(record);
InsertRecord(record, item);
} }
} }
private void FillByDetailBtn_PreviewMouseDown(object sender, MouseButtonEventArgs e) private void FillByDetailBtn_PreviewMouseDown(object sender, MouseButtonEventArgs e)
{ {
var record = new FreshInStore_Record(); var record = new FreshInStore_Record();
record.DetailID = context.Detail.ID;
record.Number = context.Detail.SecondNumber; record.Number = context.Detail.SecondNumber;
record.Weight = context.Detail.Number; record.Weight = context.Detail.Number;
InsertRecord(record);
InsertRecord(record, context.Detail);
} }
private void FinishBtn_PreviewMouseDown(object sender, MouseButtonEventArgs e) private void FinishBtn_PreviewMouseDown(object sender, MouseButtonEventArgs e)
@ -199,18 +197,18 @@ namespace B3DealerClient.Windows.FreshInStoreWindow_
private void SaveBtn_PreviewMouseDown(object sender, MouseButtonEventArgs e) private void SaveBtn_PreviewMouseDown(object sender, MouseButtonEventArgs e)
{ {
var record = new FreshInStore_Record(); var record = new FreshInStore_Record();
record.DetailID = context.Detail.ID;
record.Number = context.Pics; record.Number = context.Pics;
record.Weight = context.Weight; record.Weight = context.Weight;
InsertRecord(record);
InsertRecord(record, context.Detail);
} }
void InsertRecord(FreshInStore_Record record)
void InsertRecord(FreshInStore_Record record, FreshInStore_Detail detail)
{ {
record.BillID = context.Dmo.ID; record.BillID = context.Dmo.ID;
record.DetailID = detail.ID;
FreshInStoreBL.InsertRecord(record); FreshInStoreBL.InsertRecord(record);
context.Detail.AlreadyNumber = record.Weight;
context.Detail.AlreadySecondNumber = record.Number;
detail.AlreadyNumber = record.Weight;
detail.AlreadySecondNumber = record.Number;
} }
} }
} }

Loading…
Cancel
Save