Esempio n. 1
0
 void SOProcesser_Loaded(object sender, RoutedEventArgs e)
 {
     CommonDataFacade     = new CommonDataFacade(Page);
     SOInternalMemoFacade = new Facades.SOInternalMemoFacade(Page);
     SOQueryFacade        = new SOQueryFacade(Page);
     SOFacade             = new SOFacade(Page);
     LoadPage();
 }
Esempio n. 2
0
        private void btnBatchAbandon_Click(object sender, RoutedEventArgs e)
        {
            List <int> list    = new List <int>();
            var        dynamic = this.dataGridList.ItemsSource as dynamic;

            if (dynamic != null)
            {
                foreach (var item in dynamic)
                {
                    if (item.IsCheck == true)
                    {
                        list.Add((int)item["SysNo"]);
                    }
                }
            }

            if (list.Count == 0)
            {
                this.Window.Alert(ResSO.Msg_PleaseSelect);
                return;
            }
            Window.Confirm(ResSO.Info_AbandonConfirm, (s, confirmEvent) =>
            {
                if (confirmEvent.DialogResult == DialogResultType.OK)
                {
                    UCReasonCodePicker content = new UCReasonCodePicker();
                    content.ReasonCodeType     = ReasonCodeType.Order;
                    content.Dialog             = Window.ShowDialog(ResSOMaintain.Info_SOMaintain_AbandSO, content, (obj, args) =>
                    {
                        if (args.Data != null)
                        {
                            KeyValuePair <string, string> data = (KeyValuePair <string, string>)args.Data;
                            (new SOFacade(this.Page)).AbandonSO(list, false, (vm) =>
                            {
                                if (vm != null)
                                {
                                    SOInternalMemoFacade SOInternalMemoFacade = new SOInternalMemoFacade();
                                    for (int i = 0; i < list.Count; i++)
                                    {
                                        SOInternalMemoFacade.Create(new SOInternalMemoInfo
                                        {
                                            SOSysNo         = list[i],
                                            Content         = data.Value,
                                            LogTime         = DateTime.Now,
                                            ReasonCodeSysNo = int.Parse(data.Key),
                                            CompanyCode     = CPApplication.Current.CompanyCode,
                                            Status          = SOInternalMemoStatus.FollowUp
                                        }, null);
                                    }
                                    Bind();
                                    Window.Alert(ResSOMaintain.Info_SOMaintain_SO_Abanded, MessageType.Information);
                                }
                            });
                        }
                    });
                }
            });
        }
Esempio n. 3
0
        public override void OnPageLoad(object sender, EventArgs e)
        {
            base.OnPageLoad(sender, e);
            m_commonFacade           = new CommonDataFacade(this);
            m_facade                 = new SOInternalMemoFacade(this);
            spConditions.DataContext = m_query = new SOInternalMemoQueryFilter();

            IniPageData();
        }