Beispiel #1
0
        private void Delete()
        {
            string guidList = Request.Params["AcceptGuid"];
            string rslt = string.Empty;
            if (!string.IsNullOrEmpty(guidList))
            {
                Hashtable hs = new Hashtable();
                HD.Model.AD ad = new HD.Model.AD();
                HD.Model.Publish publish = new HD.Model.Publish();
                string[] guid = guidList.Split(',');
                foreach (var item in guid)
                {
                    //accept.AcceptGuid = item;
                    hs.Clear();
                    hs.Add("AcceptGuid", item);
                    HD.Model.AcceptForm accept = HD.Model.AcceptForm.Instance.GetModelById(hs);
                    try
                    {
                        accept.Delete(accept.AcceptGuid);
                        ad.Delete(accept.ADGuid);
                        hs.Clear();
                        hs.Add("ADGuid", accept.ADGuid);
                        publish.Delete(hs);
                        rslt = "1";
                    }
                    catch (Exception e)
                    {
                        rslt = "0";
                    }
                    finally
                    {

                    }
                }
                Response.Write("{\"result\":\"" + rslt + "\"}");
                Response.End();
            }
        }