Beispiel #1
0
        protected virtual IEnumerable setDefaultPaymentMethod(PXAdapter adapter)
        {
            CreditCardsFilter filter = Filter.Current;

            if (!adapter.ExternalCall || PMFilter.AskExt((graph, vName) => filter.OverwritePaymentMethod = false) == WebDialogResult.OK)
            {
                string        paymentMethod             = filter.PaymentMethodId;
                PXFilterRow[] filterRows                = CustomerCardPaymentData.View.GetExternalFilters();
                int           startRow                  = 0;
                int           totalRows                 = 0;
                IEnumerable <CCSynchronizeCard> retList = CustomerCardPaymentData.View.Select(null, null, null, null, null, filterRows, ref startRow, 0, ref totalRows).OfType <CCSynchronizeCard>();

                foreach (CCSynchronizeCard item in retList)
                {
                    if (filter.OverwritePaymentMethod.GetValueOrDefault() == true || item.PaymentMethodID == null)
                    {
                        item.PaymentMethodID = paymentMethod;
                        CustomerCardPaymentData.Update(item);
                    }
                }
            }
            return(adapter.Get());
        }
Beispiel #2
0
        /// <summary>
        /// ������ ȡ�ػ�Ա�Ķ���Ϣ�б�ӿ�
        /// </summary>
        /// <param name="uid"></param>
        /// <param name="curpage"></param>
        /// <param name="pagesize"></param>
        /// <param name="folder"></param>
        /// <param name="filter"></param>
        /// <param name="msglen"></param>
        /// <returns></returns>
        public string UcenterPmList(int uid, int curpage, int pagesize, PMFolder folder, PMFilter filter, int msglen)
        {
            UCRequestParms parms = new UCRequestParms();

            parms["uid"] = uid.ToString();
            parms["page"] = curpage.ToString();
            parms["pagesize"] = pagesize.ToString();
            parms["folder"] = folder.ToString();
            parms["filter"] = filter.ToString();
            parms["mesglen"] = msglen.ToString();
            return DoRequest("pm", "ls", parms);
        }