Exemplo n.º 1
0
        /// <summary>
        /// 获得发送的核对信息内容
        /// </summary>
        /// <returns></returns>
        private string GetMsg()
        {
            if (string.IsNullOrEmpty(Get("msg_id")))
            {
                return("");
            }
            Messge_info msg = new Messge_info();

            msg.OID = Get("msg_id");
            ds.RetrieveObject(msg);
            StringBuilder json = new StringBuilder();//用来存放Json的

            json.Append("{");
            json.Append(Json.StringToJson(msg.MSG_CONTENT, "MSG_CONTENT"));
            json.Append("}");
            return(json.ToString());
        }
Exemplo n.º 2
0
        /// <summary>
        /// 通过传入的主键编码删除数据
        /// </summary>
        /// <returns></returns>
        private string DeleteData()
        {
            try
            {
                if (string.IsNullOrEmpty(Get("id")))
                {
                    return("主键为空,不允许删除操作");
                }

                Insur_project_head model = new Insur_project_head();
                model.OID = Get("id");
                ds.RetrieveObject(model);
                //删除发布的核对信息
                Messge_info msg = new Messge_info();
                msg.OID = model.CHECK_MSG_ID;
                ds.RetrieveObject(msg);

                var transaction = ImplementFactory.GetDeleteTransaction <Messge_info>("Messge_infoDeleteTransaction");
                transaction.EntityList.Add(msg);
                if (transaction.Commit())
                {
                    //清除核对信息
                    model.CHECK_START   = "";
                    model.CHECK_END     = "";
                    model.CHECK_IS_SEND = "";
                    model.CHECK_MSG_ID  = "";
                    model.CHECK_OP_CODE = "";
                    model.CHECK_OP_NAME = "";
                    model.CHECK_OP_TIME = "";
                    ds.UpdateObject(model);
                }
                return(string.Empty);
            }
            catch (Exception ex)
            {
                LogDBHandleClass.getInstance().LogException(CValue.LOG_LEVEL_ERROR, "删除保险项目数据,出错:" + ex.ToString());
                return("删除失败!");
            }
        }