我想从案例语句中删除硬代码值。现在我正在为不同的用户提供一些硬代码值,例如
ScheduledUtility.ClsISession.OpenSession();
switch (Convert.ToString(System.Security.Principal.WindowsIdentity.GetCurrent().Name))
{
case @"suniln":
AP.ClsBatchInvoice objBatchInvoice = new AP.ClsBatchInvoice(ScheduledUtility.ClsISession.mySession);
objBatchInvoice.ReportId = new Guid("6D783F3C-206C-6576-7273-696F6E3D2231");
objBatchInvoice.PDFFileName = "BatchInvoice";
objBatchInvoice.VBatchInvoice();
break;
case @"vijayk":
VendorInvoice_svc objvendor = new VendorInvoice_svc(objsession.mySession);
objvendor.GetVenderReports();
AP.Aging_svc objaging = new AP.Aging_svc(ScheduledUtility.ClsISession.mySession);
objaging.viewerRptAging_Load();
break;
如何编写案例值并从中获取environment.username
?