示例#1
0
        public bool UpdateDryBox(DryBox model)
        {
            var dryBox = Session.Get <DryBox>(model.DryBoxID);

            if (dryBox == null)
            {
                return(false);
            }
            dryBox.DryBoxName = model.DryBoxName;
            dryBox.Visible    = model.Visible;
            dryBox.Deleted    = model.Deleted;
            dryBox.Active     = model.Active;
            Session.Update(dryBox);
            return(true);
        }
示例#2
0
        private DryBoxAssignmentInfo CreateDryBoxAssignmentInfo(DryBoxAssignment dba, DryBox db, ClientAccount ca)
        {
            //var db = Require<DryBox>(dba.DryBoxID);
            //var ca = Require<ClientAccount>(dba.ClientAccountID);
            var co = ca.ClientOrg;
            var c  = co.Client;
            var a  = ca.Account;
            var o  = a.Org;

            return(new DryBoxAssignmentInfo
            {
                ClientID = c.ClientID,
                DryBoxName = db.DryBoxName,
                Active = db.Active,
                Visible = db.Visible,
                Deleted = db.Deleted,
                UserName = c.UserName,
                LName = c.LName,
                FName = c.FName,
                ShortCode = a.ShortCode,
                AccountName = a.Name,
                OrgName = o.OrgName,
                Email = co.Email,
                ApprovedDate = dba.ApprovedDate,
                ClientAccountID = dba.ClientAccountID,
                DryBoxAssignmentID = dba.DryBoxAssignmentID,
                DryBoxID = dba.DryBoxID,
                PendingApproval = dba.PendingApproval,
                PendingRemoval = dba.PendingRemoval,
                Rejected = dba.Rejected,
                RemovedDate = dba.RemovedDate,
                ReservedDate = dba.ReservedDate
            });
        }
示例#3
0
 public bool UpdateDryBox(DryBox model)
 {
     return(Put("webapi/data/drybox", model));
 }