示例#1
0
 public int InsertBottomRail(BottomRail pBottomRail)
 {
     try
     {
         return(_AD.InsertBottomRail(pBottomRail));
     }
     catch (Exception ex)
     {
         throw;
     }
 }
示例#2
0
 public bool UpdateBottomRail(BottomRail pBottomRail)
 {
     try
     {
         _AD.UpdateBottomRail(pBottomRail);
         return(true);
     }
     catch (Exception ex)
     {
         throw;
     }
 }
示例#3
0
        public int InsertBottomRail(BottomRail pBottomRail)
        {
            string sql = @"[spInsertBottomRail] '{0}', '{1}', '{2}', '{3}'";

            sql = string.Format(sql, pBottomRail.Description, pBottomRail.Status.Id,
                                pBottomRail.CreatorUser, pBottomRail.ModificationUser);
            try
            {
                return(_MB.EjecutarSQL(_CN, sql));
            }
            catch (Exception err)
            {
                throw err;
            }
        }
示例#4
0
        public void UpdateBottomRail(BottomRail pBottomRail)
        {
            string sql = @"[spUpdateBottomRail] '{0}', '{1}', '{2}', '{3}'";

            sql = string.Format(sql, pBottomRail.Id, pBottomRail.Description, pBottomRail.Status.Id,
                                pBottomRail.ModificationUser);
            try
            {
                _MB.EjecutarSQL(_CN, sql);
            }
            catch (Exception err)
            {
                throw err;
            }
        }
示例#5
0
        public BottomRail GetBottomRailById(int Id)
        {
            BottomRail bottomrail = new BottomRail();
            string     sql        = @"[spGetBottomRail] '{0}' ";

            sql = string.Format(sql, Id);

            try
            {
                DataSet ds = new DataSet();
                ds = _MB.CreaDS(ds, "BottomRail", sql, _CN);
                if (ds.Tables["BottomRail"].Rows.Count > 0)
                {
                    foreach (DataRow item in ds.Tables["BottomRail"].Rows)
                    {
                        bottomrail = new BottomRail()
                        {
                            Id     = int.Parse(item["Id"].ToString()),
                            Status = new Status()
                            {
                                Id = int.Parse(item["IdStatus"].ToString()), Description = item["DescripStatus"].ToString()
                            },
                            Description      = item["Description"].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(bottomrail);
            }
            catch (Exception)
            {
                throw;
            }
        }
示例#6
0
 public object DeleteBottomRail(BottomRail dBottomRail)
 {
     throw new NotImplementedException();
 }