Пример #1
0
        public JsonResult CancelCard(string uid)
        {
            DateTime dt_Initial = DateTime.Now;

            common.InitLog("CancelCard");
            List <IDataParameter> para     = null;
            UserInfoLib           UserInfo = common.GetSessionData();

            try
            {
                string strSql = common.Delete.PointCard(uid, ref para);
                if (!common.DBConn.GeneralSqlCmd.ExecuteNonQuery(strSql, para).Equals(1))
                {
                    common.WriteLog(Mode.LogMode.ERROR, string.Format("ID:{0} , 卡號:{1} , 狀態:{2} , 所花費時間:{3}", (UserInfo.UID), uid, "取消記名失敗:", common.DateDiff(dt_Initial, DateTime.Now)));
                    return(Json(new { Result = "系統發生錯誤,請聯繫相關人員" }));
                }
                else
                {
                    common.WriteLog(Mode.LogMode.DEBUG, string.Format("ID:{0} , 卡號:{1} , 狀態:{2} , 所花費時間:{3}", (UserInfo.UID), uid, "取消記名成功:", common.DateDiff(dt_Initial, DateTime.Now)));
                    return(Json(new { Result = "" }));
                }
            }
            catch (Exception ex)
            {
                common.WriteLog(Mode.LogMode.ERROR, string.Format("ID:{0} , 卡號:{1} , 狀態:{2} , 所花費時間:{3}", (UserInfo.UID), uid, "取消記名失敗:" + ex.ToString(), common.DateDiff(dt_Initial, DateTime.Now)));
                return(Json(new { Result = "系統發生錯誤,請聯繫相關人員" }));
            }
            finally
            {
                common.CloseConn();
            }
        }
Пример #2
0
        public JsonResult Transpose(string output_CardNo, string output_ValidateCode, string input_CardNo, string input_ValidateCode, string balance, string bonus, string input_CardStatus)
        {
            StringBuilder json_input = new StringBuilder();
            XmlDocument   xmlDoc     = null;
            DateTime      dt_Initial = DateTime.Now;

            try
            {
                string call_time = DateTime.Now.ToString("yyyyMMddhhmmss");
                string mask      = string.Format("Mc{0}Donalds", mid + tid + output_CardNo + output_ValidateCode + input_CardNo + input_ValidateCode + call_time + balance.ToString().PadLeft(8, '0') + bonus.ToString().PadLeft(8, '0') + input_CardStatus).GetMD5();

                json_input = new StringBuilder();
                json_input.AppendLine("{");
                json_input.AppendLine(string.Format(" \"mid\" : \"{0}\"", mid));
                json_input.AppendLine(string.Format(" ,\"tid\" : \"{0}\"", tid));
                json_input.AppendLine(string.Format(" ,\"FromCardNo\" : \"{0}\"", output_CardNo));
                json_input.AppendLine(string.Format(" ,\"FromValidateCode\" : \"{0}\"", output_ValidateCode));
                json_input.AppendLine(string.Format(" ,\"ToCardNo\" : \"{0}\"", input_CardNo));
                json_input.AppendLine(string.Format(" ,\"ToValidateCode\" : \"{0}\"", input_ValidateCode));
                json_input.AppendLine(string.Format(" ,\"callTime\" : \"{0}\"", call_time));
                json_input.AppendLine(string.Format(" ,\"Amount\" : \"{0}\"", balance.ToString().PadLeft(8, '0')));
                json_input.AppendLine(string.Format(" ,\"Bonus\" : \"{0}\"", bonus.ToString().PadLeft(8, '0')));
                //json_input.AppendLine(string.Format(" ,\"CouponList\" : \"{0}\"", string.Empty));
                json_input.AppendLine(string.Format(" ,\"ToCardStatus\" : \"{0}\"", input_CardStatus));//.PadLeft(2, '0')
                json_input.AppendLine(string.Format(" ,\"mask\" : \"{0}\"", mask));
                json_input.AppendLine("}");

                string json_request = common.ECService.balance_transfer(json_input.ToString());
                xmlDoc = JsonConvert.DeserializeXmlNode(json_request);

                string xml_string = xmlDoc.OuterXml;

                xmlDoc = new XmlDocument();
                xmlDoc.LoadXml(string.Format("<?xml version=\"1.0\" encoding=\"utf-8\"?>{0}", xml_string));

                int    code_id          = Convert.ToInt32(xmlDoc.SelectSingleNode(".//codeID").InnerText.Trim());
                string code_description = xmlDoc.SelectSingleNode(".//codeDescription").InnerText.Trim();

                if (!code_id.Equals(0))
                {
                    common.InitLog("Transpose");
                    UserInfoLib UserInfo = common.GetSessionData();
                    common.WriteLog(Mode.LogMode.ERROR, string.Format("ID:{0} , 狀態:{1} , 所花費時間:{2}", (UserInfo.UID), "Transpose Error: code_id=" + code_id, common.DateDiff(dt_Initial, DateTime.Now)));
                }
                return(Json(new { code_id = code_id, code_description = code_description }));
            }
            catch (Exception ex)
            {
                common.InitLog("Transpose");
                UserInfoLib UserInfo = common.GetSessionData();
                common.WriteLog(Mode.LogMode.ERROR, string.Format("ID:{0} , 狀態:{1} , 所花費時間:{2}", (UserInfo.UID), "Transpose Error:" + ex.ToString(), common.DateDiff(dt_Initial, DateTime.Now)));
                return(Json(new { code_id = "", code_description = "" }));
            }
            finally
            {
                common.ECService.Dispose(); common.ECService = null;
            }
        }
