/// <summary>
        /// 删除单据
        /// </summary>
        /// <param name="orderNos"></param>
        /// <returns></returns>
        public static bool DelOrder(string orderNos, out string strMsg, out string strFieldText)
        {
            bool isSucc = false;//是否添加成功
            //定义变量
            string remark = string.Empty;

            strFieldText = "";
            strMsg       = "";
            try
            {
                isSucc = SellChannelSttlDBHelper.DelOrder(orderNos, out strMsg, out strFieldText);
                //设置操作成功标识
                remark = ConstUtil.LOG_PROCESS_SUCCESS;
            }
            catch (Exception ex)
            {
                //输出日志
                SellLogCommon.WriteSystemLog(ex, LogInfo.LogType.SYSTEM, LogInfo.SystemLogKind.SYSTEM_ERROR, ConstUtil.MODULE_ID_SELLCHANNELSTTL_INFO);
                //设置操作成功标识
                remark = ConstUtil.LOG_PROCESS_FAILED;
            }

            string[] orderNoS = null;
            orderNoS = orderNos.Split(',');

            for (int i = 0; i < orderNoS.Length; i++)
            {
                SellLogCommon.InsertLog(orderNoS[i], ConstUtil.MODULE_ID_SELLCHANNELSTTL_INFO, ConstUtil.CODING_RULE_TABLE_SELLCHANNELSTTL, remark, ConstUtil.LOG_PROCESS_DELETE);
            }

            return(isSucc);
        }
        /// <summary>
        /// 取消结单
        /// </summary>
        /// <param name="OrderNO">单据编号</param>
        /// <param name="strMsg">操作返回的信息</param>
        /// <returns></returns>
        public static bool UnCloseOrder(string OrderNO, out string strMsg)
        {
            string strElement = string.Empty;
            bool   isSucc     = false;//是否添加成功
            //定义变量
            string remark = string.Empty;

            //操作名称
            strElement = ConstUtil.LOG_PROCESS_CONCELCOMPLETE;
            strMsg     = "";

            try
            {
                isSucc = SellChannelSttlDBHelper.UnCloseOrder(OrderNO, out strMsg);
                //设置操作成功标识
                remark = ConstUtil.LOG_PROCESS_SUCCESS;
            }
            catch (Exception ex)
            {
                //输出日志
                SellLogCommon.WriteSystemLog(ex, LogInfo.LogType.SYSTEM, LogInfo.SystemLogKind.SYSTEM_ERROR, ConstUtil.MODULE_ID_SELLCHANNELSTTL_ADD);
                //设置操作成功标识
                remark = ConstUtil.LOG_PROCESS_FAILED;
            }
            //写入日志
            SellLogCommon.InsertLog(OrderNO, ConstUtil.MODULE_ID_SELLCHANNELSTTL_ADD, ConstUtil.CODING_RULE_TABLE_SELLCHANNELSTTL, remark, strElement);

            return(isSucc);
        }
Beispiel #3
0
        /// <summary>
        /// 删除单据
        /// </summary>
        /// <param name="orderNos"></param>
        /// <returns></returns>
        public static bool DelOrder(string orderNos, out string strMsg, out string strFieldText)
        {
            bool isSucc = false;//是否添加成功
            //定义变量
            string remark = string.Empty;

            strFieldText = "";
            strMsg       = "";
            try
            {
                isSucc = SellPlanDBHelper.DelOrder(orderNos, out strMsg, out strFieldText);
                //设置操作成功标识
                remark = ConstUtil.LOG_PROCESS_SUCCESS;
            }
            catch (Exception ex)
            {
                //输出日志
                SellLogCommon.WriteSystemLog(ex, LogInfo.LogType.SYSTEM, LogInfo.SystemLogKind.SYSTEM_ERROR, "2031002");
                //设置操作成功标识
                remark = ConstUtil.LOG_PROCESS_FAILED;
            }

            string[] orderNoS = null;
            orderNoS = orderNos.Split(',');

            for (int i = 0; i < orderNoS.Length; i++)
            {
                SellLogCommon.InsertLog(orderNoS[i], "2031002", "officedba.SellPlan", remark, ConstUtil.LOG_PROCESS_DELETE);
            }

            return(isSucc);
        }
