Пример #1
0
        public int CustomFormat_Save(BLL.CustomFormat agp)
        {
            try
            {
                agp.FundMasterId = Caller.FundMasterId;
                DAL.CustomFormat d = DB.CustomFormats.Where(x => x.Id == agp.Id).FirstOrDefault();

                if (d == null)
                {
                    d = new DAL.CustomFormat();
                    DB.CustomFormats.Add(d);

                    agp.toCopy <DAL.CustomFormat>(d);
                    DB.SaveChanges();

                    agp.Id = d.Id;
                    LogDetailStore(agp, LogDetailType.INSERT);
                }
                else
                {
                    agp.toCopy <DAL.CustomFormat>(d);
                    DB.SaveChanges();
                    LogDetailStore(agp, LogDetailType.UPDATE);
                }

                Clients.Clients(OtherLoginClientsOnGroup).CustomFormat_Save(agp);

                return(agp.Id);
            }
            catch (Exception ex) { }
            return(0);
        }
Пример #2
0
 BLL.CustomFormat CustomFormatDAL_BLL(DAL.CustomFormat d)
 {
     BLL.CustomFormat b = d.toCopy <BLL.CustomFormat>(new BLL.CustomFormat());
     b.Fund = d.FundMaster == null ? new BLL.FundMaster() : d.FundMaster.toCopy <BLL.FundMaster>(new BLL.FundMaster());
     return(b);
 }
Пример #3
0
 BLL.CustomFormat CustomFormatDAL_BLL(DAL.CustomFormat d)
 {
     BLL.CustomFormat b = d.toCopy <BLL.CustomFormat>(new BLL.CustomFormat());
     b.Company = d.CompanyDetail == null ? new BLL.CompanyDetail() : d.CompanyDetail.toCopy <BLL.CompanyDetail>(new BLL.CompanyDetail());
     return(b);
 }