Пример #3
0
        public JsonResult ExpenseRecordsRead(string CardNumber)
        {
            DateTime dt_Initial = DateTime.Now;
            List <CardExpenseRecordsModel> records = new List <CardExpenseRecordsModel>();

            try
            {
                StringBuilder json_input = new StringBuilder();
                string        call_time  = DateTime.Now.ToString("yyyyMMddhhmmss");
                string        mask       = string.Format("Mc{0}Donalds", CardNumber + mid + tid + svc_lms + call_time).GetMD5();

                json_input = new StringBuilder();
                json_input.AppendLine("{");
                json_input.AppendLine(string.Format(" \"cardNo\" : \"{0}\"", CardNumber));
                json_input.AppendLine(string.Format(" ,\"mid\" : \"{0}\"", mid));
                json_input.AppendLine(string.Format(" ,\"tid\" : \"{0}\"", tid));
                json_input.AppendLine(string.Format(" ,\"expiryDate\" : \"{0}\"", svc_lms));
                json_input.AppendLine(string.Format(" ,\"callTime\" : \"{0}\"", call_time));
                json_input.AppendLine(string.Format(" ,\"mask\" : \"{0}\"", mask));
                json_input.AppendLine("}");

                string      json_request = common.ECService.queryTxn(json_input.ToString());
                XmlDocument doc          = JsonConvert.DeserializeXmlNode(json_request, "txnList");

                var TransactionDate     = doc.SelectNodes(".//txnDateTime");
                var Stores              = doc.SelectNodes(".//storeName");
                var ConsumptionCategory = doc.SelectNodes(".//txnID");
                var TradeName           = doc.SelectNodes(".//txnName");
                var Balance             = doc.SelectNodes(".//amount");
                var Points              = doc.SelectNodes(".//bonus");

                for (int i = 0; i < TransactionDate.Count; i++)
                {
                    records.Add(new CardExpenseRecordsModel
                    {
                        TransactionDate     = TransactionDate[i].InnerText,
                        Stores              = Stores[i].InnerText,
                        ConsumptionCategory = ConsumptionCategory[i].InnerText,
                        TradeName           = TradeName[i].InnerText,
                        Balance             = Balance[i].InnerText,
                        Points              = Points[i].InnerText,
                    });
                }
            }
            catch (Exception ex)
            {
                common.InitLog("ExpenseRecords");
                UserInfoLib UserInfo = common.GetSessionData();
                common.WriteLog(Mode.LogMode.ERROR, string.Format("ID:{0} , 卡號:{1} , 狀態:{2} , 所花費時間:{3}", (UserInfo.UID), CardNumber, "ExpenseRecords Error:" + ex.ToString(), common.DateDiff(dt_Initial, DateTime.Now)));
            }
            finally
            {
                common.ECService.Dispose(); common.ECService = null;
            }
            return(Json(records));
        }
