Beispiel #1
0
    protected void btnImport_Click(object sender, EventArgs e)
    {
        ServiceManager sm = new ServiceManager();

        using (LP2ServiceClient service = sm.StartServiceClient())
        {
            ImportCardexRequest req = new ImportCardexRequest();

            req.CardexFile = string.Empty;

            req.hdr = new ReqHdr();
            req.hdr.SecurityToken = "SecurityToken"; //todo:check dummy data
            req.hdr.UserId        = 5;               //todo:check dummy data

            ImportCardexResponse respone = null;
            try
            {
                respone = service.ImportCardex(req);

                if (respone.hdr.Successful)
                {
                    PageCommon.WriteJsEnd(this, "Imported Cardex successfully.", PageCommon.Js_RefreshSelf);
                }
                else
                {
                    PageCommon.WriteJsEnd(this, "Failed to import Cardex, reason:" + respone.hdr.StatusInfo, PageCommon.Js_RefreshSelf);
                }
            }
            catch (Exception exception)
            {
                LPLog.LogMessage(exception.Message);
                PageCommon.WriteJsEnd(this, "Failed to import Cardex, reason:" + exception.Message, PageCommon.Js_RefreshSelf);
            }
        }
    }
Beispiel #2
0
        public ImportCardexResponse ImportCardex(ImportCardexRequest req)
        {
            ImportCardexResponse resp = new ImportCardexResponse();

            resp.hdr            = new RespHdr();
            resp.hdr.Successful = true;

            return(resp);
        }