Beispiel #4
0
        /// <summary>
        /// 取消结单
        /// </summary>
        /// <param name="OrderNO">单据编号</param>
        /// <param name="strMsg">操作返回的信息</param>
        /// <returns></returns>
        public static bool UnCloseOrder(string OrderNO, out string strMsg)
        {
            string strElement = string.Empty;
            bool   isSucc     = false;//是否添加成功
            //定义变量
            string remark = string.Empty;

            //操作名称
            strElement = ConstUtil.LOG_PROCESS_CONCELCOMPLETE;
            strMsg     = "";

            try
            {
                isSucc = SellPlanDBHelper.UnCloseOrder(OrderNO, out strMsg);
                //设置操作成功标识
                remark = ConstUtil.LOG_PROCESS_SUCCESS;
            }
            catch (Exception ex)
            {
                //输出日志
                SellLogCommon.WriteSystemLog(ex, LogInfo.LogType.SYSTEM, LogInfo.SystemLogKind.SYSTEM_ERROR, "2031001");
                //设置操作成功标识
                remark = ConstUtil.LOG_PROCESS_FAILED;
            }
            //写入日志
            SellLogCommon.InsertLog(OrderNO, "2031001", "officedba.SellPlan", remark, strElement);

            return(isSucc);
        }
        /// <summary>
        /// 删除回款计划
        /// </summary>
        /// <param name="strIDS"></param>
        /// <returns></returns>
        public static bool DelSellGathering(string strIDS, out string strMsg)
        {
            bool isSucc = false;//是否添加成功
            //定义变量
            string remark = string.Empty;

            strMsg = "";
            try
            {
                isSucc = SellGatheringDBHelper.DelSellGathering(strIDS, out strMsg);
                //设置操作成功标识
                remark = ConstUtil.LOG_PROCESS_SUCCESS;
            }
            catch (Exception ex)
            {
                //输出日志
                SellLogCommon.WriteSystemLog(ex, LogInfo.LogType.SYSTEM, LogInfo.SystemLogKind.SYSTEM_ERROR, ConstUtil.MODULE_ID_GATHERING_INFO);
                //设置操作成功标识
                remark = ConstUtil.LOG_PROCESS_FAILED;
            }
            string[] orderNoS = null;
            orderNoS = strIDS.Split(',');

            for (int i = 0; i < orderNoS.Length; i++)
            {
                SellLogCommon.InsertLog(orderNoS[i], ConstUtil.MODULE_ID_GATHERING_INFO, ConstUtil.CODING_RULE_TABLE_GATHERING, remark, ConstUtil.LOG_PROCESS_DELETE);
            }


            return(isSucc);
        }
        /// <summary>
        /// 确认单据
        /// </summary>
        /// <param name="OrderNO">单据编号</param>
        /// <param name="strMsg">操作返回的信息</param>
        /// <returns></returns>
        public static bool ConfirmOrder(SellChannelSttlModel sellChannelSttlModel, out string strMsg, out string strFieldText)
        {
            string strElement = string.Empty;
            bool   isSucc     = false;//是否添加成功
            //定义变量
            string remark = string.Empty;

            //操作名称
            strElement   = ConstUtil.LOG_PROCESS_CONFIRM;
            strFieldText = "";
            strMsg       = "";

            try
            {
                isSucc = SellChannelSttlDBHelper.ConfirmOrder(sellChannelSttlModel.SttlNo, out strMsg, out strFieldText);
                //确认成功后调用“自动生成凭证”方法
                if (isSucc == true)
                {
                    string str = "";
                    bool   AutoVoucherInsertFlag = XBase.Business.Office.FinanceManager.AutoVoucherBus.AutoVoucherInsert(3, Convert.ToDecimal(sellChannelSttlModel.TotalFee), "officedba.SellChannelSttl," + sellChannelSttlModel.ID, sellChannelSttlModel.CurrencyType + "," + sellChannelSttlModel.Rate, Convert.ToInt32(sellChannelSttlModel.CustID), out str);
                    //returnValue=0 业务单未设凭证模板,returnValue=1 企业不启用业务单自动生成凭证,returnValue = 2 企业不启用自动生成凭证自动登帐, returnValue = 3 自动生成凭证失败 ,returnValue = "4" 回写业务单登记凭证状态成功,returnValue = "5" 回写业务单登记凭证状态失败
                    if (AutoVoucherInsertFlag == true)
                    {
                        strMsg += str;
                    }
                    else
                    {
                        strMsg += str;
                    }
                }
                //设置操作成功标识
                remark = ConstUtil.LOG_PROCESS_SUCCESS;
            }
            catch (Exception ex)
            {
                //输出日志
                SellLogCommon.WriteSystemLog(ex, LogInfo.LogType.SYSTEM, LogInfo.SystemLogKind.SYSTEM_ERROR, ConstUtil.MODULE_ID_SELLCHANNELSTTL_ADD);

                //设置操作成功标识
                remark = ConstUtil.LOG_PROCESS_FAILED;
            }
            //写入日志
            SellLogCommon.InsertLog(sellChannelSttlModel.SttlNo, ConstUtil.MODULE_ID_SELLCHANNELSTTL_ADD, ConstUtil.CODING_RULE_TABLE_SELLCHANNELSTTL, remark, strElement);

            return(isSucc);
        }
        /// <summary>
        /// 取消确认单据
        /// </summary>
        /// <param name="OrderNO">单据编号</param>
        /// <param name="strMsg">操作返回的信息</param>
        /// <returns></returns>
        public static bool UnConfirmOrder(SellChannelSttlModel sellChannelSttlModel, out string strMsg)
        {
            string strElement = string.Empty;
            bool   isSucc     = false;//是否添加成功
            //定义变量
            string remark = string.Empty;

            //操作名称
            strElement = ConstUtil.LOG_PROCESS_UNCONFIRM;
            strMsg     = "";

            try
            {
                isSucc = SellChannelSttlDBHelper.UnConfirmOrder(sellChannelSttlModel.SttlNo, out strMsg);
                //取消确认成功后调用“自动生成凭证”方法
                if (isSucc == true)
                {
                    string str = "";
                    bool   AutoVoucherInsertFlag = XBase.Business.Office.FinanceManager.AutoVoucherBus.AntiConfirmVoucher("officedba.SellChannelSttl," + sellChannelSttlModel.ID, out str);
                    if (AutoVoucherInsertFlag == true)
                    {
                        //strMsg += str;
                    }
                    else
                    {
                        strMsg += str;
                    }
                }
                //设置操作成功标识
                remark = ConstUtil.LOG_PROCESS_SUCCESS;
            }
            catch (Exception ex)
            {
                //输出日志
                SellLogCommon.WriteSystemLog(ex, LogInfo.LogType.SYSTEM, LogInfo.SystemLogKind.SYSTEM_ERROR, ConstUtil.MODULE_ID_SELLCHANNELSTTL_ADD);
                //设置操作成功标识
                remark = ConstUtil.LOG_PROCESS_FAILED;
            }
            //写入日志
            SellLogCommon.InsertLog(sellChannelSttlModel.SttlNo, ConstUtil.MODULE_ID_SELLCHANNELSTTL_ADD, ConstUtil.CODING_RULE_TABLE_SELLCHANNELSTTL, remark, strElement);

            return(isSucc);
        }