Пример #4
0
        /// <summary>
        /// 取得該用戶已記名的卡片
        /// </summary>
        /// <param name="CardNumber"></param>
        /// <param name="IconPath"></param>
        /// <param name="UID"></param>
        /// <returns></returns>
        private CardModel GenerateCard(string CardNumber, string IconPath, string UID, string SecurityCode)
        {
            StringBuilder json_input = new StringBuilder();
            XmlDocument   xmlDoc     = null;
            CardModel     card       = new CardModel();
            DateTime      dt_Initial = DateTime.Now;

            try
            {
                string call_time = DateTime.Now.ToString("yyyyMMddhhmmss");
                string mask      = string.Format("Mc{0}Donalds", CardNumber + mid + tid + svc_lms + call_time).GetMD5();

                json_input = new StringBuilder();
                json_input.AppendLine("{");
                json_input.AppendLine(string.Format(" \"cardNo\" : \"{0}\"", CardNumber));
                json_input.AppendLine(string.Format(" ,\"mid\" : \"{0}\"", mid));
                json_input.AppendLine(string.Format(" ,\"tid\" : \"{0}\"", tid));
                json_input.AppendLine(string.Format(" ,\"expiryDate\" : \"{0}\"", svc_lms));
                json_input.AppendLine(string.Format(" ,\"callTime\" : \"{0}\"", call_time));
                json_input.AppendLine(string.Format(" ,\"mask\" : \"{0}\"", mask));
                json_input.AppendLine("}");

                string json_request = common.ECService.queryCard(json_input.ToString());
                xmlDoc = JsonConvert.DeserializeXmlNode(json_request);

                string xml_string = xmlDoc.OuterXml;

                xmlDoc = new XmlDocument();
                xmlDoc.LoadXml(string.Format("<?xml version=\"1.0\" encoding=\"utf-8\"?>{0}", xml_string));

                int    bonus   = Convert.ToInt32(xmlDoc.SelectSingleNode(".//bonus").InnerText.Trim());
                int    balance = Convert.ToInt32(xmlDoc.SelectSingleNode(".//balance").InnerText.Trim());
                string status  = xmlDoc.SelectSingleNode(".//status").InnerText.Trim();

                card.CardID       = CardNumber;
                card.ID           = UID;
                card.SecurityCode = SecurityCode;
                card.Points       = bonus.ToString();
                card.Balance      = balance.ToString();
                card.CardImg      = IconPath;
                card.Status       = status;
            }
            catch (Exception ex)
            {
                common.InitLog("GetCards");
                UserInfoLib UserInfo = common.GetSessionData();
                common.WriteLog(Mode.LogMode.ERROR, string.Format("ID:{0} , 狀態:{1} , 所花費時間:{2}", (UserInfo.UID), "GenerateCard Error:" + ex.ToString(), common.DateDiff(dt_Initial, DateTime.Now)));
            }
            finally
            {
                common.ECService.Dispose(); common.ECService = null;
            }
            return(card);
        }
Пример #5
0
        public JsonResult LoseCard(string CardNumber)
        {
            StringBuilder json_input = new StringBuilder();
            XmlDocument   xmlDoc     = null;
            DateTime      dt_Initial = DateTime.Now;

            try
            {
                string call_time = DateTime.Now.ToString("yyyyMMddhhmmss");
                string mask      = string.Format("Mc{0}Donalds", CardNumber + mid + tid + svc_lms + call_time).GetMD5();

                json_input = new StringBuilder();
                json_input.AppendLine("{");
                json_input.AppendLine(string.Format(" \"cardNo\" : \"{0}\"", CardNumber));
                json_input.AppendLine(string.Format(" ,\"mid\" : \"{0}\"", mid));
                json_input.AppendLine(string.Format(" ,\"tid\" : \"{0}\"", tid));
                json_input.AppendLine(string.Format(" ,\"expiryDate\" : \"{0}\"", svc_lms));
                json_input.AppendLine(string.Format(" ,\"callTime\" : \"{0}\"", call_time));
                json_input.AppendLine(string.Format(" ,\"mask\" : \"{0}\"", mask));
                json_input.AppendLine("}");

                string json_request = common.ECService.lost(json_input.ToString());
                xmlDoc = JsonConvert.DeserializeXmlNode(json_request);
                string xml_string = xmlDoc.OuterXml;

                xmlDoc = new XmlDocument();
                xmlDoc.LoadXml(string.Format("<?xml version=\"1.0\" encoding=\"utf-8\"?>{0}", xml_string));

                int    code_id          = Convert.ToInt32(xmlDoc.SelectSingleNode(".//codeID").InnerText.Trim());
                string code_description = xmlDoc.SelectSingleNode(".//codeDescription").InnerText.Trim();

                if (!code_id.Equals(0))
                {
                    common.InitLog("LoseCard");
                    UserInfoLib UserInfo = common.GetSessionData();
                    common.WriteLog(Mode.LogMode.ERROR, string.Format("ID:{0} , 卡號:{1} , 狀態:{2} , 所花費時間:{3}", (UserInfo.UID), CardNumber, "LoseCard Error: code_id=" + code_id, common.DateDiff(dt_Initial, DateTime.Now)));
                }
                return(Json(new { code_id = code_id, code_description = code_description }));
            }
            catch (Exception ex)
            {
                common.InitLog("LoseCard");
                UserInfoLib UserInfo = common.GetSessionData();
                common.WriteLog(Mode.LogMode.ERROR, string.Format("ID:{0} , 卡號:{1} , 狀態:{2} , 所花費時間:{3}", (UserInfo.UID), CardNumber, "LoseCard Error:" + ex.ToString(), common.DateDiff(dt_Initial, DateTime.Now)));
                return(Json(new { code_id = "", code_description = ex.ToString() }));
            }
            finally
            {
                common.ECService.Dispose(); common.ECService = null;
            }
        }
