public int InsertDoorStylexOutsideEdgeProfile(DoorStyle pDoorStyle)
 {
     try
     {
         DoorStylexOutsideEdgeProfile doorStylexInside = new DoorStylexOutsideEdgeProfile();
         foreach (var item in pDoorStyle.listOutsideProfile)
         {
             doorStylexInside.CreationDate       = DateTime.Now;
             doorStylexInside.ModificationDate   = DateTime.Now;
             doorStylexInside.OutsideEdgeProfile = new OutsideEdgeProfile()
             {
                 Id = item.Id
             };
             doorStylexInside.DoorStyle = new DoorStyle()
             {
                 Id = pDoorStyle.Id
             };
             doorStylexInside.Status = new Status()
             {
                 Id = pDoorStyle.Status.Id
             };
             _AD.InsertDoorStylexOutsideEdgeProfile(doorStylexInside);
         }
         return(1);
     }
     catch (Exception ex)
     {
         throw;
     }
 }
 public bool UpdateDoorStylexOutsideEdgeProfile(DoorStylexOutsideEdgeProfile pDoorStylexOutsideEdgeProfile)
 {
     try
     {
         _AD.UpdateDoorStylexOutsideEdgeProfile(pDoorStylexOutsideEdgeProfile);
         return(true);
     }
     catch (Exception ex)
     {
         throw;
     }
 }
Ejemplo n.º 3
0
        public void UpdateDoorStylexOutsideEdgeProfile(DoorStylexOutsideEdgeProfile pDoorStylexOutsideEdgeProfile)
        {
            string sql = @"[spUpdateDoorStylexOutsideEdgeProfile] '{0}', '{1}', '{2}', '{3}', '{4}'";

            sql = string.Format(sql, pDoorStylexOutsideEdgeProfile.Id, pDoorStylexOutsideEdgeProfile.DoorStyle.Id, pDoorStylexOutsideEdgeProfile.OutsideEdgeProfile.Id, pDoorStylexOutsideEdgeProfile.Status.Id,
                                pDoorStylexOutsideEdgeProfile.ModificationUser);
            try
            {
                _MB.EjecutarSQL(_CN, sql);
            }
            catch (Exception err)
            {
                throw err;
            }
        }
Ejemplo n.º 4
0
        public int InsertDoorStylexOutsideEdgeProfile(DoorStylexOutsideEdgeProfile pDoorStylexOutsideEdgeProfile)
        {
            string sql = @"[spInsertDoorStylexOutsideEdgeProfile] '{0}', '{1}', '{2}', '{3}', '{4}'";

            sql = string.Format(sql, pDoorStylexOutsideEdgeProfile.DoorStyle.Id, pDoorStylexOutsideEdgeProfile.OutsideEdgeProfile.Id, pDoorStylexOutsideEdgeProfile.Status.Id,
                                pDoorStylexOutsideEdgeProfile.CreatorUser, pDoorStylexOutsideEdgeProfile.ModificationUser);
            try
            {
                return(_MB.EjecutarSQL(_CN, sql));
            }
            catch (Exception err)
            {
                throw err;
            }
        }
Ejemplo n.º 5
0
        public DoorStylexOutsideEdgeProfile GetDoorStylexOutsideEdgeProfileById(int Id)
        {
            DoorStylexOutsideEdgeProfile doorxoutside = new DoorStylexOutsideEdgeProfile();
            string sql = @"[spGetDoorStylexOutsideEdgeProfile] '{0}' ";

            sql = string.Format(sql, Id);

            try
            {
                DataSet ds = new DataSet();
                ds = _MB.CreaDS(ds, "DoorStylexOutsideEdgeProfile", sql, _CN);
                if (ds.Tables["DoorStylexOutsideEdgeProfile"].Rows.Count > 0)
                {
                    foreach (DataRow item in ds.Tables["DoorStylexOutsideEdgeProfile"].Rows)
                    {
                        doorxoutside = new DoorStylexOutsideEdgeProfile()
                        {
                            Id        = int.Parse(item["Id"].ToString()),
                            DoorStyle = new DoorStyle()
                            {
                                Id = int.Parse(item["IdDoorStyle"].ToString()), Description = item["DescripDoorStyle"].ToString()
                            },
                            OutsideEdgeProfile = new OutsideEdgeProfile()
                            {
                                Id = int.Parse(item["IdOutsideEdgeProfile"].ToString()), Description = item["DescriptOEP"].ToString(),
                            },
                            Status = new Status()
                            {
                                Id = int.Parse(item["IdStatus"].ToString()), Description = item["DescripStatus"].ToString()
                            },
                            CreationDate     = (item["CreationDate"].ToString() != "") ? DateTime.Parse(item["CreationDate"].ToString()) : DateTime.Parse("01/01/1900"),
                            ModificationDate = (item["ModificationDate"].ToString() != "") ? DateTime.Parse(item["ModificationDate"].ToString()) : DateTime.Parse("01/01/1900"),
                            CreatorUser      = int.Parse(item["CreatorUser"].ToString()),
                            ModificationUser = int.Parse(item["ModificationUser"].ToString()),
                        };
                    }
                }
                return(doorxoutside);
            }
            catch (Exception)
            {
                throw;
            }
        }