Beispiel #8
0
        /// <summary>
        /// 更新
        /// </summary>
        /// <param name="adversarySellModel"></param>
        public static bool Update(AdversarySellModel adversarySellModel)
        {
            bool isSucc = false;//是否添加成功
            //定义变量
            string remark = string.Empty;

            try
            {
                isSucc = AdversarySellDBHelper.Update(adversarySellModel);
                //设置操作成功标识
                remark = ConstUtil.LOG_PROCESS_SUCCESS;
            }
            catch (Exception ex)
            {
                //输出日志
                SellLogCommon.WriteSystemLog(ex, LogInfo.LogType.SYSTEM, LogInfo.SystemLogKind.SYSTEM_ERROR, ConstUtil.MODULE_ID_ADVERSARYSELL_ADD);
                //设置操作成功标识
                remark = ConstUtil.LOG_PROCESS_FAILED;
            }
            SellLogCommon.InsertLog(adversarySellModel.CustNo, ConstUtil.MODULE_ID_ADVERSARYSELL_ADD, ConstUtil.CODING_RULE_TABLE_ADVERSARYSELL, remark, ConstUtil.LOG_PROCESS_UPDATE);
            return(isSucc);
        }
Beispiel #9
0
        /// <summary>
        /// 添加销售机会及阶段
        /// </summary>
        /// <param name="sellChanceModel">销售机会表实体</param>
        /// <param name="sellChancePushModel">销售阶段表实体</param>
        /// <returns>是否添加成功</returns>
        public static bool UpdateSellChance(Hashtable ht, SellChanceModel sellChanceModel, SellChancePushModel sellChancePushModel)
        {
            bool isSucc = false;//是否添加成功
            //定义变量
            string remark = string.Empty;

            try
            {
                isSucc = SellChanceDBHelper.UpdateSellChance(ht, sellChanceModel, sellChancePushModel);
                //设置操作成功标识
                remark = ConstUtil.LOG_PROCESS_SUCCESS;
            }
            catch (Exception ex)
            {
                //输出日志
                SellLogCommon.WriteSystemLog(ex, LogInfo.LogType.SYSTEM, LogInfo.SystemLogKind.SYSTEM_ERROR, ConstUtil.MODULE_ID_SELLCHANCE_ADD);
                //设置操作成功标识
                remark = ConstUtil.LOG_PROCESS_FAILED;
            }
            SellLogCommon.InsertLog(sellChanceModel.ChanceNo, ConstUtil.MODULE_ID_SELLCHANCE_ADD, ConstUtil.CODING_RULE_TABLE_SELLCHANCE, remark, ConstUtil.LOG_PROCESS_UPDATE);
            return(isSucc);
        }
        /// <summary>
        /// 更新销售委托代销单
        /// </summary>
        /// <returns></returns>
        public static bool UpdateOrder(Hashtable ht, SellChannelSttlModel sellChannelSttlModel, List <SellChannelSttlDetailModel> sellChannelSttlDetailModellist, out string strMsg)
        {
            bool isSucc = false;//是否添加成功
            //定义变量
            string remark = string.Empty;

            strMsg = "";
            try
            {
                isSucc = SellChannelSttlDBHelper.UpdateOrder(ht, sellChannelSttlModel, sellChannelSttlDetailModellist, out strMsg);
                //设置操作成功标识
                remark = ConstUtil.LOG_PROCESS_SUCCESS;
            }
            catch (Exception ex)
            {
                //输出日志
                SellLogCommon.WriteSystemLog(ex, LogInfo.LogType.SYSTEM, LogInfo.SystemLogKind.SYSTEM_ERROR, ConstUtil.MODULE_ID_SELLCHANNELSTTL_ADD);
                //设置操作成功标识
                remark = ConstUtil.LOG_PROCESS_FAILED;
            }
            SellLogCommon.InsertLog(sellChannelSttlModel.SttlNo, ConstUtil.MODULE_ID_SELLCHANNELSTTL_ADD, ConstUtil.CODING_RULE_TABLE_SELLCHANNELSTTL, remark, ConstUtil.LOG_PROCESS_UPDATE);
            return(isSucc);
        }
