// TODO: Implement public void SetAPI(BaseAPI api) { throw new NotImplementedException(); }
public CrmFollowUpPage(BaseAPI API) : base(API, string.Empty) { InitPage(null); }
public void SetAPI(BaseAPI api) { _crudApi = new CrudAPI(api); _postingAPI = new PostingAPI(api); }
public DebtorOrders(BaseAPI api, string lookupKey) : base(api, lookupKey) { Init(null); }
public DebtorOffers(BaseAPI API) : base(API, string.Empty) { Init(null); }
public SalesRepCustomerStatPage(BaseAPI API) : base(API, string.Empty) { InitPage(null); }
public ProjectJournalPage(BaseAPI API) : this(API, string.Empty) { }
public InvPurchaseAccountPage(BaseAPI api) : base(api, string.Empty) { InitializeComponent(); InitPage(null); }
public DocsSendLogGridPage(BaseAPI Api) : base(Api, string.Empty) { InitPage(); }
public void SetAPI(BaseAPI api) { crudApi = api as CrudAPI; }
public ProductionOrdersPage(BaseAPI API) : base(API, string.Empty) { Init(null); }
// // GET: /WeiXin/ /// <summary> /// 自行扩展微信交互回调模式逻辑 /// </summary> /// <param name="messageAPI"></param> /// <param name="wxHelper"></param> /// <returns></returns> public override ContentResult ReciveMessage(MessageAPI messageAPI, WeiXinHelper wxHelper) { var result = new ContentResult(); #region 接收到的消息类型处理 BaseAPI.Log(messageAPI.Message.Element("MsgType").Value); switch (messageAPI.Message.Element("MsgType").Value) { case ReceiveMsgType.Text: var userID = messageAPI.Message.Element("FromUserName").Value; var user = new UserAPI().GetUser(userID); result = wxHelper.ReplyImage("系统不会回复你的", "你以为它会回复你", user.Avatar, "http://www.ysyswenli.net"); break; case ReceiveMsgType.Image: BaseAPI.Log("黄图哥,这张图片不错!"); result = wxHelper.ReplyTXT("黄图哥,这张图片不错!"); break; case ReceiveMsgType.Thumb: break; case ReceiveMsgType.Link: break; case ReceiveMsgType.Location: break; case ReceiveMsgType.Voice: break; case ReceiveMsgType.Music: break; case ReceiveMsgType.Video: break; case ReceiveMsgType.News: break; case ReceiveMsgType.Event: #region 事件类型处理 switch (messageAPI.Message.Element("Event").Value) { case ReceiveMsgType.EventType.SubscribeEvent: result = wxHelper.ReplyTXT("欢迎您!" + messageAPI.Message.Element("FromUserName").Value); break; case ReceiveMsgType.EventType.EnterAgentEvent: result = wxHelper.ReplyTXT("欢迎您!" + messageAPI.Message.Element("FromUserName").Value); break; case ReceiveMsgType.EventType.UnSubscribeEvent: break; case ReceiveMsgType.EventType.ScanEvent: break; case ReceiveMsgType.EventType.ClickEvent: //微信自定义EventKey if (messageAPI.Message.Element("EventKey").Value == "Photo") { result = wxHelper.ReplyImage("test", "test", "http://wx.qlogo.cn/mmhead/Q3auHgzwzM7G71S7KIpSKIhvsnZoTsEw1qbMySdHZJH6rLYUmNKLFw/0", "http://www.ysyswenli.net"); } break; case ReceiveMsgType.EventType.ViewEvent: break; case ReceiveMsgType.EventType.LocationEvent: break; case ReceiveMsgType.EventType.PicSysPhotoEvent: result = wxHelper.ReplyImage("test", "test", "http://wx.qlogo.cn/mmhead/Q3auHgzwzM7G71S7KIpSKIhvsnZoTsEw1qbMySdHZJH6rLYUmNKLFw/0", "http://www.ysyswenli.net"); break; default: break; } #endregion break; } #endregion return(result); }
private void OnMainCommand() { IsShowErrorMessage = false; try { switch (Mode) { case RollInfoViewModelMode.OpenShift: _rollInfo = BaseAPI.activateTicketRoll(FirstTicketSeries, FirstTicketNumber, RollColor.Default); ApplicationStaticHelper.IsCurrentRollDeactivated = false; _shift = BaseAPI.isShiftOpen() ? BaseAPI.getCurrentShift() : BaseAPI.openShift(); break; case RollInfoViewModelMode.CloseShift: if (!DeactivateRoll()) { return; } if (BaseAPI.isShiftOpen()) { BaseAPI.closeShift(BaseAPI.getCurrentShift()); ApplicationStaticHelper.ShiftCloseDate = DateTime.Now; } if (BaseAPI.isShiftOpen()) { ErrorMessage = "Закрыть смену ({0} {1}) не получилось! Режим {2}.".F(BaseAPI.getCurrentShift().CashierName, BaseAPI.getCurrentShift().OpenDate, Mode); Log.Warn(ErrorMessage); IsShowErrorMessage = true; return; } _rollInfo = null; _shift = null; break; case RollInfoViewModelMode.NeedNewRoll: if (!CloseRoll()) { return; } _rollInfo = BaseAPI.activateTicketRoll(FirstTicketSeries, FirstTicketNumber, RollColor.Default); ApplicationStaticHelper.IsCurrentRollDeactivated = false; _shift = BaseAPI.getCurrentShift(); break; case RollInfoViewModelMode.ChangeRoll: if (!DeactivateRoll()) { return; } _rollInfo = BaseAPI.activateTicketRoll(FirstTicketSeries, FirstTicketNumber, RollColor.Default); ApplicationStaticHelper.IsCurrentRollDeactivated = false; _shift = BaseAPI.getCurrentShift(); break; default: throw new ArgumentOutOfRangeException(); } } catch (Exception e) { Log.Debug("{0} Вызвало исключение:", Mode); Log.Fatal(e); //throw; ErrorMessage = "Произошло исключение: {0}".F(e.Message); IsShowErrorMessage = true; return; } if (_rollInfo.IsNull() && Mode != RollInfoViewModelMode.CloseShift /*&& Mode != RollInfoViewModelMode.ChangeRollDeactivate*/) { ErrorMessage = String.Format("Бабина с параметрами {0} {1} не существует! Режим {2}.", FirstTicketSeries, FirstTicketNumber, Mode); Log.Warn(ErrorMessage); IsShowErrorMessage = true; return; } if (_shift.IsNull() && Mode != RollInfoViewModelMode.CloseShift) { ErrorMessage = String.Format("Смена не определена!"); Log.Warn(ErrorMessage); IsShowErrorMessage = true; return; } Close(); Dispose(); }
public ProjectTransactionPage(BaseAPI API) : base(API, string.Empty) { InitializePage(null); }
public VendorPriceListPage(BaseAPI API) : base(API, string.Empty) { Init(); }
public DebtCollection(BaseAPI API) : base(API, string.Empty) { InitPage(); }
public VendorPriceListPage(BaseAPI api, string lookupKey) : base(api, lookupKey) { Init(); }
public DebtorInvoiceLinesPage(BaseAPI API) : base(API, string.Empty) { InitPage(null); }
public UserLayoutPage(BaseAPI API) : base(API, string.Empty) { Init(); }
public SubscriptionInvoiceLinePage(BaseAPI API) : base(API, string.Empty) { InitPage(null); }
public BankStGLTransPage(BaseAPI API) : base(API, string.Empty) { Init(); }
public ProjectPage(BaseAPI api, string lookupKey) : base(api, lookupKey) { Init(); }
public DebtorOrderLineReport(BaseAPI API) : base(API, string.Empty) { InitializeComponent(); InitPage(); }
public ProjectPage(BaseAPI API) : base(API, string.Empty) { Init(); }
public AddUserFields(BaseAPI API) : base(API, string.Empty) { InitPage(); }
public InvStorageProfileReport(BaseAPI API) : base(API, string.Empty) { InitPage(null); }
public QuickInvoice(BaseAPI API) : base(API, string.Empty) { InitializeComponent(); InitPage(); }
public CreditorStatement(BaseAPI API) : base(API, string.Empty) { Init(); }
public ProjectTransBudgetPivotPage(BaseAPI API) : base(API, string.Empty) { Init(null); }
public DebtorPayments(BaseAPI api, string lookupKey) : base(api, lookupKey) { InitPage(); }