public CpsUserManagement()
        {
            InitializeComponent();
            this.CpsUserResult.LoadingDataSource += new EventHandler <LoadingDataEventArgs>(CpsUserResult_LoadingDataSource);
            this.Loaded += (sender, e) =>
            {
                facade = new CpsUserFacade();
                model  = new CpsUserQueryVM();
                facade.GetWebSiteType((obj, arg) =>
                {
                    if (arg.FaultsHandle())
                    {
                        return;
                    }
                    List <WebSiteType> templist = new List <WebSiteType>()
                    {
                        new WebSiteType()
                        {
                            SelectValue = null, Description = "--所有--"
                        }
                    };

                    foreach (var item in  arg.Result.Rows)
                    {
                        templist.Add(new WebSiteType()
                        {
                            SelectValue = item.value, Description = item.Description
                        });
                    }
                    model.ListWebSiteType = templist;
                    model.WebSiteType     = (from p in model.ListWebSiteType where p.SelectValue == null select p).ToList().FirstOrDefault();
                    this.DataContext      = model;
                });
            };
        }
Example #2
0
 public CpsUserAudit()
 {
     InitializeComponent();
     this.Loaded += (sender, e) =>
     {
         facade = new CpsUserFacade();
     };
 }
Example #3
0
 public CpsUserBasicMaintain()
 {
     InitializeComponent();
     this.Loaded += (sender, e) =>
     {
         facade           = new CpsUserFacade();
         this.DataContext = Data;
     };
 }
 public CpsUserSourceMaintain()
 {
     InitializeComponent();
     this.UserSourceResult.LoadingDataSource += new EventHandler <LoadingDataEventArgs>(UserSourceResult_LoadingDataSource);
     this.Loaded += (sender, e) =>
     {
         facade = new CpsUserFacade();
         this.UserSourceResult.Bind();
     };
 }
 public CpsUserSourceEdit()
 {
     InitializeComponent();
     this.Loaded += (sender, e) =>
     {
         facade = new CpsUserFacade();
         model  = new CpsUserVM()
         {
             UserSource = new CpsUserSourceVM()
             {
                 UserType = UserType
             }
         };
         this.DataContext = model;
     };
 }
Example #6
0
 public AuditHistory()
 {
     InitializeComponent();
     this.Loaded += (sender, e) =>
     {
         facade = new CpsUserFacade();
         model  = new AuditHistoryVM();
         facade.GetAuditHistory(SysNo, (obj, arg) =>
         {
             if (arg.FaultsHandle())
             {
                 return;
             }
             foreach (var item in arg.Result.Rows)
             {
                 model.Note         = item.Note;
                 model.OpertionUser = item.InUser;
                 model.OpertionDate = item.InDate;
             }
             this.DataContext = model;
         });
     };
 }
 public ReceivablesAccountMaintain()
 {
     InitializeComponent();
     this.Loaded += (sender, e) =>
     {
         facade = new CpsUserFacade();
         List <BankType> tempdata = new List <BankType>()
         {
             new BankType()
             {
                 SelectValue = null, Description = "--请选择--"
             }
         };
         facade.GetBankType((obj, arg) =>
         {
             if (arg.FaultsHandle())
             {
                 return;
             }
             foreach (var item in arg.Result.Rows)
             {
                 tempdata.Add(new BankType()
                 {
                     SelectValue = item.value, Description = item.Description
                 });
             }
             Data.ReceivablesAccount.BankTypeList = tempdata;
             Data.ReceivablesAccount.Bank         = (from p in Data.ReceivablesAccount.BankTypeList where p.SelectValue == Data.ReceivablesAccount.BrankCode select p).ToList().FirstOrDefault();
             if (Data.ReceivablesAccount.Bank == null)
             {
                 Data.ReceivablesAccount.Bank = (from p in Data.ReceivablesAccount.BankTypeList where p.SelectValue == null select p).ToList().FirstOrDefault();
             }
             this.DataContext = Data;
         });
     };
 }