Ejemplo n.º 1
0
        public ActionResult Delete(Fee fee)
        {
            bool result = FeeData.Delete(fee.UniqueId.ToString());

            if (result)
            {
                return(RedirectToAction("Index"));
            }
            else
            {
                return(View());
            }
        }
Ejemplo n.º 2
0
        public string DeleteFeeData(string callType, string xmlMessage)
        {
            string result = "<?xml version=\"1.0\" encoding=\"utf-8\"?>" +
                            "<" + callType + ">" +
                            "<Result>False</Result>" +
                            "<Description></Description></" + callType + ">";

            string logID = Guid.NewGuid().ToString();

            try
            {
                FileLogger.WriteLog(logID + "|Start:" + xmlMessage, 1, "", callType);

                if (Helper.CheckAuthCode(callType, xmlMessage))//数据校验通过
                {
                    FeeData fee = new FeeData();
                    result = fee.Delete(xmlMessage);
                    if (result != "-1")
                    {
                        result = "<?xml version=\"1.0\" encoding=\"utf-8\"?>" +
                                 "<" + callType + ">" +
                                 "<Result>True</Result>" +
                                 "<ID>" + result + "</ID>" +
                                 "<Description></Description></" + callType + ">";
                    }
                }
            }
            catch (Exception err)
            {
                result = "<?xml version=\"1.0\" encoding=\"utf-8\"?>" +
                         "<" + callType + ">" +
                         "<Result>False</Result>" +
                         "<Description>" + err.Message + "</Description></" + callType + ">";
            }
            FileLogger.WriteLog(logID + "|End:" + result, 1, "", callType);;
            return(result);
        }