Пример #6
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="CardID"></param>
        /// <param name="AuthenticationCode"></param>
        /// <returns></returns>
        public JsonResult CheckCard(string CardID, string AuthenticationCode)
        {
            StringBuilder json_input = new StringBuilder();
            XmlDocument   xmlDoc     = null;
            DateTime      dt_Initial = DateTime.Now;

            try
            {
                if (!String.IsNullOrEmpty(CardID) && !String.IsNullOrEmpty(AuthenticationCode))
                {
                    string call_time = DateTime.Now.ToString("yyyyMMddhhmmss");
                    string mask      = string.Format("Mc{0}Donalds", CardID + mid + tid + svc_lms + call_time + AuthenticationCode).GetMD5();

                    json_input.AppendLine("{");
                    json_input.AppendLine(string.Format(" \"cardNo\" : \"{0}\"", CardID));
                    json_input.AppendLine(string.Format(" ,\"mid\" : \"{0}\"", mid));
                    json_input.AppendLine(string.Format(" ,\"tid\" : \"{0}\"", tid));
                    json_input.AppendLine(string.Format(" ,\"expiryDate\" : \"{0}\"", svc_lms));
                    json_input.AppendLine(string.Format(" ,\"callTime\" : \"{0}\"", call_time));
                    json_input.AppendLine(string.Format(" ,\"validateCode\" : \"{0}\"", AuthenticationCode));
                    json_input.AppendLine(string.Format(" ,\"mask\" : \"{0}\"", mask));
                    json_input.AppendLine("}");

                    string json_request = common.ECService.validateCard(json_input.ToString());
                    xmlDoc = JsonConvert.DeserializeXmlNode(json_request);
                    string xml_string = xmlDoc.OuterXml;
                    xmlDoc = new XmlDocument();
                    xmlDoc.LoadXml(string.Format("<?xml version=\"1.0\" encoding=\"utf-8\"?>{0}", xml_string));

                    int    code_id          = Convert.ToInt32(xmlDoc.SelectSingleNode(".//codeID").InnerText.Trim());
                    string code_description = xmlDoc.SelectSingleNode(".//codeDescription").InnerText.Trim();

                    return(Json(new { code_id = code_id, code_description = code_description }));
                }
                return(Json(new { code_id = "6", code_description = "請輸入卡號與驗證碼" }));
            }
            catch (Exception ex)
            {
                common.InitLog("GetCards");
                UserInfoLib UserInfo = common.GetSessionData();
                common.WriteLog(Mode.LogMode.ERROR, string.Format("ID:{0} , 狀態:{1} , 所花費時間:{2}", (UserInfo.UID), "GetCards Error:" + ex.ToString(), common.DateDiff(dt_Initial, DateTime.Now)));
                return(Json(new { Message = ex.Message }));
            }
            finally
            {
                common.ECService.Dispose(); common.ECService = null;
            }
        }
