@ -19,13 +19,13 @@ namespace BO.Utils
public static class AfterLoginUtil
public static class AfterLoginUtil
{
{
static List < Tuple < string , string > > roleToAssemblies = new List < Tuple < string , string > > ( ) { new Tuple < string , string > ( "排宰员" , @"C:\BwpB3Project\src\B3ButcherManageClient\ButcherOrder\bin\Debug\ButcherOrder" ) ,
new Tuple < string , string > ( "过磅员" , @"C:\BwpB3Project\src\B3ButcherManageClient\ButcherWeight\bin\Debug\ButcherWeight" ) ,
new Tuple < string , string > ( "验质员" , @"C:\BwpB3Project\src\B3ButcherManageClient\QualityAndOrder\bin\Debug\QualityAndOrder" ) , new Tuple < string , string > ( "定级员" , @"C:\BwpB3Project\src\B3ButcherManageClient\WeighAndGrading\bin\Debug\WeighAndGrading" ) , new Tuple < string , string > ( "窒晕员" , @"C:\BwpB3Project\src\B3ButcherManageClient\OrderConfirm\bin\Debug\OrderConfirm" ) } ;
// static List<Tuple<string, string>> roleToAssemblies = new List<Tuple<string, string>>(){new Tuple<string,string>("排宰员", @"C:\BwpB3Project\src\B3ButcherManageClient\ButcherOrder\bin\Debug\ButcherOrder"),
//new Tuple<string,string>("过磅员", @"C:\BwpB3Project\src\B3ButcherManageClient\ButcherWeight\bin\Debug\ButcherWeight"),
// new Tuple<string,string>("验质员", @"C:\BwpB3Project\src\B3ButcherManageClient\QualityAndOrder\bin\Debug\QualityAndOrder"),new Tuple<string,string>("定级员",@"C:\BwpB3Project\src\B3ButcherManageClient\WeighAndGrading\bin\Debug\WeighAndGrading"),new Tuple<string,string>("窒晕员",@"C:\BwpB3Project\src\B3ButcherManageClient\OrderConfirm\bin\Debug\OrderConfirm")};
//static List<Tuple<string, string>> roleToAssemblies = new List<Tuple<string, string>>(){new Tuple<string,string>("排宰员",@"ButcherOrder"),
//new Tuple<string,string>("过磅员",@"ButcherWeight"),
// new Tuple<string,string>("验质员",@"QualityAndOrder"),new Tuple<string,string>("定级员",@"WeighAndGrading"),new Tuple<string,string>("窒晕员",@"OrderConfirm")};
static List < Tuple < string , string > > roleToAssemblies = new List < Tuple < string , string > > ( ) { new Tuple < string , string > ( "排宰员" , @"ButcherOrder" ) ,
new Tuple < string , string > ( "过磅员" , @"ButcherWeight" ) ,
new Tuple < string , string > ( "验质员" , @"QualityAndOrder" ) , new Tuple < string , string > ( "定级员" , @"WeighAndGrading" ) , new Tuple < string , string > ( "窒晕员" , @"OrderConfirm" ) } ;
public static Form CreateForm ( string role )
public static Form CreateForm ( string role )
@ -34,10 +34,10 @@ namespace BO.Utils
if ( first = = null )
if ( first = = null )
throw new Exception ( "未注册的角色" ) ;
throw new Exception ( "未注册的角色" ) ;
//#if debug
//#if debug
var filePath = string . Format ( "{0}.dll" , first . Item2 ) ;
//var filePath = string.Format("{0}.dll", first.Item2);
//#endif
//#endif
//#if !debug
//#if !debug
//var filePath = Path.Combine(Application.StartupPath, string.Format("{0}.dll", first.Item2));
var filePath = Path . Combine ( Application . StartupPath , string . Format ( "{0}.dll" , first . Item2 ) ) ;
//#endif
//#endif
if ( ! File . Exists ( filePath ) )
if ( ! File . Exists ( filePath ) )
throw new Exception ( "相关模块不存在" ) ;
throw new Exception ( "相关模块不存在" ) ;