Beispiel #11
0
        /// <summary>
        ///总结计划
        /// </summary>
        /// <returns></returns>
        public static bool SummarizeOrder(SellPlanDetailModel model, out string strMsg)
        {
            bool isSucc = false;//是否添加成功
            //定义变量
            string remark = string.Empty;

            strMsg = "";
            try
            {
                isSucc = SellPlanDBHelper.SummarizeOrder(model, out strMsg);
                //设置操作成功标识
                remark = "总结成功";
            }
            catch (Exception ex)
            {
                //输出日志
                SellLogCommon.WriteSystemLog(ex, LogInfo.LogType.SYSTEM, LogInfo.SystemLogKind.SYSTEM_ERROR, "2031001");
                //设置操作成功标识
                remark = ConstUtil.LOG_PROCESS_FAILED;
            }
            SellLogCommon.InsertLog(model.PlanNo, "2031001", "officedba.SellPlanDetail", remark, ConstUtil.LOG_PROCESS_UPDATE);
            return(isSucc);
        }
Beispiel #12
0
        /// <summary>
        /// 更新销售发货单
        /// </summary>
        /// <returns></returns>
        public static bool Update(Hashtable ht, SellPlanModel sellPlanModel, SellPlanDetailModel sellPlanDetail, string strDetailAction, out string strMsg)
        {
            bool isSucc = false;//是否添加成功
            //定义变量
            string remark = string.Empty;

            strMsg = "";
            try
            {
                isSucc = SellPlanDBHelper.Update(ht, sellPlanModel, sellPlanDetail, strDetailAction, out strMsg);
                //设置操作成功标识
                remark = ConstUtil.LOG_PROCESS_SUCCESS;
            }
            catch (Exception ex)
            {
                //输出日志
                SellLogCommon.WriteSystemLog(ex, LogInfo.LogType.SYSTEM, LogInfo.SystemLogKind.SYSTEM_ERROR, "2031001");
                //设置操作成功标识
                remark = ConstUtil.LOG_PROCESS_FAILED;
            }
            SellLogCommon.InsertLog(sellPlanModel.PlanNo, "2031001", "officedba.SellPlan", remark, ConstUtil.LOG_PROCESS_UPDATE);
            return(isSucc);
        }
