Ejemplo n.º 1
0
        public bool AddMeasure(UnitMeasureObject itemMeasure)
        {
            SqlParameter[] params_ = new SqlParameter[] {
                new SqlParameter("@Name", itemMeasure.Name),
                new SqlParameter("@Description", itemMeasure.Description),
                new SqlParameter("@IsActive", itemMeasure.IsActive),
                new SqlParameter("@AddedBy", itemMeasure.AddedBy),
                new SqlParameter("@DateAdded", itemMeasure.DateAdded),
                new SqlParameter("@IP", Helpers.CustomHelper.GetLocalIPAddress()),
                new SqlParameter("@MAC", Helpers.CustomHelper.GetMACAddress())
            };

            return(Library.ConnectionString.returnCon.executeQuery("spAddMeasureItem", params_, CommandType.StoredProcedure));
        }
Ejemplo n.º 2
0
        public bool ActivateMeasure(UnitMeasureObject itemmeasure)
        {
            SqlParameter[] params_ = new SqlParameter[] {
                new SqlParameter("@id", itemmeasure.Id),
                new SqlParameter("@Code", itemmeasure.Code),
                new SqlParameter("@table", "tblUnitOfMeasure"),
                new SqlParameter("@IP", Helpers.CustomHelper.GetLocalIPAddress()),
                new SqlParameter("@MAC", Helpers.CustomHelper.GetMACAddress()),
                new SqlParameter("@Module", "ITEM"),
                new SqlParameter("@AddedBy", itemmeasure.AddedBy),
                new SqlParameter("@DateAdded", itemmeasure.DateAdded)
            };

            return(Library.ConnectionString.returnCon.executeQuery("spActivateItem", params_, CommandType.StoredProcedure));
        }