public ArrayList Upload(MpUserInfo mu, IList<UploadDNInfo> lstUploadDNInfo) { string firstDnNo = lstUploadDNInfo[0].DeliveryNo; string methodName = System.Reflection.MethodBase.GetCurrentMethod().Name; logger.DebugFormat("BEGIN: {0}(DN No:{1} Station:{2} Line:{3} Editor:{4} Customer:{5})", methodName, firstDnNo, mu.Station, "", mu.UserId, mu.Customer); try { #region Declare variable ArrayList retLst = new ArrayList(); string wfName = "UploadShipmentData.xoml"; string wfRule = "UploadShipmentData.rules"; string sessionKey = firstDnNo; Dictionary<string, object> sessionKeyValueList = new Dictionary<string, object>(); sessionKeyValueList.Add(Session.SessionKeys.UploadDNInfoList, lstUploadDNInfo); Session currentSession = null; #endregion //executing workflow, if fail then throw error currentSession = WorkflowUtility.InvokeWF(sessionKey, mu.Station, "", mu.Customer, mu.UserId, SessionType, wfName, wfRule, sessionKeyValueList); #region After workflow executed, setting return UI Data from workflow result's session object #endregion return retLst; } catch (FisException e) { logger.Error(e.mErrmsg, e); throw new Exception(e.mErrmsg); } catch (Exception e) { logger.Error(e.Message, e); throw new SystemException(e.Message); } finally { logger.DebugFormat("END: {0}()", methodName); } }
static public MpUserInfo ConvertMpUserToObj(object obj) { Dictionary<string, object> dic = (Dictionary<string, object>)obj; MpUserInfo m = new MpUserInfo { UserId = (string)dic["UserId"], UserName = (string)dic["UserName"], Customer = (string)dic["Customer"], AccountId = (string)dic["AccountId"], Login = (string)dic["Login"], Station = (string)dic["Station"], SessionId=(string)dic["SessionId"], PCode = (string)dic["PCode"] }; return m; }