Beispiel #13
0
        /// <summary>
        /// 保存销售发货单
        /// </summary>
        /// <returns></returns>
        public static bool SaveSellBack(Hashtable ht, SellBackModel sellBackModel, List <SellBackDetailModel> sellBackDetailModellList, out string strMsg)
        {
            bool   isSuc  = false;
            string remark = string.Empty;

            strMsg = "";
            try
            {
                isSuc = SellBackDBHelper.SaveSellBack(ht, sellBackModel, sellBackDetailModellList, out strMsg);
                //设置操作成功标识
                remark = ConstUtil.LOG_PROCESS_SUCCESS;
            }
            catch (Exception ex)
            {
                //输出日志
                SellLogCommon.WriteSystemLog(ex, LogInfo.LogType.SYSTEM, LogInfo.SystemLogKind.SYSTEM_ERROR, ConstUtil.MODULE_ID_SELLBACK_ADD);
                //设置操作成功标识
                remark = ConstUtil.LOG_PROCESS_FAILED;
            }
            SellLogCommon.InsertLog(sellBackModel.BackNo, ConstUtil.MODULE_ID_SELLBACK_ADD, ConstUtil.CODING_RULE_TABLE_SELLBACK, remark, ConstUtil.LOG_PROCESS_INSERT);

            return(isSuc);
        }
Beispiel #14
0
        /// <summary>
        /// 修改回款计划
        /// </summary>
        /// <param name="sellGatheringModel"></param>
        /// <returns></returns>
        public static bool UpdateSellGathering(Hashtable ht, SellGatheringModel sellGatheringModel, out string strMsg)
        {
            bool   isSuc  = false;
            string remark = string.Empty;

            strMsg = "";
            try
            {
                isSuc = SellGatheringDBHelper.UpdateSellGathering(ht, sellGatheringModel, out strMsg);
                //设置操作成功标识
                remark = ConstUtil.LOG_PROCESS_SUCCESS;
            }
            catch (Exception ex)
            {
                //输出日志
                SellLogCommon.WriteSystemLog(ex, LogInfo.LogType.SYSTEM, LogInfo.SystemLogKind.SYSTEM_ERROR, ConstUtil.MODULE_ID_GATHERING_ADD);
                //设置操作成功标识
                remark = ConstUtil.LOG_PROCESS_FAILED;
            }
            SellLogCommon.InsertLog(sellGatheringModel.GatheringNo, ConstUtil.MODULE_ID_GATHERING_ADD, ConstUtil.CODING_RULE_TABLE_GATHERING, remark, ConstUtil.LOG_PROCESS_UPDATE);

            return(isSuc);
        }
Beispiel #15
0
        /// <summary>
        /// 删除单据
        /// </summary>
        /// <param name="orderNos"></param>
        /// <returns></returns>
        public static bool DelOrder(string orderIDs)
        {
            bool isSucc = false;//是否添加成功
            //定义变量
            string remark = string.Empty;

            try
            {
                isSucc = AdversarySellDBHelper.DelOrder(orderIDs);
                //设置操作成功标识
                remark = ConstUtil.LOG_PROCESS_SUCCESS;
            }
            catch (Exception ex)
            {
                //输出日志
                SellLogCommon.WriteSystemLog(ex, LogInfo.LogType.SYSTEM, LogInfo.SystemLogKind.SYSTEM_ERROR, ConstUtil.MODULE_ID_ADVERSARYSELL_INFO);
                //设置操作成功标识
                remark = ConstUtil.LOG_PROCESS_FAILED;
            }
            SellLogCommon.InsertLog(orderIDs, ConstUtil.MODULE_ID_ADVERSARYSELL_INFO, ConstUtil.CODING_RULE_TABLE_ADVERSARYSELL, remark, ConstUtil.LOG_PROCESS_DELETE);

            return(isSucc);
        }
Beispiel #16
0
        /// <summary>
        /// 插入
        /// </summary>
        /// <param name="adversarySellModel"></param>
        /// <returns></returns>
        public static int?Insert(AdversarySellModel adversarySellModel)
        {
            int?id = null;

            string remark = string.Empty;

            try
            {
                id = AdversarySellDBHelper.Insert(adversarySellModel);
                //设置操作成功标识
                remark = ConstUtil.LOG_PROCESS_SUCCESS;
            }
            catch (Exception ex)
            {
                //输出日志
                SellLogCommon.WriteSystemLog(ex, LogInfo.LogType.SYSTEM, LogInfo.SystemLogKind.SYSTEM_ERROR, ConstUtil.MODULE_ID_ADVERSARYSELL_ADD);
                //设置操作成功标识
                remark = ConstUtil.LOG_PROCESS_FAILED;
            }
            SellLogCommon.InsertLog(adversarySellModel.CustNo, ConstUtil.MODULE_ID_ADVERSARYSELL_ADD, ConstUtil.CODING_RULE_TABLE_ADVERSARYSELL, remark, ConstUtil.LOG_PROCESS_INSERT);

            return(id);
        }