@ -99,7 +99,8 @@ namespace CowOutputClient
inStoreTypeId = long . Parse ( ConfigurationManager . AppSettings [ "InStoreType_ID1" ] ) ;
else
inStoreTypeId = long . Parse ( ConfigurationManager . AppSettings [ "InStoreType_ID2" ] ) ;
var list = RpcFacade . Call < List < long? > > ( "/MainSystem/B3_HaoYue/Rpcs/B3CowButcherManageRpc/CreateOutput" , output , mTeam . ProductTeam_ID , false , null , mTeam . Name , inStoreTypeId ) ;
var list = RpcFacade . Call < List < long? > > ( "/MainSystem/B3_HaoYue/Rpcs/B3CowButcherManageRpc/CreateOutput" , output , mTeam . ProductTeam_ID , false , null , mTeam . Name , inStoreTypeId ) ;
if ( list . Count ( ) > 0 ) {
var outputId = list [ 0 ] . Value ;
WeightInfoBL . UpdateOutputId ( selectedItems . Select ( x = > x . ID ) . ToArray ( ) , outputId ) ;
@ -395,9 +396,9 @@ namespace CowOutputClient
if ( combProductBatch . SelectedValue = = null )
throw new ApplicationException ( "请选择分割生产批次" ) ;
var netWeight = WeightInfoBL . GetButcDetailIDWeight ( selectedItem . DetailID ) ;
var weightInfos = WeightInfoBL . GetWeightInfosByDetailId ( selectedItem . DetailID ) ;
RpcObject output = null ;
if ( netWeight ! = null ) {
if ( weightInfos . Count > 0 ) {
output = new RpcObject ( "/MainSystem/B3CowButcherManage/BO/Output" ) ;
output . Set < long? > ( "AccountingUnit_ID" , long . Parse ( accountingUnit_ID ) ) ;
output . Set < long? > ( "Department_ID" , wpfUser . Department_ID ) ;
@ -408,16 +409,24 @@ namespace CowOutputClient
output . Set < string > ( "Product_Batch" , batch . Batch ) ;
output . Set < DateTime ? > ( "Date" , DateTime . Now ) ;
output . Set < long? > ( "ProductTeam_ID" , mTeam . ProductTeam_ID ) ;
var details = new ManyList ( "/MainSystem/B3CowButcherManage/BO/Output_Detail" ) ;
var inputDetail = new RpcObject ( "/MainSystem/B3CowButcherManage/BO/Output_Detail" ) ;
inputDetail . Set < long? > ( "Goods_ID" , selectedItem . Goods_ID ) ;
inputDetail . Set < decimal? > ( "Number" , netWeight ) ;
inputDetail . Set < long? > ( "ButcDetailID" , selectedItem . DetailID ) ;
details . Add ( inputDetail ) ;
foreach ( var item in weightInfos ) {
var inputDetail = new RpcObject ( "/MainSystem/B3CowButcherManage/BO/Output_Detail" ) ;
inputDetail . Set < long? > ( "Goods_ID" , item . Goods_ID ) ;
inputDetail . Set < decimal? > ( "Number" , item . NetWeight ) ;
inputDetail . Set < decimal? > ( "SecondNumber" , item . SecondNum ) ;
inputDetail . Set < long? > ( "ButcDetailID" , item . ButcDetailID ) ;
inputDetail . Set < decimal? > ( "ProductNum" , item . ProductNum ) ;
details . Add ( inputDetail ) ;
}
output . Set ( "Details" , details ) ;
}
var list = RpcFacade . Call < List < long? > > ( "/MainSystem/B3_HaoYue/Rpcs/B3CowButcherManageRpc/CreateOutput" , output , mTeam . ProductTeam_ID , true , selectedItem . DetailID , mTeam . Name ) ;
long? inStoreTypeId = null ;
if ( btnYesOrNo . Content . ToString ( ) = = "是" )
inStoreTypeId = long . Parse ( ConfigurationManager . AppSettings [ "InStoreType_ID1" ] ) ;
else
inStoreTypeId = long . Parse ( ConfigurationManager . AppSettings [ "InStoreType_ID2" ] ) ;
var list = RpcFacade . Call < List < long? > > ( "/MainSystem/B3_HaoYue/Rpcs/B3CowButcherManageRpc/CreateOutput" , output , mTeam . ProductTeam_ID , true , selectedItem . DetailID , mTeam . Name , inStoreTypeId ) ;
if ( list = = null ) {
ProductPlanBL . UpdateButhcerDetailFinish ( selectedItem . DetailID ) ;
var butDetails = gridProductPlan . ItemsSource as List < ButcherDetailData > ;
@ -608,5 +617,11 @@ namespace CowOutputClient
btn . Content = btn . Content . ToString ( ) = = "是" ? "否" : "是" ;
}
}
private void Remark_Click_1 ( object sender , RoutedEventArgs e )
{
var btn = sender as Button ;
MessageBox . Show ( btn . Content . ToString ( ) , "提示:" , MessageBoxButton . OK ) ;
}
}
}