Пример #7
0
        public ContentResult LoginInfo()
        {
            StringBuilder sb = new StringBuilder();
            //註冊與登入
            string display_RegSign = "";
            //登入後
            string display_Login = "";
            //使用者資訊
            string UserInfo = "";

            if (Session[CommonFun.SessionName.UserInfo.ToString()] == null)
            {
                display_Login = "******";
            }
            else
            {
                display_RegSign = "style='display:none'";
                UserInfoLib userInfoLib = common.GetSessionData();

                UserInfo += "<a id='btn_Menu_Member' href='' class='dropdown-oggle nav-text' data-toggle='dropdown' role='button' aria-haspopup='true' aria-expanded='false'>";
                UserInfo += "Hi " + userInfoLib.LastName + userInfoLib.FirstName + "</a>";
                UserInfo += "<ul class='dropdown-menu' style='margin-left: auto; '><li class='arrow_t_int DesktopView'></li><li class='arrow_t_out DesktopView'></li>";
                UserInfo += "<li><a id='btn_Menu_Member_Data_Maintain' class='nav-ext-dropdown' href='/Member/UserProfile'>修改個人資料</a></li>";
                UserInfo += "<hr class='meun_hr' />";
                UserInfo += "<li><a onclick='Logout(); return false' href='' class='nav-text-dropdown' >登出</a></li></ul>";
            }
            //編輯時請連同 Login.cshtml 異動
            sb.Append("<li id='liLogin' " + display_RegSign + ">");
            sb.Append("<a id='btn_Menu_Member_Register' style='display: inline-block' class='nav-text-yellow' href='/SignUp'>");
            sb.Append("<img class='nav-signup'>新用戶註冊");
            sb.Append("</a>");
            sb.Append("<a id='btn_Menu_Member_Login' href='#' class='nav-text-yellow' style='display: inline-block; margin-left: 0px;'>");
            sb.Append("<img class='nav-signin'>報報APP會員登入");
            sb.Append("</a>");
            sb.Append("</li>");


            sb.Append("<li id='liuserInfo' class='dropdown' " + display_Login + " + >");
            sb.Append(UserInfo);
            sb.Append("</ li > ");

            return(Content(sb.ToString()));
        }
Пример #8
0
        public JsonResult UpdateUserProfile(UserInfoLib UserInfo)
        {
            List <IDataParameter> para = null;
            Hashtable             ht   = new Hashtable();

            try
            {
                string USN = common.GetSessionData().USN;
                ht.Add("USN", USN);
                ht.Add("Password", UserInfo.Password);
                ht.Add("LastName", UserInfo.LastName);
                ht.Add("FirstName", UserInfo.FirstName);
                ht.Add("Sex", UserInfo.Sex);
                ht.Add("Zipcode", UserInfo.Zipcode);
                ht.Add("City", UserInfo.City);
                ht.Add("Township", UserInfo.Township);
                ht.Add("Address", UserInfo.Address ?? "");
                ht.Add("MaritalStatus", UserInfo.MaritalStatus);
                ht.Add("Children", UserInfo.Children);
                ht.Add("ChildrenYear", UserInfo.ChildrenYear);
                ht.Add("Mail", UserInfo.Mail);
                ht.Add("ReceiveNews", UserInfo.ReceiveNews);

                string strSql = common.Update.User(ht, ref para);
                if (common.DBConn.GeneralSqlCmd.ExecuteNonQuery(strSql, para).Equals(1))
                {
                    //SetSession
                    common.SetUserInfo(USN);
                }
                return(Json(new { Result = common.DBConn.GeneralSqlCmd.ExecuteNonQuery(strSql, para).Equals(1) }));
            }
            catch (Exception ex)
            {
                common.WriteLog(Log.Mode.LogMode.ERROR, ex.ToString());
                return(Json(new { Result = false }));
            }
            finally
            {
                para = null;
                common.CloseConn();
            }
        }
