Exemplo n.º 1
0
        public static bool DeleteProviderInfoAll(string CustNo, string CompanyCD)
        {
            LogInfoModel logModel = InitLogInfo(CustNo);

            logModel.Element = ConstUtil.LOG_PROCESS_DELETE;
            //设置模块ID 模块ID请在ConstUtil中定义,以便维护
            logModel.ModuleID = ConstUtil.MODULE_ID_PROVIDERINFOINFO;
            UserInfoUtil userInfo = (UserInfoUtil)SessionUtil.Session["UserInfo"];

            //string[] sql = new string[3];
            //int index = 0;
            SqlCommand[] cmdList = new SqlCommand[3];
            cmdList [0] = ProviderInfoDBHelper.DeleteProviderInfo(CustNo, CompanyCD);    //供应商信息
            cmdList[1]  = ProviderInfoDBHelper.DeleteProviderLinkMan(CustNo, CompanyCD); //供应商联系人
            cmdList[2]  = ProviderInfoDBHelper.DeleteProviderProduct(CustNo, CompanyCD); //供应商产品

            SqlHelper.ExecuteTransForList(cmdList);
            bool   isSucc = SqlHelper.Result.OprateCount > 0 ? true : false;
            string remark;

            //成功时
            if (isSucc)
            {
                //设置操作成功标识
                remark          = ConstUtil.LOG_PROCESS_SUCCESS;
                logModel.Remark = remark;
            }
            else
            {
                //设置操作成功标识
                remark          = ConstUtil.LOG_PROCESS_FAILED;
                logModel.Remark = remark;
            }
            LogDBHelper.InsertLog(logModel);
            return(isSucc);
        }