Пример #9
0
        private List <CardModel> GetCards()
        {
            List <IDataParameter> para  = null;
            DataTable             dt    = null;
            List <CardModel>      cards = new List <CardModel>();
            DateTime dt_Initial         = DateTime.Now;

            try
            {
                string strSql = common.Select.PointCard(common.GetSessionData().USN, ref para);
                dt = common.DBConn.GeneralSqlCmd.ExecuteToDataTable(strSql, para);

                if (dt != null && dt.Rows.Count > 0)
                {
                    for (int i = 0; i < dt.Rows.Count; i++)
                    {
                        var CardID       = dt.Rows[i]["CardNumber"].ToString();
                        var UID          = dt.Rows[i]["UID"].ToString();
                        var SecurityCode = dt.Rows[i]["SecurityCode"].ToString().DecryptDES();
                        var CardImg      = "/wwwroot/Image/Card/" + dt.Rows[i]["IconPath"].ToString();
                        cards.Add(GenerateCard(CardID, CardImg, UID, SecurityCode));
                    }
                }
            }
            catch (Exception ex)
            {
                common.InitLog("GetCards");
                UserInfoLib UserInfo = common.GetSessionData();
                common.WriteLog(Mode.LogMode.ERROR, string.Format("ID:{0} , 狀態:{1} , 所花費時間:{2}", (UserInfo.UID), "GetCards Error:" + ex.ToString(), common.DateDiff(dt_Initial, DateTime.Now)));
            }
            finally
            {
                common.CloseConn();
            }
            return(cards);
        }
Пример #10
0
        public JsonResult RegisterCard(string CardNumber, string AuthenticationCode)
        {
            DateTime dt_Initial = DateTime.Now;

            common.InitLog("RegisterCard");

            string strSql              = string.Empty;
            string cardMax             = ConfigurationManager.AppSettings["CardRegMax"].ToString();
            List <IDataParameter> para = null;
            Hashtable             ht   = new Hashtable();
            DataTable             dt   = null;

            UserInfoLib UserInfo = common.GetSessionData();

            try
            {
                strSql = common.Select.PointCard(UserInfo.USN, ref para);
                dt     = common.DBConn.GeneralSqlCmd.ExecuteToDataTable(strSql, para);

                if (dt != null && dt.Rows.Count >= Convert.ToInt32(cardMax))
                {
                    return(Json(new { Result = "您的點點卡記名卡數已超過" + cardMax + "張上限" }));
                }

                strSql = common.Select.PointCard(string.Empty, CardNumber, ref para);
                dt     = common.DBConn.GeneralSqlCmd.ExecuteToDataTable(strSql, para);

                if (dt != null && dt.Rows.Count > 0)
                {
                    if (!dt.Rows[0]["CustID"].ToString().Trim().Equals(UserInfo.USN))
                    {
                        return(Json(new { Result = "您登記的卡號已登記於其他帳號中,卡號是否輸入錯誤呢?" }));
                    }
                    else
                    {
                        return(Json(new { Result = "該卡號已被註冊" }));
                    }
                }

                ht.Add("UID", "CardStyle".GenerateKey("CD").EncryptDES());
                ht.Add("CustID", UserInfo.USN);
                ht.Add("CardNumber", CardNumber.Trim());
                ht.Add("SecurityCode", AuthenticationCode.Trim());
                ht.Add("Source", "WEB");

                strSql = common.Insert.PointCard(ht, ref para);
                if (!common.DBConn.GeneralSqlCmd.ExecuteNonQuery(strSql, para).Equals(1))
                {
                    common.WriteLog(Mode.LogMode.ERROR, string.Format("ID:{0} , 卡號:{1} , 狀態:{2} , 所花費時間:{3}", (UserInfo.UID), CardNumber, "記名失敗", common.DateDiff(dt_Initial, DateTime.Now)));
                    return(Json(new { Result = "系統發生錯誤,請聯繫相關人員" }));
                }
                else
                {
                    common.WriteLog(Mode.LogMode.ERROR, string.Format("ID:{0} , 卡號:{1} , 狀態:{2} , 所花費時間:{3}", (UserInfo.UID), CardNumber, "記名成功", common.DateDiff(dt_Initial, DateTime.Now)));
                    return(Json(new { Result = "", Card = GetCards().Where(x => x.CardID == CardNumber).FirstOrDefault() }));
                }
            }
            catch (Exception ex)
            {
                common.WriteLog(Mode.LogMode.ERROR, string.Format("ID:{0} , 卡號:{1} , 狀態:{2} , 所花費時間:{3}", (UserInfo.UID), CardNumber, "記名失敗:" + ex.ToString(), common.DateDiff(dt_Initial, DateTime.Now)));
                return(Json(new { Result = "系統發生錯誤,請聯繫相關人員" }));
            }
            finally
            {
                common.CloseConn();
            }
        }